Converts a pianoroll representation to a NoteSequence
. Note that since
the pianoroll representation can't distinguish between multiple eighth notes
and held notes, the resulting NoteSequence
won't either.
Tensor of shape [steps][NUM_PITCHES][NUM_VOICES]
,
where each entry represents an instrument being played at a particular step
and for a particular pitch. For example, pianoroll[0][64] =[0, 0, 1, 0]
means that the third instrument plays pitch 64 at time 0.
The number of quantized steps in the sequence.
A NoteSequence
.
Converts a NoteSequence
to a pianoroll representation. This sequence
needs to contain notes with a valid set of instruments, representing the
voices in a Bach harmony: 0 is Soprano, 1 is Alto, 2 Tenor and 3 Bass. Any
notes with instruments outside of this range are ignored. Note that this
pianoroll representation can't distinguish between multiple eighth notes and
held notes, so that information will be lost.
A quantized NoteSequence
with at least one note.
The number of quantized steps in the sequence.
A Tensor of shape [numberOfSteps][NUM_PITCHES][NUM_VOICES]
where each entry represents an instrument being played at a particular
step and for a particular pitch. For example,
pianoroll[0][64] = [0, 0, 1, 0]
means that the third instrument plays
pitch 64 at time 0.
Generated using TypeDoc
Utility functions for the [Coconet]{@link} model.
Copyright 2019 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.