At the Sounding Edge: LilyPond, Part 1
LilyPond provides import filters for files created by abc Finale, and Mup, as well as MIDI, MuseData and certain XML-formatted files. These filters work in varying degrees, and there usually is some amount of manual editing required after importing a file in one of those formats to LilyPond. The LilyPond documentation includes suggestions for using each filter optimally, and the reader is advised to study the current documentation for the latest directions for their best use.
The midi2ly utility provides a good example. It's simple to use, following this basic syntax midi2ly [OPTIONS] foo.mid. However, as with all MIDI-to-notation conversion programs, you must take extra care with your original MIDI file for the best results from midi2ly. Unquantized MIDI recordings are unlikely to render well, and you should quantize both start-times and durations. The utility currently does not transcribe polyphonic music on a single staff, so you may need to split your MIDI data into individual tracks and channels, treating each track/channel as a LilyPond voice. You may need to assign all tracks to the same MIDI channel, and you should save your work as a Type 1 standard MIDI file. Type 0 MIDI files put all data into a single track, defeating midi2ly's efforts at separating parts.
Figure 4 illustrates the results from the conversion of a simple 2-track MIDI sequence. Notice that in the second measure of the upper staff there is a misaligned half-note. The notation is supposed to be two-tied quarter notes, easy enough to repair with a little manual correction. Figure 5 displays the corrected score, with header information (title, author, date) and a cautionary accidental added to the final G in the lower staff.
My experiments with the other LP import filters yielded similar results. In some cases I could produce a valid LY file with the convert-ly utility by adding this line to the invalid file: \version "1.8". I then could bring the file up to date by processing it with convert-ly:
convert-ly filtered-foo.ly > converted-foo.ly
The converted file should be ready for processing with the LilyPond compiler, but some manual formatting and repair still may be required.
Next month, I'll introduce the LilyPond support found in Rosegarden, NoteEdit and Denemo.
Dave Phillips (firstname.lastname@example.org) is a musician, teacher and writer living in Findlay, Ohio. He has been an active member of the Linux audio community since his first contact with Linux in 1995. He is the author of The Book of Linux Music & Sound, as well as numerous articles in Linux Journal.
Similis sum folio de quo ludunt venti.
7 hours 46 min ago
- Thanks for clearing that up.
13 hours 9 min ago
- Nice coding on the cake. I
1 day 41 min ago
- Baker's identity
1 day 5 hours ago
- Uber jealous
1 day 10 hours ago
- Reality is disapointing
1 day 21 hours ago
- Máy sấy quần áo
1 day 23 hours ago
- Services on GlusterFS
1 day 23 hours ago
- Reply to comment | Linux Journal
2 days 1 hour ago
- Definitely cool stuff here
2 days 2 hours ago