lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

MusicXML: Conversion of various types of spanners (octave, pedals, trill


From: Han-Wen Nienhuys
Subject: MusicXML: Conversion of various types of spanners (octave, pedals, trills)
Date: Thu, 13 Sep 2007 00:01:09 +0200

   # TODO: setting dashed/dotted line style does not work, because that
+        #       command needs to be written before the note, not when the
+        #       event is observed after the note!
+        #if self.line_type == 1:
+            #before = '\\slurDotted'
+        #elif self.line_type == 2:
+            #before = '\\slur


if False:
  ..block..

is shorter

+    def ly_expression (self):
+        return {-1: '\\sustainDown',
+            0:'',
+            1:'\\sustainUp'}.get (self.span_direction, '')
+

0 key superfluous

+        # TODO: wavy-line glissandos don't work, becasue the style has to be
+        #       set before the note, at the \glissando it's already too late!
+        #if self.line_type == 3: # wavy-line:
+            #style = "\once\override Glissando #'style = #'zigzag"
+        # In lilypond, glissando is NOT a spanner, unlike MusicXML.


You might get away with a \tweak command for this.


 spanner_type_dict = {
     'start': -1,
     'begin': -1,
+    'up': -2,
+    'down': -1,
     'stop': 1,
     'end' : 1
 }

Don't do this; this is very nonstandard within lilypond. -1 =
left/down/start, 1 = right/up/stop,  0 = center.


@@ -492,12 +492,28 @@ class SpanEvent (Event):
     def __init__(self):
         Event.__init__ (self)
         self.span_direction = 0
+        self.line_type = 0
+        self.size = 0


why is line_type encoded as an int? It's clearer if you just use a
string ('wavy', 'dotted', etc.)


-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

[Prev in Thread] Current Thread [Next in Thread]