|
|
@ -2420,7 +2420,7 @@ def deleteTempoBlock(tempoBlockId): |
|
|
|
def insertTempoItemAtAbsolutePosition(tickPositionAbsolute, unitsPerMinute, referenceTicks, graphType, description:str): |
|
|
|
blockId, blockPosition = session.data.tempoTrack.tempoBlocKByAbsolutePosition(tickPositionAbsolute) |
|
|
|
positionInTicksRelativeToBlock = tickPositionAbsolute - blockPosition |
|
|
|
addTempoItem(blockId, positionInTicksRelativeToBlock, unitsPerMinute, referenceTicks, graphType, description) |
|
|
|
return addTempoItem(blockId, positionInTicksRelativeToBlock, unitsPerMinute, referenceTicks, graphType, description) |
|
|
|
|
|
|
|
def tempoAtTickPosition(tick): |
|
|
|
tempoItem = session.data.tempoTrack.tempoAtTickPosition(tick) |
|
|
@ -2447,8 +2447,12 @@ def insertTempoChangeDuringDuration(percentageUnitsPerMinuteAsFloat): |
|
|
|
tempoItem = session.data.tempoTrack.tempoAtTickPosition(startTick) |
|
|
|
#originalUnitsPerMinute, originalReferenceTicks = session.data.tempoTrack.tempoAtTickPosition(startTick) |
|
|
|
newUnitsPerMinute = tempoItem.unitsPerMinute * percentageUnitsPerMinuteAsFloat |
|
|
|
insertTempoItemAtAbsolutePosition(startTick, newUnitsPerMinute, tempoItem.referenceTicks, graphType = "standalone") |
|
|
|
insertTempoItemAtAbsolutePosition(endTick, tempoItem.unitsPerMinute, tempoItem.referenceTicks, graphType = "standalone") |
|
|
|
t = insertTempoItemAtAbsolutePosition(startTick, newUnitsPerMinute, tempoItem.referenceTicks, graphType = "standalone", description="tmp") |
|
|
|
t.lilypondParameters["hide"] = True #Replace with Fermata or so |
|
|
|
t = insertTempoItemAtAbsolutePosition(endTick, tempoItem.unitsPerMinute, tempoItem.referenceTicks, graphType = "standalone", description="tmp") # a tempo |
|
|
|
t.lilypondParameters["hide"] = True |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def currentTempoScalingFactor(): |
|
|
|
return session.data.tempoTrack.factor |
|
|
|