\override Staff.StaffSymbol #'line-positions = #'( 4 2 0 -2 -4 ) A different list of numbers will produce a custom line pattern.
The numbers ( 4 2 0 -2 -4 ) in the line of code below represent the five standard line positions. See Changing the staff line pattern (Staff Symbol Properties). Notes are not placed on a line or space per se, but at a vertical position that may or may not coincide with the vertical position of a line or space.Ī staff’s line pattern can be customized using Staff.StaffSymbol and the line-positions property. In LilyPond the vertical position of notes and the vertical position of staff lines are independent of each other.
(Note: Graham Breed has also shown how to use the ly:set-default-scale scheme function to reposition notes: Dodecaphonic staff snippet) StaffLineLayoutFunction = #(lambda (p) (+ 1 (round (+ -1 (/ (ly:pitch-semitones p) 2))))) See: Snippet: Staves based on a whole tone scale (or other interval)įor Twinline and similar chromatic staves with one note on a line and three in a space, use the following version of the function which uses “banker’s rounding” to get the desired 1-3-1-3-1-3… pattern. Change the number 0 in the formula to 1 (or 2, etc.) to adjust which notes share a line or space (and which are on different lines or spaces). StaffLineLayoutFunction = #(lambda (p) (floor (/ (+ (ly:pitch-semitones p) 0) 2)))įor staves based on other intervals simply change the number 2 in the function above to the number of semitones in the interval you want. (Thanks to Graham Breed for this function.)
TwinNote music notation demo - PDF file - LilyPond file (.ly).Twinline music notation demo - PDF file - LilyPond file (.ly).Custom note head styles (shapes) demo - PDF file - LilyPond file (.ly).
Chromatic staves demo, showing various line patterns and note layouts - PDF file - LilyPond file (.ly).These are some older demo files that are inferior to those shown above. Voilà! You now have a PDF of music in an alternative notation system. Otherwise the notes may not appear in the expected places on the staff.
Enter “ \set Staff.middleCPosition = #18” just after any instances of “ \clef bass” in the music file. Twinline, TwinNote), then you may need to make the following adjustment for any bass clefs that appear in the music.
Download the MNP-scripts.ly file above and put it in the same directory as your music file.There are basically just a few steps to use an existing traditional LilyPond music file to create a PDF of music in an alternative notation system: MNP-music-demo.pdf - LilyPond’s PDF output from the MNP-music-demo.ly file.MNP-music-demo.ly - A LilyPond music file demonstrating the use of the MNP-scripts.ly file.MNP-scripts.ly - A LilyPond file containing LilyPond and Scheme code that supports alternative music notation systems.These files demonstrate the use of the specific “lower-level” techniques documented below. The following files can be used to produce music in a number of alternative music notation systems. This page documents how to use LilyPond with alternative music notation systems with a chromatic staff. This opens the door to a world of customization without having to alter LilyPond’s source code. It is designed so that its output can be modified using the Scheme programming language. One of LilyPond’s strengths is its flexibility.
Lilypond is free, open-source music notation software that can be used to create sheet music in alternative notation systems.