3 Octaves -- how to do pitches
7 The LilyPond input language, Mudela (help, silly name), should be easy
8 to read and write. In my experience Mudela is already quite convenient
9 for entering music. Every time I've entered a substantial piece of music,
10 however, I found that I made quite a few mistakes. The MIDI output helps
11 a lot with locating and correcting the errors. There's one type of error
12 that seems to be frequent, stubborn and hard to catch, and that's the
13 octavation error. The relative octave feature is an attempt to make
14 Mudela a bit easier to write. In addition, this feature makes it harder
15 to make octavation mistakes, yet if you made one, its a lot simpler to find
21 it()forget the old "\octave c';" command
22 it()forget the old octave boundaries with octaves c .. c'
25 You can enter a piece of music in relative mode, by typing
28 \melodic \relative c { ... }
31 From then on, the pitch of a note will be the closest to the last one,
32 assuming that large intervals are a lot more rare than small ones.
33 Thus, you can enter a scale without using octavation quotes:
39 the last c being an octave higher than the first. If you have to
40 enter an interval that is greater than a fourth, you must specify
41 whether the pitch goes up, using post-quotes:
48 or down, using pre-quotes:
57 To convert a piece of music from the old absolute-octave notation to
58 relative octaves, lilypond provides the bf(-Q, --find-fourths) feature
59 to locate all big intervals in your music (sorry, fully automated convert
62 First, edit the .ly file, add "\relative c" to all melodic chunks:
65 foo = \melodic \relative c { ... }
68 and remove all "\octave " commands. See the example file
69 file(input/test/find-fourths.ly).
71 Use lily to find the fourths
74 lilypond -Q find-fourths.ly 2>&1 | tee fourths
76 find-fourths.ly:3:18: warning: Interval greater than fourth, relative: g':
78 c b, c g, c f, c c'' c
80 find-fourths.ly:3:20: warning: Interval greater than fourth, relative: c,:
85 Then, load a copy of the original mudela file in your favourite editor,
86 and let it parse the 'error file' file(intervals). First you remove all
87 octavation quotes. Then, jumping from warning to warning, you enter quotes
88 as suggested by LilyPond.