An accidental is a symbol modifying a note's pitch. There are three main types of accidentals:
- Sharps (♯) raise a note's pitch by one semitone. For example, a sharp symbol on a D note indicates that the note should be played a semitone higher.
- Flats (♭) are essentially the opposite of sharps: they lower a note's pitch by one semitone. For example, a flat symbol on an A note tells the player to play the note a semitone lower.
- Naturals (♮) cancel the effects of a sharp or flat, returning a note to its standard pitch. For example, if a G♯ is followed by a G in the same bar, a natural is used to cancel the effects of the sharp accidental.
A key signature may consist of up to 7 sharps or flats. For example, the key signature for B major has five sharps (F♯, C♯, G♯, D♯, and A♯).