pitchtypes.spelled_array.AbstractSpelledArrayInterval
- class pitchtypes.spelled_array.AbstractSpelledArrayInterval
Bases:
ABC
The interface for spelled interval array types.
- __init__()
Methods
__init__
()Return the diatonic steps of the interval (unison=0, 2nd=1, ..., octave=7, ...).
generic
()Return the generic interval, i.e. the number of diatonic steps modulo octave.
- __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:
an array of diatonic steps (integers)
- 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:
an array of generic intervals (integers)