A better way to do it?

For quite a few years now, I’ve been using Lilypond as my software of choice for any music-notation-related tasks.

As well as being incredibly powerful (and fairly straightforward to get a basic handle on, at least for someone who had  quite a bit of previous experience typesetting mathematics in LaTeX, using a text editor; LaTeX and Lilypond have a lot in common, at least conceptually speaking), it has the attractive feature of being completely free.

The basic idea of Lilypond (which aims to be “a program that creates beautiful sheet music following the best traditions of classical music engraving”) is that you prepare a text file containing a description of the music that you want to typeset, written in a text-based notation complete with various markup commands, and then feed it through a processor that churns out a beatifully formatted page (or many pages, although I’ve usually only used it for fairly short pieces) of music.  The Lilypond website has plenty more detail if you want to know more about how it works.  One of the benefits is that you can easily do things such as transposing an entire piece of music into a different key, often with a single instruction (in fact one of my main uses for Lilypond is where I have a piece of music in one key that I need to transpose into another, either to make it a better pitch for singing or playing or to provide a copy for transposing instruments to use).  As well as producing PDF sheet music, you can get it to output midi files and I think there are converters available to turn Lilypond source into various other formats, although I’ve so far only ever had need for the basic PDF output.

This is somewhat different from most sheet-music editing software I’ve seen, which tends to take a WYSIWYG approach to the task, complete with a snazzy graphical interface. That’s all very well and good but one thing I particularly like about Lilypond (similarly to LaTeX for more general, mathematical or other tech-related typesetting tasks in contrast to a word processor; indeed, there is at least one music extension for LaTeX (or more accurately for TeX, for which LaTex itself is an extension), though I’ve not explored it) is the power  and (paradoxically, once you’ve ascended a shortish, if rather steep, learning curve) the simplicity, you get with the text-based approach, leaving actual realisation details to the processor unless you specifically need to over-ride them (OK, so the learning curve is actually potentially pretty long but it’s not so steep after the initial shock and you don’t need to master that much of the system to be able to do quite a bit of useful stuff).  Therefore, despite once or twice having a quick look at Denemo, a graphical front-end for Lilypond, I’ve always stuck with using my text editor of choice (usually either Vim or Emacs) and running my source files manually through the Lilypond processor.

However, the other day I came across another tool which seems to take a midway approach between the text-editor/CLI approach and the GUI one.  This is Frescobaldi, a “lightweight, yet powerful LilyPond music and text editor with a built-in PDF viewer”.  What you get is essentially a text editor that, while lacking many of the heavyweight features of Vim or Emacs, seems to have plenty of capability for editing Lilypond source code (including much nicer syntax highlighting than I’ve found for Lilypond in either of those editors – this is a very useful feature that has on many occasions helped me to find minor punctuation errors that have caused processing of the entire file to grind to a halt) and the ability to quickly generate a PDF file at the touch of a button; the PDF version is visible in a window to the side of the source file (and the processor log is visible just below it, which is also handy for debugging purposes), so you can see mistakes, edit them and have another run with the processor.  At least for smallish files, this is pretty close to real-time editing of the actual output files and retains the benefits of direct access to the source.  There are some other handy features too, such as autocompletion of function/variable names and a Lilypond help browser on hand (both of which are very useful as there’s quite a lot of stuff to keep track of and it can be difficult to remember the exact name or syntax of a given command).

In theory, Frescobaldi is probably a sufficiently powerful editor to be useful for other tasks than Lilypond editing.  However, it is very much optimised for that task and I’m unlikely to start using it for more general purposes (and I’m certainly not keen to give up the power of Vim for most of my text editing tasks).  The big question is whether the benefits brought by Frescobaldi for the purpose of Lilypond editing outweigh the loss of the Vim power-features that aren’t there.  So far the answer seems to be a resounding “yes”, so I think that Frescobaldi is likely to remain my tool of choice for Lilypond work for some time to come.

Incidentally the programme is named after Girolamo Frescobaldi, an early baroque composer known chiefly for his keyboard work, who was apparently quite a significant influence on later composers (including Bach himself).

 

 

Advertisements
Next Post
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: