[ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
[ < Pitches ] | [ Up : Pitches ] | [ Absolute octave entry > ] |
1.1.1 Writing pitches
This section discusses how to input pitches. There are two different ways to place notes in octaves: absolute and relative mode. In most cases, relative mode will be more convenient.
Absolute octave entry | ||
Relative octave entry | ||
Accidentals | ||
Note names in other languages |
[ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
[ < Writing pitches ] | [ Up : Writing pitches ] | [ Relative octave entry > ] |
Absolute octave entry
A pitch name is specified using lowercase letters a
through g
. The note names c
to b
are
engraved in the octave below middle C.
{ \clef bass c4 d e f g4 a b c d4 e f g }
Other octaves may be specified with a single quote ('
)
or comma (,
) character. Each '
raises the
pitch by one octave; each ,
lowers the pitch by an
octave.
{ \clef treble c'4 e' g' c'' c'4 g b c' \clef bass c,4 e, g, c c,4 g,, b,, c, }
Common octave marks can be entered just once on a reference pitch
after \fixed
placed before the music. Pitches inside
\fixed
only need '
or ,
marks
when they are above or below the octave of the reference pitch.
{ \fixed c' { \clef treble c4 e g c' c4 g, b, c } \clef bass \fixed c, { c4 e g c' c4 g, b, c } }
Pitches in the music expression following \fixed
are
unaffected by any enclosing \relative
, discussed next.
See also
Music Glossary: Pitch names.
Snippets: Pitches.
[ << 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 } }
\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 >> ] |
[ < Relative octave entry ] | [ Up : Writing pitches ] | [ Note names in other languages > ] |
Accidentals
Note: New users are sometimes confused about accidentals and
key signatures. In LilyPond, note names specify pitches; key
signatures and clefs determine how these pitches are displayed.
An unaltered note like c
means ‘C natural’,
regardless of the key signature or clef. For more information,
see
Pitches and key signatures.
A sharp pitch is made by adding is
to the note
name, and a flat pitch by adding es
. As you
might expect, a double sharp or double flat
is made by adding isis
or eses
. This syntax is
derived from Dutch note naming conventions. To use other names
for accidentals, see Note names in other languages.
\relative c'' { ais1 aes aisis aeses }
A natural pitch is entered as a simple note name; no suffix is required. A natural sign will be printed when needed to cancel the effect of an earlier accidental or key signature.
\relative c'' { a4 aes a2 }
Quarter tones may be added; the following is a series of Cs with increasing pitches:
\relative c'' { ceseh1 ces ceh c cih cis cisih }
Normally accidentals are printed automatically, but you may also
print them manually. A reminder accidental can be forced by
adding an exclamation mark !
after the pitch. A
cautionary accidental (i.e., an accidental within parentheses) can
be obtained by adding the question mark ?
after the
pitch.
\relative c'' { cis cis cis! cis? c c c! c? }
Accidentals on tied notes are only printed at the beginning of a new system:
\relative c'' { cis1~ 1~ \break cis }
Selected Snippets
Hiding accidentals on tied notes at the start of a new system
This shows how to hide accidentals on tied notes at the start of a new system.
\relative c'' { \override Accidental.hide-tied-accidental-after-break = ##t cis1~ cis~ \break cis }
Preventing extra naturals from being automatically added
In accordance with traditional typesetting rules, a natural sign is
printed before a sharp or flat if a previous double sharp or flat on
the same note is canceled. To change this behavior to contemporary
practice, set the extraNatural
property to f
in the
Staff
context.
\relative c'' { aeses4 aes ais a \set Staff.extraNatural = ##f aeses4 aes ais a }
See also
Music Glossary: sharp, flat, double sharp, double flat, Pitch names, quarter tone.
Learning Manual: Pitches and key signatures.
Notation Reference: Automatic accidentals, Annotational accidentals (musica ficta), Note names in other languages.
Snippets: Pitches.
Internals Reference: Accidental_engraver, Accidental, AccidentalCautionary, accidental-interface.
Known issues and warnings
There are no generally accepted standards for denoting quarter tone accidentals, so LilyPond’s symbols do not conform to any standard.
[ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
[ < Accidentals ] | [ Up : Writing pitches ] | [ Changing multiple pitches > ] |
Note names in other languages
There are predefined sets of note and accidental names for various other languages. Selecting the note name language is usually done at the beginning of the file; the following example is written using Italian note names:
\language "italiano" \relative { do' re mi sib }
The available languages and the note names they define are:
Language | Note Names |
---|---|
nederlands | c d e f g a bes b |
català orcatalan | do re mi fa sol la sib si |
deutsch | c d e f g a b h |
english | c d e f g a bf /b-flat b |
español orespanol | do re mi fa sol la sib si |
français | do ré /re mi fa sol la sib si |
italiano | do re mi fa sol la sib si |
norsk | c d e f g a b h |
português orportugues | do re mi fa sol la sib si |
suomi | c d e f g a b h |
svenska | c d e f g a b h |
vlaams | do re mi fa sol la sib si |
In addition to note names, accidental suffixes may also vary depending on the language:
Language | sharp | flat | double sharp | double flat |
---|---|---|---|---|
nederlands | is | es | isis | eses |
català orcatalan | d /s | b | dd /ss | bb |
deutsch | is | es | isis | eses |
english | s /-sharp | f /-flat | ss /x /-sharpsharp | ff /-flatflat |
español orespanol | s | b | ss /x | bb |
français | d | b | dd /x | bb |
italiano | d | b | dd | bb |
norsk | iss /is | ess /es | ississ /isis | essess /eses |
português orportugues | s | b | ss | bb |
suomi | is | es | isis | eses |
svenska | iss | ess | ississ | essess |
vlaams | k | b | kk | bb |
In Dutch, German, Norwegian, and Finnish, aes
is contracted to
as
; in Dutch and Norwegian, however, both forms are accepted by
LilyPond. Exactly the same holds for es
and ees
,
aeses
and ases
, and finally eeses
and eses
.
In German and Finnish, LilyPond additionally provides the more frequent
form asas
for ases
.
\relative c'' { a2 as e es a ases e eses }
Some music uses microtones whose alterations are fractions of a ‘normal’ sharp or flat. The following table lists note name suffixes for quarter tone accidentals; here the prefixes semi- and sesqui- respectively mean ‘half’ and ‘one and a half’.
Language | semi-sharp | semi-flat | sesqui-sharp | sesqui-flat |
---|---|---|---|---|
nederlands | ih | eh | isih | eseh |
català orcatalan | qd /qs | qb | tqd /tqs | tqb |
deutsch | ih | eh | isih | eseh |
english | qs | qf | tqs | tqf |
español orespanol | cs | cb | tcs | tcb |
français | sd | sb | dsd | bsb |
italiano | sd | sb | dsd | bsb |
norsk | ih | eh | issih /isih | esseh /eseh |
português orportugues | sqt | bqt | stqt | btqt |
suomi | ih | eh | isih | eseh |
svenska | ih | eh | issih | esseh |
vlaams | hk | hb | khk | bhb |
In German, there are similar name contractions for microtones as with normal pitches described above.
\language "deutsch" \relative c'' { asah2 eh aih eisih }
Most languages presented here are commonly associated with Western classical music, also referred to as Common Practice Period. However, alternate pitches and tuning systems are also supported: see Common notation for non-Western music.
See also
Music Glossary: Pitch names, Common Practice Period.
Notation Reference: Common notation for non-Western music.
Installed Files: ‘scm/define-note-names.scm’.
Snippets: Pitches.
[ << Musical notation ] | [Top][Contents][Index] | [ Specialist notation >> ] |
[ < Accidentals ] | [ Up : Writing pitches ] | [ Changing multiple pitches > ] |