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 (email@example.com) 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.
|Privacy Is Personal||Jul 02, 2015|
|July 2015 Issue of Linux Journal: Mobile||Jul 01, 2015|
|July 2015 Video Preview||Jul 01, 2015|
|PHP for Non-Developers||Jun 30, 2015|
|A Code Boot Camp for Underprivileged Kids||Jun 30, 2015|
|Comprehensive Identity Management and Audit for Red Hat Enterprise Linux||Jun 29, 2015|
- Privacy Is Personal
- PHP for Non-Developers
- Secure Server Deployments in Hostile Territory
- Linux Kernel 4.1 Released
- Django Templates
- July 2015 Issue of Linux Journal: Mobile
- Comprehensive Identity Management and Audit for Red Hat Enterprise Linux
- A Code Boot Camp for Underprivileged Kids
- Practical Books for the Most Technical People on the Planet
- Attack of the Drones