The diatonic scale was the original, basic scale of Western music. At a later period, five more pitches were added between certain of the seven pitches of the diatonic scale, making a total of twelve. This is the chromatic scale, represented by the complete set of white and black keys on a keyboard.
The chromatic scale did not make the diatonic scale obsolete. For centuries Western composers used the chromatic scale freely while favoring the diatonic scale embedded in it. Keyboards reflect this practice, with chromatic notes set back and thinner, and colored differently than diatonic ones.
These five extra pitches caused a problem for musical notation. The pitches of the diatonic scale are indicated on the lines and spaces of the staff (see the diagram below); there are no positions in between, so no place for the new five pitches. To solve this problem, symbols such as those shown in the margin were introduced. B♭ stands for B flat, the pitch inserted between A and B; C♯ stands for C sharp, the pitch between C and D, and so on.