]> git.donarmstrong.com Git - lilypond.git/blobdiff - python/musicexp.py
MusicXML: Implement support for transposed instruments
[lilypond.git] / python / musicexp.py
index e0f3f52c979ab50e5a97e85842af2fbe697bc19c..c0b298f36797fd9a775c0afb588c77ea9bff4a37 100644 (file)
@@ -1355,6 +1355,13 @@ class ClefChange (Music):
 """ % (glyph, pos, c0)
         return clefsetting
 
+class Transposition (Music):
+    def __init__ (self):
+        Music.__init__ (self)
+        self.pitch = None
+    def ly_expression (self):
+        self.pitch._force_absolute_pitch = True
+        return '\\transposition %s' % self.pitch.ly_expression ()
 
 class StaffChange (Music):
     def __init__ (self, staff):