Monday, November 14, 2011

Text-label your measures in LilyPond with YAML

Some music (especially some choral music) is somewhat irregular of measure length. Naturally with this kind of music, while entering (and editing, following one's musical sense), often measures will join or split. Then half of the measure numbers are thrown off. This is especially true of early music, and recent music whose source documents were prepared somewhat in a free way.

Often, given multiple voice parts (or instruments), each, for various purposes, necessitates several source files in parallel (if working in LilyPond): such as for adjustments to piano or organ reductions. Many features not yet done (completely and automatically) well by LilyPond necessitate these additional parallel files.

Whenever information is parallel, it requires careful synchronizing of all the measures (and measure lengths). What a bother!

Obviously, if humans are checking and synchronizing something (with difficulty), this is a good opportunity for computers to do the work instead. In that situation, I wrote a computer program allowing measures to be labeled by (text) strings, instead of (only) by measure numbers.

The program fills each measure (completely) with spacer rests (unless told otherwise). This eases synchronization, because you need only include measures with actual content.

The program uses YAML as its data entry format. YAML's noise (the extra characters you enter) is very spare. It seems cleanest for entering LilyPond source (it interferes only minimally) yet allows measures to be labeled easily by text strings.

Available on my GitHub (and written in Ruby), the program is called, 'yaml2lilypond'. Recently, I successfully used it to engrave (typset) a large work--and it helped a lot!

Copyright (c) 2011 Mark D. Blackwell.

No comments:

Post a Comment

Thanks for commenting on my post!