At the Sounding Edge: LilyPond, Part 1

An introduction to this music notation software for Linux.
The LilyPond Import Filters

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.

Figure 4. A MIDI File Converted to LilyPond Format

Figure 5. Output from the Corrected File

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 (dlphilp@bright.net) 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.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: At the Sounding Edge: LilyPond, Part 1

Anonymous's picture

Musical Notation has not only evolved over centuries, it is also facing numerous dilemmas: Instruction to the performer vs. compositional concept, difficulties with tuning systems, and so on. I own about 6 kilograms of books about the subject, so I am not surprised that there can be fiery discussions about notation programs.

My favourite tools for notating music will always be some sheets of paper and a 4b pen, and I will never touch an eraser when composing or arranging.

Author's reply

Anonymous's picture

I agree, music notation has become a wildly tangled garden, and it is indeed a difficult thing to come up with a program that could satisfy all possible demands.

Btw, your last comment reminded me of Morton Feldman's statement that he always composed with pen & ink. He claimed it made him really think about whether he should write down what he was considering...

Best,

dp

Re: At the Sounding Edge: LilyPond, Part 1

Anonymous's picture

An archive of folk tunes in LilyPond format is at http://sniff.numachi.com/~rickheit/dtrad/.

no comments

Anonymous's picture

no comments

LilyPond formated archive

Anonymous's picture

Unfortunately, the site owner at http://sniff.numachi.com/~rickheit/dtrad/ no longer provides songs in the LilyPond format.

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix