Converts between a quantized NoteSequence containing a drum sequence
and the Tensor objects used by MusicRNN.
The Tensor output by toTensor is a 2D one-hot encoding. Each
row is a time step, and each column is a one-hot vector where each drum
combination is mapped to a single bit of a binary integer representation,
where the bit has value 0 if the drum combination is not present, and 1 if
it is present.
The expected Tensor in toNoteSequence is the same kind of one-hot
encoding as the Tensor output by toTensor.
The output NoteSequence uses quantized time and only the first pitch in
pitch class are used.
Converts between a quantized
NoteSequence
containing a drum sequence and theTensor
objects used byMusicRNN
.The
Tensor
output bytoTensor
is a 2D one-hot encoding. Each row is a time step, and each column is a one-hot vector where each drum combination is mapped to a single bit of a binary integer representation, where the bit has value 0 if the drum combination is not present, and 1 if it is present.The expected
Tensor
intoNoteSequence
is the same kind of one-hot encoding as theTensor
output bytoTensor
.The output
NoteSequence
uses quantized time and only the first pitch in pitch class are used.