Converts between a monophonic, quantized NoteSequence containing a melody and a Tensor representing only the rhythm of the melody.
NoteSequence
Tensor
The rhythm is represented as a [numSteps, 1]-shaped Tensor with 1 in the positions corresponding to steps with a note-on and 0 elsewhere.
numSteps
Since the melody cannot be reconstructed from its rhythm alone, toNoteSequence returns a NoteSequence with drum hits at the note-on steps.
toNoteSequence
Generated using TypeDoc
Converts between a monophonic, quantized
NoteSequence
containing a melody and aTensor
representing only the rhythm of the melody.The rhythm is represented as a [
numSteps
, 1]-shapedTensor
with 1 in the positions corresponding to steps with a note-on and 0 elsewhere.Since the melody cannot be reconstructed from its rhythm alone,
toNoteSequence
returns aNoteSequence
with drum hits at the note-on steps.