pitchtypes.spelled.AbstractSpelledInterval
- class pitchtypes.spelled.AbstractSpelledInterval
Bases:
ABC
The interface for spelled interval types.
- __init__()
Methods
__init__
()alteration
()compare
(other)Return the diatonic steps of the interval (unison=0, 2nd=1, ..., octave=7, ...).
embed
()fifths
()generic
()Return the generic interval, i.e. the number of diatonic steps modulo octave.
internal_octaves
()name
()octaves
()onehot
(fifth_range, octave_range[, dtype])- __weakref__
list of weak references to the object (if defined)
- abstract diatonic_steps()
Return the diatonic steps of the interval (unison=0, 2nd=1, …, octave=7, …). Respects both direction and octaves.
- Returns:
number of diatonic steps (integer)
- abstract generic()
Return the generic interval, i.e. the number of diatonic steps modulo octave. Unlike degree(), the result respects the sign of the interval (unison=0, 2nd up=1, 2nd down=-1).
- Returns:
generic interval (integer)