#### 3.2.1 Relative octaves

Octaves are specified by adding `'` and `,` to pitch names. When you copy existing music, it is easy to accidentally put a pitch in the wrong octave and hard to find such an error. The relative octave mode prevents these errors: a single error puts the rest of the piece off by one octave

           \relative startpitch musicexpr

The octave of notes that appear in musicexpr are calculated as follows: If no octave changing marks are used, the basic interval between this and the last note is always taken to be a fourth or less. This distance is determined without regarding alterations; a `fisis` following a `ceses` will be put above the `ceses`.

The octave changing marks `'` and `,` can be added to raise or lower the pitch by an extra octave. Upon entering relative mode, an absolute starting pitch must be specified that will act as the predecessor of the first note of musicexpr.

Here is the relative mode shown in action

>          \relative c'' {
>            b c d c b c bes a
>          }

Octave changing marks are used for intervals greater than a fourth

>          \relative c'' {
>            c g c f, c' a, e''
>          }

If the preceding item is a chord, the first note of the chord is used to determine the first note of the next chord

>          \relative c' {
>            c <c e g>
>            <c' e g>
>            <c, e' g>
>          }

The pitch after the `\relative` contains a note name. To parse the note name as a pitch, it must surrounded by `\notes`

The relative conversion will not affect `\transpose`, `\chords` or `\relative` sections in its argument. If you want to use relative within transposed music, you must place an additional `\relative` inside the `\transpose`.

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