Accidentals · Music theory
Whole and half steps, sharp, flat and natural, double accidentals and enharmonics.
Whole steps and half steps
The half step (semitone) is the smallest distance in our system: from one piano key to the next, white or black. Two half steps make a whole step.
Between the natural notes (the white keys) there is a whole step, except between E and F and between B and C, where there is a half step: that is why there is no black key between them on the piano.
Why twelve half steps
Our system divides the octave into twelve parts, and equal temperament, normal today, makes them all exactly equal. Each measures 100 cents, the unit for fine differences of pitch.
It was not always so. In old tunings half steps were not all the same size, and some keys sounded better than others. Equal temperament gives up a little purity in every interval, except the octave, in exchange for being able to play in any key.