An octave is divided into twelve semitones . These semitones are exactly equal in size . Any other interval can be defined in terms of an appropriate number of semitones ( e.g. a whole tone or major second is 2 semitones wide , a major third 4 semitones , and a perfect fifth 7 semitones )