Next: , Previous: Relative octave entry, Up: Writing pitches


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

[image of music]

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

[image of music]

Quarter tones may be added; the following is a series of Cs with increasing pitches:

     
     ceseh1 ces ceh c cih cis cisih

[image of music]

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?

[image of music]

Accidentals on tied notes are only printed at the beginning of a new system:

     
     cis1 ~ cis ~
     \break
     cis

[image of music]

Selected Snippets

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 "false" in the Staff context.

     
     \relative c'' {
       aeses4 aes ais a
       \set Staff.extraNatural = ##f
       aeses4 aes ais a
     }

[image of music]

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, 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.

This page is for LilyPond-2.11.58 (development-branch).

Report errors to http://post.gmane.org/post.php?group=gmane.comp.gnu.lilypond.bugs.

Your suggestions for the documentation are welcome.

Other languages: français, español, deutsch.