A diatonic scale is a heptatonic scale (seven tone scale) that includes five whole tones (whole steps) and two half steps (semitones) in each octave, and in which the two half steps are separated from each other by either two or three whole steps, depending on their position in the scale. This pattern ensures that, in a diatonic scale spanning more than one octave, all the half steps have the maximum separation from each other. This contrasts with chromatic scales, which are constructed entirely with half steps.
The major and minor scales of Western art music are by far the most commonly used diatonic scales today. Medieval church modes are also heptatonic scales.
The modern piano keyboard is based on the interval pattern of the diatonic scale. That is, a diatonic scale is produced by playing any sequence of seven successive white keys.