In musical notation, an accidental refers to the use of a symbol such as a sharp or flat in the course of a piece, as opposed to in its key signature. This indicates that the note on the staff is altered from the pitch it normally represents. This reverts at the end of the measure.

The term accidental presumably refers to the older sense of the word "accidental" meaning "outside the norm", since the notes affected by them fall outside the scale of the current key.

All accidentals, regardless of the current key, modify their following notes as if they began in the key of C, as follows:

  • A sharp raises the pitch by one semitone
  • A double-sharp raises the pitch by two semitones
  • A flat lowers the pitch by one semitone
  • A double-flat lowers the pitch by two semitones
  • A natural cancels the effect of any previous sharp or flat (including in the key signature). Any note following a natural mark will be part of the key of C major.

When canceling from a double-sharp to a single sharp, it is acceptable to just write a sharp sign, but better practice to write "natural, sharp" in succession.

Example

The top staff has a key signature is two flats (either B flat major or G minor)

The bottom staff gives the exact same pitches, technically called enharmonic spellings, written in the key of C.

Writing Accidentals

When an accidental note is tied across a barline, no additional accidental is needed, as it is implied by holding the note. The next occurrence of that note in the second bar will be in key unless given an accidental of its own.

Although a barline implicitly resets all lines and spaces to the last key signature, typically a courtesy accidental will be placed to remind performers in some of the following situations:

  • The unaltered note in the bar which follows the altered note
  • The same note as the altered note occurs in a different octave but is itself unaltered
  • The altered note is tied across a barline, and followed by an unaltered note.

The rules for which accidentals to choose may vary according to the type of music: modal, diatonic or chromatic, and also whether the transcriber is aiming for strictness or clarity, for example C flat versus B in the key of D flat. Nonetheless, some general rules for choosing between flat or sharp accidentals include:
  • When descending, use flats.
  • When ascending, use sharps.
  • Try to use the same kind of accidentals -- sharps or flats -- used by the key signature.

On a piano or other
equally tempered instruments with fixed tuning, a sharp and a flat are the same distance from the natural note in either direction (so that C sharp is the same as D flat - they are enharmonically equivalent), while instruments with flexible tuning such as violins or cellos are often played so they more closely approximate just intonation, meaning sharps tend to be lower and flats higher (so that C sharp is slightly lower than D flat).

From the 20th century, some composers have used other accidentals, commonly half- and quarter-sharps and -flats. These are usually indicated by the use of altered traditional symbols, such as a backwards flat to indicate half-flat. Ben Johnston created a system of notation for pieces in just intonation where the unmarked C, F, and G Major chords are just major chords (4:5:6) and accidentals are used to create just tuning in other keys.