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.
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems
Join editor Bill Childers and Bit9's Paul Riegle on April 27 at 12pm Central to learn how to keep your Linux systems secure.
Free to Linux Journal readers.Register Now!
|diff -u: What's New in Kernel Development||Aug 20, 2014|
|Security Hardening with Ansible||Aug 18, 2014|
|Monitoring Android Traffic with Wireshark||Aug 14, 2014|
|IndieBox: for Gamers Who Miss Boxes!||Aug 13, 2014|
|Non-Linux FOSS: a Virtualized Cisco Infrastructure?||Aug 11, 2014|
|Linux Security Threats on the Rise||Aug 08, 2014|
- diff -u: What's New in Kernel Development
- NSA: Linux Journal is an "extremist forum" and its readers get flagged for extra surveillance
- Security Hardening with Ansible
- New Products
- Tech Tip: Really Simple HTTP Server with Python
- Monitoring Android Traffic with Wireshark
- [<Megashare>] Watch Mrs Brown's Boys Movie Online Full Movie HD 2014
- Returning Values from Bash Functions
- RSS Feeds
- Raspberry Pi: the Perfect Home Server