INNER CODE UNIT · Python
aNote
jisungk/deepjazz · grammar.py:81
aNote = sNote.transpose(random.choice([1, -1]))
return aNote
''' Helper function to generate a random tone. '''
def __generate_arbitrary_tone(lastChord):
return __generate_scale_tone(lastChord) # fix later, make random note.
''' Given the notes in a measure ('measure') and the chords in that measure
('chords'), generate a list of abstract grammatical symbols to represent
that measure as described in GTK's "Learning Jazz Grammars" (2009).
Inputs:
1) "measure" : a stream.Voice object where each element is a
note.Note or note.Rest object.
>>> m1
<music21.stream.Voice 328482572>