Browse Source

Only set tempo markings in parenthesis when user provided a string like Allegro

master
Nils 2 months ago
parent
commit
ece0aa41c3
  1. 6
      engine/tempotrack.py

6
engine/tempotrack.py

@ -719,7 +719,11 @@ class TempoTrack(GraphTrackCC):
t = tempoItem["lilypondParameters"]["tempo"]
d = duration.ticksToLilypond(tempoItem["referenceTicks"])
upm = str(tempoItem["unitsPerMinute"])
return f"\\tempo \"{t}\" {d} = {upm} {skipString}"
if t: #we have a custom string like "Allegro"
return f"\\tempo \"{t}\" {d} = {upm} {skipString}"
else:
return f"\\tempo {d} = {upm} {skipString}"
#return "\\tempo {} {} = {} {}".format(tempoItem["lilypondParameters"]["tempo"], duration.baseDurationToTraditionalNumber[tempoItem["referenceTicks"]], str(tempoItem["unitsPerMinute"]), skipString)
raise NotImplementedError

Loading…
Cancel
Save