music.interval_names¶
- music.interval_names(semitones)[source]¶
Every traditional name for an interval of this many semitones.
- Parameters:
- semitones
integer Semitones above the lower note, from 0 upwards.
- semitones
- Returns:
tupleofstringsOne name for most intervals and three for the tritone, which the article names
aug4,dim5andTT. Compound intervals are named as the simple one raised by octaves.
- Raises:
ValueErrorIf semitones is negative. An interval is measured upward; use the two notes the other way round.
- Parameters:
semitones (int)
- Return type:
See also
intervalthe same, forwards.
Examples
>>> interval_names(4) ('M3',) >>> interval_names(6) ('aug4', 'dim5', 'TT') >>> interval_names(14) ('M9',)