Simplemusic and Pitch Class Sets¶
Simplemusic¶
-
simplemusic.mod12(n)¶
>>> simplemusic.mod12(13)
1
-
simplemusic.interval(x, y)¶ Return the numeric interval between two notes.
-
simplemusic.transposition(notes, index)¶ Transpose a set of notes by a numerical index.
-
simplemusic.transposition_startswith(notes, start)¶ Transpose a set of notes so it begins with start note.
Check if two groups of notes are related by transposition.
We use brute force here; the best way is to check for the normal or prime forms.
-
simplemusic.inversion(notes, index=0)¶ Invert a set of notes though an inversion index.
The inversion index is not very musical. the function
inversion_startswith()is probably more useful.-
simplemusic.inversion_startswith(notes, start)¶ Invert a set of notes so it begins with start note.
-
>>> simplemusic.inversion_startswith([0, 4, 7], 2)
[2, 10, 7]
-
simplemusic.rotate_set(notes)¶ Return all rotations of a collection of notes.