[ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
[ < Absolute octave entry ] | [ Up : Writing pitches ] | [ Accidentals > ] |
Relative octave entry
Absolute octave entry requires specifying the octave for every single note. Relative octave entry, in contrast, specifies each octave in relation to the last note: changing one note’s octave will affect all of the following notes.
Relative note mode has to be entered explicitly using the
\relative
command:
\relative startpitch musicexpr
In relative mode, each note is assumed to be as close to the
previous note as possible. This means that the octave of each
pitch inside musicexpr
is calculated as follows:
- If no octave changing mark is used on a pitch, its octave is calculated so that the interval with the previous note is less than a fifth. This interval is determined without considering accidentals.
- An octave changing mark
'
or,
can be added to respectively raise or lower a pitch by an extra octave, relative to the pitch calculated without an octave mark. - Multiple octave changing marks can be used. For example,
''
and,,
will alter the pitch by two octaves. - The pitch of the first note is relative to
startpitch
.startpitch
is specified in absolute octave mode. Which choices are meaningful?- an octave of
c
Identifying middle C with
c'
is quite basic, so finding octaves ofc
tends to be straightforward. If your music starts withgis
abovec'''
, you’d write something like\relative c''' { gis' … }
- an octave of the first note inside
Writing
\relative gis''' { gis … }
makes it easy to determine the absolute pitch of the first note inside.- no explicit starting pitch
The form
\relative { gis''' … }
serves as a compact version of the previous option: the first note inside is written in absolute pitch itself. (This happens to be equivalent to choosingf
as the reference pitch.)
The documentation will usually employ the last option.
- an octave of
Here is the relative mode shown in action:
\relative { \clef bass c d e f g a b c d e f g }
Octave changing marks are used for intervals greater than a fourth:
\relative { c'' g c f, c' a, e'' c }
A note sequence without a single octave mark can nevertheless span large intervals:
\relative { c f b e a d g c }
When \relative
blocks are nested, the innermost
\relative
block starts with its own reference pitch
independently of the outer \relative
.
\relative { c' d e f \relative { c'' d e f } }
To use absolute mode inside of \relative
, put the absolute
music inside \fixed c { … }
and the absolute
pitches will not affect the octaves of the relative music:
\relative { c'4 \fixed c { f'' g'' } c | c4 \fixed c'' { f g } c }
\relative
has no effect on \chordmode
blocks.
\new Staff { \relative c''' { \chordmode { c1 } } \chordmode { c1 } }
\relative
is not allowed inside of \chordmode
blocks.
Music inside a \transpose
block is absolute unless a
\relative
is included.
\relative { d' e \transpose f g { d e \relative { d' e } } }
If the preceding item is a chord, the first note of the chord is
used as the reference point for the octave placement of a
following note or chord. Inside chords, the next note is always
relative to the preceding one. Examine the next example
carefully, paying attention to the c
notes.
\relative { c' <c e g> <c' e g'> <c, e, g''> }
As explained above, the octave of pitches is calculated only with the note names, regardless of any alterations. Therefore, an E-double-sharp following a B will be placed higher, while an F-double-flat will be placed lower. In other words, a double-augmented fourth is considered a smaller interval than a double-diminished fifth, regardless of the number of semitones that each interval contains.
\relative { c''2 fis c2 ges b2 eisis b2 feses }
In complex situations, it is sometimes useful to get back to a
certain pitch regardless of what happened before. This can be
done using \resetRelativeOctave
:
\relative { << { c''2 d } \\ { e,,2 f } >> \resetRelativeOctave c'' c2 }
See also
Music Glossary: fifth, interval, Pitch names.
Notation Reference: Octave checks.
Snippets: Pitches.
Internals Reference: RelativeOctaveMusic.
[ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
[ < Absolute octave entry ] | [ Up : Writing pitches ] | [ Accidentals > ] |