Browse Source

Show tempo names in gui

master
Nils 4 months ago
parent
commit
5de9289093
  1. 4
      CHANGELOG
  2. 20
      qtgui/conductor.py

4
CHANGELOG

@ -6,13 +6,15 @@ External contributors notice at the end of the line: (LastName, FirstName / nick
## 2022-07-15 2.1.0
Rewrite grid, which was a performance drag in the past.
Add functions to move block to start or end of track.
Scroll view when dragging blocks and tracks with the mouse.
Add 3/2 to metrical instruction.
Autosave when exporting Lilypond .ly or PDF.
Command to quickly add text below or above a staff.
Allow menu commands in CC and Block view: PDF, .ly export, metadata edit, zoom.
Fix lilypond tempo export.
Fix lilypond tempo export. Also add option to Lilypond Properties to not print metronome markings.
Optional text description for tempo items like "allegro"
Cleaner .ly export with more line breaks, comments and using more default ly instructions when available, instead of our custom generic-purpose scripts.
## 2022-04-15 2.0.3

20
qtgui/conductor.py

@ -413,7 +413,15 @@ class TempoPoint(QtWidgets.QGraphicsItem):
self.number = QtWidgets.QGraphicsTextItem("")
self.number.setParentItem(self)
#self.number.setHtml("<font color='black' size='2'>{}</font>".format(str(int(staticExportItem["unitsPerMinute"]))))
self.number.setHtml("<font size='2'>{}</font>".format(str(int(staticExportItem["unitsPerMinute"]))))
if staticExportItem["lilypondParameters"]["tempo"]:
numberString = f"""{staticExportItem["lilypondParameters"]["tempo"]}({int(staticExportItem["unitsPerMinute"])})"""
else:
numberString = str(int(staticExportItem["unitsPerMinute"]))
#self.number.setHtml("<font size='2'>{}</font>".format(str(int(staticExportItem["unitsPerMinute"]))))
self.number.setHtml(f"<font size='2'>{numberString}</font>")
self.number.setPos(-6,0) #adjust items font x offsset.
if not self.staticExportItem["graphType"] == "standalone":
@ -505,7 +513,14 @@ class TempoPoint(QtWidgets.QGraphicsItem):
self.wheelEventChangedValue += 1
else:
self.wheelEventChangedValue -= 1
self.number.setHtml("<font size='2'>{}</font>".format(str(int(self.staticExportItem["unitsPerMinute"] + self.wheelEventChangedValue))))
if self.staticExportItem["lilypondParameters"]["tempo"]:
numberString = f"""{self.staticExportItem["lilypondParameters"]["tempo"]}({int(self.staticExportItem["unitsPerMinute"]) + self.wheelEventChangedValue})"""
else:
numberString = str(int(self.staticExportItem["unitsPerMinute"]) + self.wheelEventChangedValue )
#self.number.setHtml("<font size='2'>{}</font>".format(str(int(self.staticExportItem["unitsPerMinute"] + self.wheelEventChangedValue))))
self.number.setHtml(f"<font size='2'>{numberString}</font>")
event.accept()
else:
event.accept()
@ -529,6 +544,7 @@ class TempoPoint(QtWidgets.QGraphicsItem):
event.accept()
def contextMenuEvent(self, event):
if not self.parentTempoTrack: return #there was a rare bug here. don't let it crash
if self.parentTempoTrack.parentView.mode() in ("notation", "cc"):
listOfLabelsAndFunctions = [
("edit properties", lambda: SecondaryTempoChangeMenu(self.scene().parentView.mainWindow, staticExportTempoItem = self.staticExportItem)),

Loading…
Cancel
Save