lilypond workflow

I am working on a different workflow for creating new SATB scores in lilypond. It involves 3 templates:


The idea behind these files comes from what programmers call “separation of concerns” or SOC and it helps immensely in maintainability and readability of code. You keep the content you want to share separate from the markup you would use to share it.

In lilypond it can get quite overwhelming when you’re working on a project and you have all of these pieces interspersed with each other. At first I tried separating everything out: a file for the header information, another for layout, a separate file for each instrument, etc. Then you bring them all back together with a bunch of \include statements to create the final score. The problem I had with this approach is I always had to have so many files open while I was working out an arrangement. I ended up going back to one single file because it was too frustrating.

But having it all in one file means you have to look at a lot of text that never needs to change, or at least rarely changes. That’s how I came to my current solution. Here’s how it works.

First, I create a new file using the ‘’ template. It contains all the information about how to compile a score with my customized ‘house look’ as well as some dummy data for the instruments/voices in the score. I then save that file in a new project folder (..\newScore) with the name of my project (

Next, I create another new file from the ‘’ and save it in the same folder. This file is just for things that are unique to this piece: Title, Composer, Arranger, all the notes for each part, etc. With these two files open I set the first file to be the one that compiles (this is a nice feature in Frescobaldi) since it puts all the \score information together.

Once I am satisfied that I have the arrangement complete, ie. notes, lyrics, markings, etc., I create another new file, this time with the ‘’ template and give it a name like ‘’ to distinguish it from the first file. (I suppose I could give it the same name as the first and overwrite it but I don’t see the need to do that right now.) This last template is much like the first only it includes a title page and other formatting to make the score ready to send off to the printer for publication. This stuff I don’t need to see while I am in ‘production’ mode but it gives it that final touch that customers expect when purchasing new music.

The best thing about this whole process of separating content from markup is that at some point, if I decide I need to change or update my ‘house style’ it is a simple matter of dropping the latest version of ‘’ or ‘’ into my folder, give it a name and I’m all set. The other methods I’ve used have made updating the look of previous scores just enough of a hassle that I didn’t even want to consider doing it.

Leave a Comment