|
|
@ -571,12 +571,11 @@ class TempoMap(object): |
|
|
|
|
|
|
|
def _sanitize(self): |
|
|
|
"""Inplace modification of self.tempoMap. Remove zeros and convert to float values. """ |
|
|
|
self._tempoMap = {int(key):(float(value), timesigNum, timesigDenom) for key, (value, |
|
|
|
timesigNum, timesigDenom) in self._tempoMap.items() if value > 0.0} #Don't use the |
|
|
|
following. Empty tempo maps are allowed, especially in jack transport slave mode. #Instead |
|
|
|
set a default tempo 120 on init explicitly #if not self._tempoMap: # logger.error("Found |
|
|
|
invalid tempo map. Forcing to 120 bpm. Please correct manually") # self._tempoMap = {0, |
|
|
|
120.0} |
|
|
|
self._tempoMap = {int(key):(float(value), timesigNum, timesigDenom) for key, (value, timesigNum, timesigDenom) in self._tempoMap.items() if value > 0.0} |
|
|
|
#Don't use the following. Empty tempo maps are allowed, especially in jack transport slave mode. #Instead set a default tempo 120 on init explicitly |
|
|
|
#if not self._tempoMap: |
|
|
|
#logger.warning("Found invalid tempo map. Forcing to 120 bpm. Please correct manually") |
|
|
|
#self._tempoMap = {0, 120.0} |
|
|
|
|
|
|
|
def _clearCboxTempoMap(self): |
|
|
|
"""Remove all cbox tempo values by iterating over all of them and set them to None, which is |
|
|
|