]> git.donarmstrong.com Git - lilypond.git/commit
MusicXML: Convert grace notes from MusicXML to Lilypond
authorReinhold Kainhofer <reinhold@kainhofer.com>
Sun, 16 Sep 2007 20:57:16 +0000 (22:57 +0200)
committerReinhold Kainhofer <reinhold@kainhofer.com>
Wed, 3 Oct 2007 16:39:23 +0000 (18:39 +0200)
commite8af8e814eab52b8080f18f78bad7bade87c1c10
tree871adf219e053358b6e10eef9f8c11667f80898d
parentda90ac3105f2e5b7326929a30a0ecae827814f2e
MusicXML: Convert grace notes from MusicXML to Lilypond

Grace notes are normal <note> elements in XML, only with a <grace/>
child element. I append these notes to a special array of EventChord
and try to take care of the zero duration of grace notes (which
come before the real note and thus also create the EventChord with
duration zero!)

There is still one problem with things like beams or articulations on
grace notes (they are printed after the whole cord (not inside the
\grace!), but this is a general problem that musicxml2ly inserts
slurs, ties, beams, articulations, etc. as separate events not assigned
to any particular note/EventChord. The code should be changed to
assign these ornaments/settings directly to the note or the chord they
apply to. This would (1) get rid of e.g. triple [ with beamed chords,
(2) make it possible to combine multiple MusicXML articulations into
single lilypond articulations, (3) apply fingerings and ties to notes
inside chords rather than the whole chord, and (4) fix the grace notes.

The other problem is when a chord is used as a grace chord in MusicXML.
Due to the whole structure of musicxml2ly, this problem goes very deep
and I don't know of any way to fix this short of a big rewrite.

Signed-off-by: Reinhold Kainhofer <reinhold@kainhofer.com>
python/musicexp.py
scripts/musicxml2ly.py