Software: LilyPond

LilyPond Logo

On this page:

About LilyPond

LilyPond:
  • Is music notation software that can create sheet music in Clairnote SN music notation.
  • Is free to download and use.
  • Runs on all major desktop operating systems (Windows, macOS, and GNU/Linux).
  • Can be used via web apps like LilyBin + Clairnote (also HackLily and LilyBin ).
  • Can convert MusicXML, ABC, and MIDI files into LilyPond files.
  • Is highly customizable, making it an excellent tool for creating sheet music in alternative notation systems.
  • Is "devoted to producing the highest-quality sheet music possible".
  • Is free software and part of the GNU project .

LilyPond has a text-based interface rather than a graphical user interface. (Like LaTeX but for sheet music.) LilyPond files are simply plain text files written in LilyPond syntax and named using the ".ly" file extension. Learn more about LilyPond at lilypond.org .

Popular graphical applications like the free and open-source MuseScore (also Finale, Sibelius, and Dorico) can export MusicXML files that can be converted into LilyPond files to produce sheet music in Clairnote SN. For details on using this approach see:

Creating Clairnote SN Sheet Music with LilyPond

Here are two ways to use LilyPond to create Clairnote SN sheet music:

  • Use LilyBin, a website interface for LilyPond
  • Install LilyPond

LilyBin lets you try LilyPond before installing it and lets you use LilyPond from a tablet or phone. For more extensive use, install LilyPond. Both work for converting existing LilyPond files and for creating new ones from scratch.

Option 1: Use LilyBin

NOTE: LilyBin + Clairnote is not working and needs repair. Please install LilyPond as described in "Option 2" below.

1. Go to LilyBin + Clairnote ( lilybin.clairnote.org ) a version of LilyBin that supports Clairnote SN music notation.

2. Note the \include "clairnote.ly" line at the top of your LilyPond file.

3. Edit and engrave your file (click "Preview") and it will be rendered in Clairnote SN music notation. (For Clairnote SN, you will need to use the unstable (development) version of LilyPond.)

Option 2: Install LilyPond

1. Download and install LilyPond . (The latest stable version is best. Version 2.20 or later should work.)

2. Download and install Frescobaldi (optional but highly recommended). Frescobaldi is an editor designed specifically for use with LilyPond that offers a lot of nice features like PDF preview, text highlighting, auto-complete, midi playback, etc. It helps make LilyPond easier to use and learn.

3. Download the following file (right-click on the link):

clairnote.ly
Released under the GNU General Public License version 3 ( html txt ).
Development: git repo .

4. Open a LilyPond music file (.ly) (using Frescobaldi) and add the following line near the top.

\include "clairnote.ly"

This includes the clairnote.ly file in your LilyPond file, providing additional code that allows LilyPond to render/engrave the file in Clairnote SN music notation. Including a file works the same as if you had cut and pasted the contents of one file into another file (see \include ).

5. Place the clairnote.ly file in the same directory as your LilyPond file(s) or somewhere else where LilyPond can access it (see \include ). In Frescobaldi you can designate a directory that contains files that you want to include and then you can always include those files when using Frescobaldi. To set this up go to Preferences > LilyPond Preferences.

6. Edit your LilyPond file and engrave it with LilyPond. It will be rendered in Clairnote SN music notation.

Note: if you are converting an existing LilyPond file (.ly), make sure it is for LilyPond version 2.19.49 or higher. Look for a \version statement that should be at the top of the file. If it is an earlier version, update the file using convert-ly . (The Mutopia Project offers LilyPond files for free download, but some will need to be updated.)

Clairnote SN Template Files

You may want to use one of these template files to get started. They are just variations on some of the official LilyPond Template Files . Note the line \include "clairnote.ly" at the top.

By default these templates show Clairnote SN 's alternative key signatures and accidental signs. If you would rather not use them, 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.)

Staves Spanning More Than Two Octaves

