Node: Octave entry, Next: , Previous: More about pitches, Up: Tutorial



Octave entry

To raise a note by an octave, add a high quote ' (apostrophe) to the note name, to lower a note one octave, add a "low quote" , (a comma). Middle C is c':

          c'4 c'' c''' \clef bass c c,
          

[picture of music]



An example of the use of quotes is in the following Mozart fragment:

       \key a \major
       \time 6/8
       cis''8. d''16 cis''8 e''4 e''8
       b'8. cis''16 b'8 d''4 d''8
     

[picture of music]

This example shows that music in a high register needs lots of quotes. This makes the input less readable, and it is a source of errors. The solution is to use "relative octave" mode. In practice, this is the most convenient way to copy existing music. To use relative mode, add \relative before the piece of music. You must also give a note from which relative starts, in this case c''. If you do not use octavation quotes (i.e. do not add ' or , after a note), relative mode chooses the note that is closest to the previous one. For example, c f goes up while c g goes down:

          \relative c'' {
            c f c g c
          }
          

[picture of music]



Since most music has small intervals, pieces can be written almost without octavation quotes in relative mode. The previous example is entered as

     \relative c'' {
       \key a \major
       \time 6/8
       cis8. d16 cis8 e4 e8
       b8. cis16 b8 d4 d8
     }
     

[picture of music]

Larger intervals are made by adding octavation quotes.

          \relative c'' {
            c f, f c' c g' c,
          }
          

[picture of music]



Quotes or commas do not determine the absolute height of a note; the height of a note is relative to the previous one. For example: c f, goes down; f, f are both the same; c' c are the same; and c g' goes up:

Here is an example of the difference between relative mode and "normal" (non-relative) mode:

          \relative a {
          \clef bass
            a d a e d c' d'
          }
          

[picture of music]



          \clef bass
            a d a e d c' d'
          

[picture of music]



For more information on Relative octaves see Relative octaves and Octave check.


This page is for LilyPond-2.0.1 (stable-branch).

Report errors to <bug-lilypond@gnu.org>.