Software: LilyPond

LilyPond LogoLilyPond is free, open-source, cross-platform music notation software that can typeset music in TwinNote. All the music available on the Sheet Music page was produced using LilyPond.

LilyPond runs on Linux, Mac OS X, and Windows and is “devoted to producing the highest-quality sheet music possible.” It is also highly customizable, letting you re-assign notes/pitches to different positions on the staff, modify note head shapes, change a staff’s line pattern, etc. This makes LilyPond ideal for creating sheet music in TwinNote or for translating existing music from traditional notation into TwinNote. (Finale is another option.)

On this page:

LilyPond has a text-based interface rather than a graphical user interface. LilyPond files are just plain text files written in LilyPond syntax and named using the “.ly” extension. Working with LilyPond is kind of like modifying a webpage by editing the HTML text file that web browsers use to display the page.

Frescobaldi is a text editor designed specifically for use with LilyPond that offers a lot of really nice features like PDF preview, midi playback, text highlighting, auto-complete, etc. It really helps make LilyPond easier to use and learn.  Highly recommended! (Shikkers List is a graphical interface for LilyPond worth watching.)

Creating Sheet Music with TwinNote Template Files

To create sheet music in TwinNote from scratch start with one of these template files.  They are TwinNote versions of some of the official LilyPond Template Files, and they use an external “” file that should be located in the same directory as the template file(s) for them to work (see \include). (This makes it easier to update the scripts file in one place without having to go back and change each music file that you have created.) Use LilyPond 2.17.29 or higher for best results.

By default the templates show TwinNote’s alternative key signatures and accidental signs. If you would rather not use them for some reason, just delete the “%” at the beginning of the following line(s) in the template file:

% \remove Accidental_engraver
% \remove Key_engraver

Restore the “%” to show them again. (In a LilyPond file a “%” signals that the rest of the line is a comment, which is ignored when the score is rendered.)

You can increase or decrease the size of the staff by deleting the “%” before:

% \staffSize 2

And then change the value of the number. Positive numbers will increase the size of the staff while negative numbers will decrease it.

Converting Standard LilyPond Files to TwinNote

This is similar to using the TwinNote template files above.  Just follow these steps:

1. Start with a standard “.ly” LilyPond music file.  It should be for LilyPond version 2.17.29 or higher.  If it is for an earlier version update it using using convert-ly.  You can download sheet music as LilyPond files from the Mutopia Project for free, although most of these files will require updating using convert-ly.

2. Put the LilyPond music file in the same directory (folder) as the file.

3. Add the following line near the top of the LilyPond music file.  This includes the code from the file that renders the music in TwinNote (see \include).

\include ""

4. In the LilyPond music file find any occurrences of \new Staff or \context Staff and change them to \new StaffTwinNote or \context StaffTwinNote.  This converts those staves from standard staves to TwinNote staves.

5. Finally, typeset the file just like any LilyPond file.  This should produce a PDF in TwinNote.  Use LilyPond 2.17.29 or higher for best results.

Using a Different TwinNote Note Head Style

There are a few different styles available for TwinNote note heads that have slightly different shapes (see image below).  To use one of these different note head styles:

  1. Download this file
  2. Put it in the same directory as the file
  3. \include it in your LilyPond music file, just like the file
  4. Add “\NoteHeadStyle II 1.0” to your file. Here’s an example of typical use:

\new StaffTwinNote \with { \NoteHeadStyle II 1.0 }

The roman numeral (II above) selects the style.  There are currently four styles in addition to the standard style (I, II, III, IV). The number (1.0 above) lets you adjust the width of the note heads.  Use 1.0 for the standard width, or change it to something like 1.1 or 0.9 to experiment with slightly wider or narrower note heads.  You can also adjust the width of the default style by using “Default” in place of the roman numeral.

Here is an illustration of all the different styles:


More Examples and Documentation

See Sheet Music for more examples of music typeset in TwinNote using LilyPond.

Further documentation on using LilyPond with TwinNote and other alternative notation systems is available on the LilyPond page of the Music Notation Project Wiki.

Here are some links to LilyPond documentation:

Please contact us if you are interested in using LilyPond to create sheet music in TwinNote. If there is a piece of music you would like to see in TwinNote, we can help. See Sheet Music for more details.