The standard Clairnote SN staff spans two octaves. For music with a wider pitch range you can optionally use a larger staff with the \cnStaffOctaveSpan command. For example, you might use \cnStaffOctaveSpan 3 for guitar or \cnStaffOctaveSpan 4 for piano. This command should be entered in a staff's \with block or at the very beginning of the music.

To change a staff in the middle of the music – to temporarily extend it up or down an octave to avoid ledger lines – use the commands \cnExtendStaffUp and \cnExtendStaffDown. Then "unextend" the staff with \cnUnextendStaffUp and \cnUnextendStaffDown. See the Staff page for more about staves with different octave ranges.

\new Staff \with {
  \cnStaffOctaveSpan 3
} {
  e4 f g a
  \cnExtendStaffUp
  e''' f''' g''' a'''
  \cnUnextendStaffUp
  a g f e
}

Usually you would use different clefs to change the octaves of the staff, but in some cases you might want to have the clef appear at a different octave on the staff. You can move a clef up or down one or more octaves (bringing all the notes with it) with the \cnClefPositionShift command. The key signature and time signature will also move with the clef. When combined, all these commands make a wide range of staff and clef configurations possible.

\new Staff \with {
  \cnStaffOctaveSpan 3
  \cnClefPositionShift -1
} {
  e4 f g a
  e''' f''' g''' a'''
  a g f e
}

Clairnote SN and Traditional Music Notation in the Same File

Sometimes you may want to produce files that contain music in both Clairnote SN and traditional music notation, say for easy comparison. Instead of the following which will produce a Clairnote SN staff:

\new Staff {
  % music goes here...
}

Use this to produce a traditional staff:

\new TradStaff {
  % music goes here...
}

"TradStaff" is the name of a custom staff context. It tells LilyPond that you want a standard traditional staff instead of a Clairnote SN staff. ( \context TradStaff can also be used where you would use \context Staff)

Notehead Styles

Notehead shapes can be customized with the \cnNoteheadStyle command. (See discussion in this blog post .) Here are the available styles:

C major scale in Clairnote SN music notation with default noteheads
"default"
C major scale in Clairnote SN music notation with lilypond noteheads
"lilypond"
C major scale in Clairnote SN music notation with funksol noteheads
"funksol"

Here's how to change the notehead style for a given staff.

\new Staff \with {
  % options are "funksol" "lilypond" and "default"
  \cnNoteheadStyle "funksol"
} {
  % music goes here...
}

Custom Quarter Tone Accidental Signs

Clairnote SN's quarter-tone and three-quarter-tone accidental signs can be customized with the \cnQuarterToneSharpGlyph and \cnQuarterToneFlatGlyph commands. Any of LilyPond's accidental glyphs can be used. Here is an example that shows how to use these commands to switch to the Gould quarter-tone accidental glyphs.

\new Staff \with {
  \cnQuarterToneSharpGlyph "accidentals.natural.arrowup"
  \cnQuarterToneFlatGlyph "accidentals.flat.arrowup"
} {
  % music goes here...
}

The LilyPond code above produces the following custom accidental signs.

Custom quarter-tone and three-quarter-tone sharp and flat signs in Clairnote SN

Note how the specified quarter-tone glyphs are also used in the three-quarter-tone accidental signs, just as they are in the default accidental signs, which are shown below for reference. The default accidental signs use the Stein-Zimmermann quarter-tone accidental glyphs.

Default Stein-Zimmerman quarter-tone and three-quarter-tone sharp and flat signs in Clairnote SN

Additional options for customization are provided by LilyPond's standard mechanisms for using alternate accidental glyphs (namely the alterationGlyphs property of the Staff context).

See the Accidental Signs page for more about Clairnote SN's microtonal accidentals.

More Examples and Documentation

To use LilyPond you will need to refer to the LilyPond manuals which are quite comprehensive. See Sheet Music for more examples of music typeset in Clairnote SN using LilyPond. The LilyPond page of the Music Notation Project Wiki offers some additional information about using LilyPond with alternative notation systems like Clairnote SN.

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