MusicXML to Lilypond (musicxml2ly) development

I recently joined the Lilypond project and started working on the musicxml2ly converter, which converts MusicXML files to lilypond .ly files. When I started working on it, it was only able to extract the most basic features from the MusicXML (although it has a great code structure, thanks to Han-Wen).

New features

  • Titling and other header information (composer, poet, software)
  • Spanning directions: 8va, dynamics, pedals, hairpins
  • Lyrics
  • Articulations, Ornaments and Dynamics
  • Pitched rests
  • Fix crashes as much as possible
  • Different clef types
  • Grace notes
  • Staff systems (part-group in MusicXML), e.g. \ChoirStaff, \StaffGroup, or a simple «….»
  • Repeats, pickup measures, barlines
  • Tablature staves, Fretboards
  • Text markup
  • Layout information
  • Added command-line options for more control about conversion results (e.g. language, hiding directions, etc.)
  • Command-line switch for language-specific pitch names
  • Command-line switch for relative pitch output
  • Support for compressed MusicXML files (.mxl)

Current bugs and missing features

  • ,—–, brackets [Binchois]
  • Add command-line parameter to not force directions for articulations, dynamics, etc.
  • Cautionary accidentals [MChlo]
  • Chord messup with pickup measures [MozaChlo, MozTrio]
  • Chord names should be converted (to a separate \ChordNames „voice“) [17a, 17c, 17d]
  • Clef changes on wrong staff in piano staff [DebuMand, BrahWi]
  • Complete messups [Dichterliebe, MahlFaGe, MozaChlo, MozaVeil]
  • Convert Layout information (page size, font size, spacing) [08b, ActorPrelude]
  • Convert MIDI from MusicXML to Lilypond
  • Convert noteheads from MusicXML to Lilypond (e.g. cross, string harmonics, etc.)
  • Credit-words, at bottom, etc. [Echigo]
  • Crescendo wrong [Brahms]
  • Delayed turn articulations (in Lilypond: « {a4} {s8 s8\turn} ») [MChlo]
  • Dim as spanner [DebuMand]
  • Double slur / phrasing slur [DebuMand]
  • Dynamics assigned too late / at wrong position [BeetAnGe]
  • Foreign characters in Title [Echigo]
  • Grace notes with slur (appoggiatura)
  • Hairpin ends too early [FaurRev]
  • Hairpin not starting at note [FaurRev]
  • Hairpins ending in different voice [DebuMand]
  • Implement \relative output (usind a command-line switch)
  • Japanese title [Echigo]
  • Lyrics on melismata/slurred notes (usually ignored!) [Echigo]
  • Lyrics on notes with grace notes (technically, they are slurred, but no melismata!) [MozaVeil]
  • Make use of the placement=„below|above“ parameter of the <direction> element [MozartTrio]
  • Measure messed up at clef change [BrahWi#5]
  • Metronome marks
  • Multiple lyrics syllables assigned to a note
  • Multi-staff measures should be converted verbatim, not using the current heuristics [11a]
  • No time [Chant]
  • Part order (overlapping part grouping in Finale) [08b, ActorPrelude]
  • Pedalmark without up [Dichterliebe]
  • Percussion support needs to be improved [15a, ActorPrelude]
  • Phrasing slur [DebuMand]
  • Place fingering for guitars inside chords (i.e. <c\2 d\3> instad of <c d> \2 \3)
  • Show/hide staff [MozaChlo]
  • Sort stanzas correctly [SchubAve, 06b]
  • Split chord across two piano staves [FaurRev]
  • Staff change [Dichterliebe, BrahWi, DebuMand, FaurRev]
  • Tab staff [BrookeWest]
  • Tempos [Mahl]
  • Tempo Marks
  • Text markup at rests [DebuMand]
  • Text markup at wrong position [Chant]
  • Text markups not on every voice [Teleman]
  • Texts / dim., where none should appear [BeetAnGe]
  • Triplets with curved / no brackets [12b]
  • Turn with accicental [MChlo]
  • Tweaks (stemup, stemdown, beam left/right count, etc.). Tweaks are less relevant, since LilyPond mostly makes the right decisions by itself, and outputting all MusicXML tweaks clutters the .ly files.
  • Voice 1/2 messup [Teleman]

Missing features in Lilypond

  • StaffGroups can only be nested two levels, then the hierarchy is messed up [08b]
  • In Lilypond, staff groups cannot overlap (only be nested), while in MusicXML, overlapping groups are allowed [08g]
  • In Lilypond, chords that have some notes on one staff and the remaining notes on another staff of the PianoStaff are not possible [14c]

Thanks

Thanks to Musitek, who sponsored me with a free copy of SmartScore Pro for interoperability testing!

Notes on erroneous MusicXML files

Finale 2007's exported files

While the MusicXML files exported by Finale (or rather the Dolet plugin for finale) should in general be regarded as the reference implementation for MusicXML, some of Finale's features are not exported to MusicXML at all! These include:

  • Single-note tremolo (i.e. slashes through the stem)
  • barre elements in fretboards
  • multiple fingerings/frets per string in fretboards
  • in fretboards, even strings without any information (neither explicitly open nor muted) are exported as open string (represented by an „o“)
  • fretboards assigned to a particular staff in Finale lack the <staff> element in the MusicXML output
  • part groups with a square bracket in Finale are exported with the „normal“ bracket to MusicXML, groups with a brace are always exported as one part with multiple <staff> elements (i.e. piano staff), not as separate parts

SmartScore Pro

  • Pickup measures are padded to full measures with <forward> ⇒ They count towards the measure number!
  • Mid-measure repeats cause one full measure before the repeat (padded by <forward>) and another full measure for the second part of the original measure (again padded by <forward>). This also breaks the measure numbers and insert unneccessary spaceing into the score.
  • Titles, Composer, etc. are not detected as such and are put as ordinary <words> markup inside a <direction> element
  • Full-measure repeats are not exported to MusicXML, so there is no way to detect really empty measures as opposed to full-measure rests.

Capella files from Hausmusik.ch

http://www.hausmusik.ch provides scores (written in Cappella) as PDF and MusicXML files. Unfortunately, it seems that the MusicXML files are full of small issues which make the converted lilypond files of limited use (or rather, make the results of the conversion look quite wrong sometimes). These issues include:

  • Even single eighth or sixteenth notes get a <beam number=„1“>begin</beam>, so in lilypond they are beamed with the subsequent notes, while in the PDF they are not. This happens for example in Bach's Choral 1 (measure 24, staff 1, voice 2). Similarly, two eighth notes with a quarter in between appear beamed in lilypond instead of simply having a flag (measure 8, staff 1, voice 2)
  • Sometimes beams are not ended, making subsequent flagged notes in lilypond appear with a beam instead of a flag. This happens e.g. in Bach's Choral 1 (measure 5/6, staff 2, voice 1)
  • Clef and key changes are inserted into the MusicXML even when they are not necessary. This happens e.g. in Bach's Choral 1 (measures 7 and 27)
  • Some notes have the attribute print-object=„no“ in MusicXML (indicating that the note should not appear), while the PDF file shows this note. This is e.g. the case in Bach's Choral 1 (measure 9 and 10, staff 1, voice 1)
 
musicxml2ly.txt · Zuletzt geändert: 2007/12/11 15:46 von reinhold
 
Recent changes RSS feed Creative Commons License Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki