\melodic \relative c { ... }
From then on, the pitch of a note will be the closest to the last one, assuming that large intervals are a lot more rare than small ones. Thus, you can enter a scale without using octavation quotes:
c d e f g a b c
the last c being an octave higher than the first. If you have to enter an interval that is greater than a fifth, you must specify whether the pitch goes up, using post-quotes:
c c' % octave up c g' % fifth up
or down, using pre-quotes:
c c, % octave down c f, % fifth down
To convert a piece of music from absolute-octave notation to relative octaves, lilypond provides the -Q, --find-old-relative feature to locate all big intervals in your music.
First, edit the .ly file, add "\relative c" to all melodic chunks:
foo = \melodic \relative c { ... }
and remove all "\octave " commands. See the example file input/test/find-fifths.ly.
Use lily to find the fifths:
lilypond -Q find-fifths.ly 2>&1 | tee fifths ... find-fifths.ly:3:18: warning: Interval greater than fourth, relative: g': c d c f c g c b, c g, c f, c c'' c find-fifths.ly:3:20: warning: Interval greater than fourth, relative: c,: c d c f c g c b, c g, c f, c c'' c
Then, load a copy of the original mudela file in your favourite editor, and let it parse the 'error file' intervals. First you remove all octavation quotes. Then, jumping from warning to warning, you enter quotes as suggested by LilyPond.
Please send GNU LilyPond questions and comments to gnu-music-discuss@gnu.org.
Please send comments on these web pages to
(address unknown),
send other FSF & GNU inquiries and questions to
Copyright (c) 1997, 1998, 1999 Han-Wen Nienhuys and Jan Nieuwenhuizen.
Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved.