From: Han-Wen Nienhuys Date: Wed, 7 Dec 2005 12:46:30 +0000 (+0000) Subject: * python/musicxml.py (Accidental.__init__): new class. X-Git-Tag: release/2.7.22~9 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=0c75985d4dcd07f06209869cbb05d22c2c47d313;p=lilypond.git * python/musicxml.py (Accidental.__init__): new class. * scripts/musicxml2ly.py (progress): new function (musicxml_key_to_lily): don't barf on modeless keys. (create_skip_music): new function. (musicxml_spanner_to_lily_event): new function. Handle beams too. (musicxml_note_to_lily_main_event): new function. --- diff --git a/Documentation/user/converters.itely b/Documentation/user/converters.itely index 2e774821c2..f8b6f6c82f 100644 --- a/Documentation/user/converters.itely +++ b/Documentation/user/converters.itely @@ -144,7 +144,7 @@ confuse @command{etf2ly}. Sequences of grace notes are ended improperly. @node Invoking musicxml2ly @section Invoking @code{musicxml2ly} -@uref{http://@/www.@/recordarde@/.com/xml/,MusicXML} is a XML dialect +@uref{http://@/www.@/recordarde@/.com/xml/,MusicXML} is an XML dialect for representing music notation. @command{musicxml2ly} extracts the notes from part-wise MusicXML diff --git a/python/musicxml.py b/python/musicxml.py index a1107f6bf0..8886ecead0 100644 --- a/python/musicxml.py +++ b/python/musicxml.py @@ -237,7 +237,12 @@ class Time_modification(Music_xml_node): b = self.get_maybe_exist_typed_child (class_dict['actual-notes']) a = self.get_maybe_exist_typed_child (class_dict['normal-notes']) return (string.atoi(a.get_text ()), string.atoi (b.get_text ())) - + +class Accidental (Music_xml_node): + def __init__ (self): + Music_xml_node.__init__ (self) + self.editorial = False + self.cautionary = False class Tuplet(Music_xml_node): @@ -272,6 +277,7 @@ class Grace (Music_xml_node): class_dict = { '#comment': Hash_comment, + 'accidental': Accidental, 'alter': Alter, 'attributes': Attributes, 'beam' : Beam, diff --git a/scripts/musicxml2ly.py b/scripts/musicxml2ly.py index 4e5a39b2d8..390a855727 100644 --- a/scripts/musicxml2ly.py +++ b/scripts/musicxml2ly.py @@ -212,7 +212,6 @@ def musicxml_note_to_lily_main_event (n): if acc: # let's not force accs everywhere. event.cautionary = acc.editorial - print event, event.cautionary, event.ly_expression() elif n.get_maybe_exist_typed_child (musicxml.Rest): event = musicexp.RestEvent()