#### 3.2.2 Octave check

Octave checks make octave errors easier to correct: a note may be followed by `=`quotes which indicates what its absolute octave should be. In the following example,

         \relative c'' { c='' b=' d,='' }

the d will generate a warning, because a d” is expected, but a d' is found. In the output, the octave is corrected for this and the following notes.

There is also a syntax that is separate from the notes.

         \octave pitch

This checks that pitch (without octave) yields pitch (with octave) in \relative mode. If not, a warning is printed, and the octave is corrected, for example, the first check is passed successfully. The second check fails with an error message. The octave is adjusted so the following notes are in the correct octave once again.

         \relative c' {
           e
           \octave a'
           \octave b'
         }

The octave of a note following an octave check is determined with respect to the note preceding it. In the next fragment, the last note is a `a'`, above middle C. Hence, the `\octave` check may be deleted without changing the meaning of the piece.

>          \relative c' {
>            e
>            \octave b
>            a
>          }

Read comments on this page, or add one. This page is for LilyPond-2.2.2 (stable-branch).