[ << 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 | ||
Non-Western note names and accidentals |
[ << 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 c d e f g a b c d 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' c'' e' g d'' d' d c \clef bass c, c,, e, g d,, d, d c
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
When octaves are specified in absolute mode it is easy to accidentally put a pitch in the wrong octave. Relative octave mode reduces these errors since most of the time it is not necessary to indicate any octaves at all. Furthermore, in absolute mode a single mistake may be difficult to spot, while in relative mode a single error puts the rest of the piece off by one octave.
\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, and it is recommended that it be a octave ofc
.
Here is the relative mode shown in action:
\relative c { \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'' { c g c f, c' a, e'' c }
A note sequence without a single octave mark can nevertheless span large intervals:
\relative c { c f b e a d g c }
When \relative
blocks are nested, the innermost
\relative
block applies.
\relative c' { c d e f \relative c'' { 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 c' { d e \transpose f g { d e \relative c' { 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 <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'' { c2 fis c2 ges b2 eisis b2 feses }
See also
Music Glossary: fifth, interval, Pitch names.
Notation Reference: Octave checks.
Snippets: Pitches.
Internals Reference: RelativeOctaveMusic.
If no startpitch is specified for \relative
,
then c'
is assumed. However, this is a deprecated
option and may disappear in future versions, so its use is
discouraged.
[ << 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 are the raw input; key
signatures and clefs determine how this raw input is displayed.
An unaltered note like c
means ‘C natural’,
regardless of the key signature or clef. For more information,
see
Accidentals 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.
ais1 aes aisis aeses
A natural will cancel the effect of an accidental or key signature. However, naturals are not encoded into the note name syntax with a suffix; a natural pitch is shown as a simple note name:
a4 aes a2
Quarter tones may be added; the following is a series of Cs with increasing pitches:
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. These extra accidentals can also be used to produce
natural signs.
cis cis cis! cis? c c c! c?
Accidentals on tied notes are only printed at the beginning of a new system:
cis1~ cis~ \break cis
Selected Snippets
Hiding accidentals on tied notes at the beginning of a new system
This shows how to hide accidentals on tied notes at the beginning 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 standard typesetting rules, a natural sign is
printed before a sharp or flat if a previous accidental on the same
note needs to be canceled. To change this behavior, 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: Accidentals 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 symbol does not conform to any standard.
[ << Musical notation ] | [Top][Contents][Index][ ? ] | [ Specialist notation >> ] | ||
[ < Accidentals ] | [ Up : Writing pitches ] | [ Non-Western note names and accidentals > ] |
Note names in other languages
There are predefined sets of note and accidental names for various
other languages. To use them, include the language-specific init
file listed below. For example, to use English note names, add
\include "english.ly"
to the input file.
Note: Because some other include files (such as predefined-fretboards.ly
)
use default (Nederlands) note names, the \include
command for the language file should be placed after all other
LilyPond distribution files.
The available language files and the note names they define are:
Language File
Note Names
‘nederlands.ly’
c d e f g a bes b
‘arabic.ly’
do re mi fa sol la sib si
‘catalan.ly’
do re mi fa sol la sib si
‘deutsch.ly’
c d e f g a b h
‘english.ly’
c d e f g a bf b
‘espanol.ly’
do re mi fa sol la sib si
‘italiano.ly’
do re mi fa sol la sib si
‘norsk.ly’
c d e f g a b h
‘portugues.ly’
do re mi fa sol la sib si
‘suomi.ly’
c d e f g a b h
‘svenska.ly’
c d e f g a b h
‘vlaams.ly’
do re mi fa sol la sib si
and the accidental suffixes they define are:
Language File
sharp
flat
double sharp
double flat
‘nederlands.ly’
-is
-es
-isis
-eses
‘arabic.ly’
-d
-b
-dd
-bb
‘catalan.ly’
-d/-s
-b
-dd/-ss
-bb
‘deutsch.ly’
-is
-es
-isis
-eses
‘english.ly’
-s/-sharp
-f/-flat
-ss/-x/-sharpsharp
-ff/-flatflat
‘espanol.ly’
-s
-b
-ss/-x
-bb
‘italiano.ly’
-d
-b
-dd
-bb
‘norsk.ly’
-iss/-is
-ess/-es
-ississ/-isis
-essess/-eses
‘portugues.ly’
-s
-b
-ss
-bb
‘suomi.ly’
-is
-es
-isis
-eses
‘svenska.ly’
-iss
-ess
-ississ
-essess
‘vlaams.ly’
-k
-b
-kk
-bb
In Dutch, aes
is contracted to as
, but both forms
are accepted in LilyPond. Similarly, both es
and
ees
are accepted. This also applies to
aeses
/ ases
and
eeses
/ eses
. Sometimes only these
contracted names are defined in the corresponding language files.
a2 as e es a ases e eses
Some music uses microtones whose alterations are fractions of a ‘normal’ sharp or flat. The note names for quarter-tones defined in the various language files are listed in the following table. Here the prefixes semi- and sesqui- mean ‘half’ and ‘one and a half’, respectively. For the other languages, no special names have been defined yet.
Language File
semi-sharp
semi-flat
sesqui-sharp
sesqui-flat
‘nederlands.ly’
-ih
-eh
-isih
-eseh
‘arabic.ly’
-sd
-sb
-dsd
-bsb
‘deutsch.ly’
-ih
-eh
-isih
-eseh
‘english.ly’
-qs
-qf
-tqs
-tqf
‘espanol.ly’
-cs
-cb
-tcs
-tcb
‘italiano.ly’
-sd
-sb
-dsd
-bsb
‘portugues.ly’
-sqt
-bqt
-stqt
-btqt
See also
Music Glossary: Pitch names.
Snippets: Pitches.
[ << Musical notation ] | [Top][Contents][Index][ ? ] | [ Specialist notation >> ] | ||
[ < Note names in other languages ] | [ Up : Writing pitches ] | [ Changing multiple pitches > ] |
Non-Western note names and accidentals
Many non-Western musics (and some Western folk and traditional musics) employ alternative or extended tuning systems that do not fit readily into standard classical notation.
In some cases standard notation is still used, with the pitch differences being implicit. For example, Arabic music is notated with standard semitone and quarter-tone accidentals, with the precise pitch alterations being determined by context. Others require extended or unique notations.
Turkish classical music, or Ottoman music, employs melodic forms known as makamlar, whose intervals are based on 1/9 divisions of the whole tone. From a modern notational point of view, it is convenient to use the standard Western staff notes (c, d, e, ...) with special accidentals unique to Turkish music. These accidentals are defined in ‘makam.ly’ (to locate this file on your system, see Other sources of information). The following table gives their names, the accidental suffix that must be added to notes, and their pitch alteration as a fraction of one whole tone.
Accidental name
suffix
pitch alteration
büyük mücenneb (sharp)
-bm
+8/9
kücük mücenneb (sharp)
-k
+5/9
bakiye (sharp)
-b
+4/9
koma (sharp)
-c
+1/9
koma (flat)
-fc
-1/9
bakiye (flat)
-fb
-4/9
kücük mücenneb (flat)
-fk
-5/9
büyük mücenneb (flat)
-fbm
-8/9
For further information on Turkish classical music and makamlar, see Turkish classical music.
Selected Snippets
Makam example
Makam is a type of melody from Turkey using 1/9th-tone microtonal alterations. Consult the initialization file ‘ly/makam.ly’ for details of pitch names and alterations.
% Initialize makam settings \include "makam.ly" \relative c' { \set Staff.keySignature = #`((6 . ,(- KOMA)) (3 . ,BAKIYE)) c4 cc db fk gbm4 gfc gfb efk fk4 db cc c }
[ << Musical notation ] | [Top][Contents][Index][ ? ] | [ Specialist notation >> ] | ||
[ < Note names in other languages ] | [ Up : Writing pitches ] | [ Changing multiple pitches > ] |