Converts between a monophonic, quantized NoteSequence containing a melody
and a Tensor representing only the shape of the melody.
The shape is represented as a [numSteps, 3]-shaped Tensor containing a
one-hot Parsons code, where 0 = descending pitch, 1 = same pitch, and 2 =
ascending pitch.
Since the melody cannot be reconstructed from its shape alone,
toNoteSequence returns a NoteSequence having the shape of the contour
with a note at each time step.
Converts between a monophonic, quantized
NoteSequence
containing a melody and aTensor
representing only the shape of the melody.The shape is represented as a [
numSteps
, 3]-shapedTensor
containing a one-hot Parsons code, where 0 = descending pitch, 1 = same pitch, and 2 = ascending pitch.Since the melody cannot be reconstructed from its shape alone,
toNoteSequence
returns aNoteSequence
having the shape of the contour with a note at each time step.