
LilyPond and Alternative Music Notations:
Information for Developers
LilyPond offers native support for chromatic-staff notation systems. See our LilyPond wiki page which has the most current documentation.
This page has detailed information for programmers and anyone who is interested in what is going on "under the hood" with Kevin Dalley's work for chromatic staves and alternative music notation systems in LilyPond. Most of the information below originally came from Kevin's website.
If you have any questions, or would like to help contribute to this effort, please contact us. See also: Participating in LilyPond development
Enhancing LilyPond to support chromatic staff notation systems
This project began as a set of patches initially written by Kevin Dalley (for use with LilyPond version 2.11.0), which provide basic chromatic staff functionality. Much of Kevin's work has been incorporated into Lilypond, as you can see here. His patch for internal-ledger-lines has been submitted but needs some more work before being added to LilyPond. We are interested in getting this patch included in LilyPond, and would love to see someone take this on.
Mark Hanlon updated Kevin's patches to work with a more recent version of LilyPond (2.11.45). To help organize and facilitate future work, Andrew Wagner set up a git repository for the patches and additional files on github.com. This is where the most recent version of Kevin's code is now located: http://wiki.github.com/drewm1980/lilypond-an/
Using this git repository will make it easier for developers to work with Kevin's code. Also, since the code will share git history with LilyPond, it will be easier to keep it compatible with newer versions of LilyPond. It will also make it easier to contribute this code to the official LilyPond application.
Compiling Kevin's enhanced version of LilyPond from source code
If you are interested in the parts of Kevin's code that has not been incorporated into LilyPond, you can try compiling it from source code. This is not advised and is very difficult. To try it out you will need to be confident at package management and resolving build errors/conflicts due to bad/missing libraries. Currently, Debian Linux is the supported build environment, and there is no binary distribution.
For more information see the wiki of the github repository:
http://wiki.github.com/drewm1980/lilypond-an/
How different alternative notation systems are defined and supported
Supported notation systems are defined in a table that is contained in the file chromatic.ly. This table makes it possible to quickly transnotate a given music file into any supported notation system. To add support for additional notation systems one would modify the file in order to add more notation systems to the table.
The table contains the following information, which is sufficient to describe a wide range of systems. This information would be needed for any notation system that was to be added.
- staff
- A numeric list of each staff line position in an octave.
- ledger
- A numeric list of each ledger line position in an octave.
- middleCPosition
- A number stating the position of middle C. (This lets you shift all the pitches of the staff up or down by changing the center pitch to a higher or lower note.)
- g-clef-from-c
- The numeric distance between C and G, which is where the G clef is positioned.
- positions-per-octave
- The number of distinct positions in an octave.
- layout
- Describes how notes are positioned. Currently either "semitone" or "twinline".
- shape-note-styles
- For notations which have changing noteheads, a list of each notehead for each of the 12 semitones, starting with C.
The notation systems that are currently supported (and included in the table) are listed on the LilyPond for Alternative Music Notations page. More systems could be easily added, but some systems cannot yet be fully supported since certain features are not yet possible. For example, automatically using notehead color for pitch, bold or dotted staff lines, or automatically placing notes on a particular side of the stem.
Note that the average user does not have to be able to read or modify the chromatic.ly file and its table of notations. Once a notation system has been set up, any user can transnotate music into it by calling it from the template file, as described on our Information for Users page.
Note that the chromatic.ly file also allows the use of "lower-octave" and "upper-octave" in the template file, see Information for Users. This provides the octave number of the lowest octave and highest octave displayed for a continuous staff.
To Do List
This is Kevin's list of things still to be completed. They are listed in roughly the order he considered to be most important, with later items in the list less precisely ordered than the earlier items.
- Center time-signature-engraver and rests when staff is not at 0.
- Investigate non-standard note heads.
(See note-head-solfa.ly, Shape note heads, Note head styles, and The Feta Font.)
- Add a LilyPond conversion file which makes clef and key commands do nothing, or at least be consistent with alternative notations.
- Add other notation systems with standard note heads.
- Allow a notehead to be either hollow or solid (white or black) according to the note's pitch, for notations that require this.
- Add dotted staff lines.
- Allow multiple clefs.
- Allow for non-standard stems.
- Drop octaves which are unused for several measures.
- Make conversion between notations easier.
This is an incomplete list of just a few of the items that Kevin completed:
- Allow arbitrary center point for staves, which allows other notations
similar to 6-6 Tetragram.
- Make creation of arbitrary size staves easier. (In progress).
- check for 8va and 15ma signs, or some type of register signs for alternative notations.
If you would like to help contribute to this effort, please contact us.