Sharps, Flats, Double Sharps, Double Flats in Music Theory
The function of sharps and flats is to raise or lower a note by a half, or even a full, step. They define key signatures and appear in 'one-shot' versions called accidentals next to notes on the staff.
A sharp is a hash mark symbol () you'll find in a key signature or as an accidental next to a note. They're used to raise a specified note by one half step and are always written on the line or space of the note they alter.
In this example the F note has a sharp next to it making it an F. When a sharp, flat, or natural sign is placed directly next to a note it's called an accidental.
In addition to sharps there exists a greater beast that does the job of two sharps at the same time; it's called a double sharp. The double sharp raises a note one whole step and it looks like a mix between an 'x' and a star. Normal sharps are used in key signatures and as accidentals, but double sharps are mainly used as accidentals only.
We may be getting a little ahead of ourselves here, but a common use of a double sharp is in melodic minor melodies. In minor keys where the 7th note is naturally sharp, another sharp is needed to raise the note a half step higher in order to achieve the leading tone or construct a major V chord. In this case we replace the normal sharp with a double sharp.
Here's an example of what a double sharp looks like and how to use it to raise the 7th in the key of G minor:
A flat is just the opposite of a sharp; it lowers a specified note by one half step. You can identify them by their resemblance to a lowercase b; they look like this: . Like sharps they're also used in key signatures and as accidentals and abide by the same guidelines when written; ie always on the line or space of the note they affect.
In this example the song is in G major, according to the key signature, but the flats are acting as accidentals to transform the B notes into B.
The double flat, as it's name implies, is a flat x2. It's essentially a mirror image of a double sharp; instead of raising a note by a whole step it lowers it by a whole step. A double flat is written simply as two flats side by side.
Here's an example of a double flat by way of an interesting sounding chord progression in D major; I – IV – iv – I. When it comes to lowering the 3rd in the iv chord a double flat needs to be used since the note is already flat according to the key signature.