music.mode_by_rotation¶
- music.mode_by_rotation(kappa=6)[source]¶
A diatonic mode, built by rotating the steps as
eq:relacaoDiadoes.e_0 = 0ande_i = d[(i + kappa) % 7] + e_(i-1), withdthe seven steps ofDIATONIC_STEPS. Each rotation is one of the seven modes:kappa = 6is ionian, and 0 through 5 are dorian, phrygian, lydian, mixolydian, aeolian and locrian.- Parameters:
- kappa
integer Which rotation. Taken modulo 7, so any integer names a mode.
- kappa
- Returns:
tupleofintegersThe seven degrees of that mode.
- Parameters:
kappa (int)
- Return type:
See also
scalethe same modes, by name.
Notes
That every mode is one rotation of one pattern is the content of the equation; naming them is bookkeeping on top of it.
Examples
>>> mode_by_rotation(6) (0, 2, 4, 5, 7, 9, 11) >>> mode_by_rotation(6) == scale('ionian') True >>> [mode_by_rotation(k)[1] for k in range(3)] [2, 1, 2]