Converts to and from hit/velocity/offset representations.
In this setting, we represent drum sequences and performances
as triples of (hit, velocity, offset). Each timestep refers to a fixed beat
on a grid, which is by default spaced at 16th notes (when stepsPerQuarter
is 4). Drum hits that don't fall exactly on beat are represented through
the offset value, which refers to the relative distance from the nearest
quantized step.
Hits are binary [0, 1].
Velocities are continuous values in [0, 1].
Offsets are continuous values in [-0.5, 0.5], rescaled to [-1, 1] for
tensors.
param
The number of quantization steps per quarter note.
param
If True, flatten all input velocities and
microtiming. The model then maps from a flattened input one with velocities
and microtiming. Defaults to False.
param
If True, squash all input drums at each timestep to the
hi-hat
channel (3) and set velocities to 0. Defaults to False.
param
An array of arrays, grouping together MIDI pitches to
treat as the same drum. The first pitch in each class will be used in the
NoteSequence returned by toNoteSequence. A default mapping to 9 classes
is used if not provided.
param
If True, the individual drum/pitch events for a
given
time are split across seprate, sequentail steps of the RNN. Otherwise, they
are combined into a single step of the RNN. Defaults to False.
Converts to and from hit/velocity/offset representations. In this setting, we represent drum sequences and performances as triples of (hit, velocity, offset). Each timestep refers to a fixed beat on a grid, which is by default spaced at 16th notes (when
stepsPerQuarter
is 4). Drum hits that don't fall exactly on beat are represented through the offset value, which refers to the relative distance from the nearest quantized step.Hits are binary [0, 1]. Velocities are continuous values in [0, 1]. Offsets are continuous values in [-0.5, 0.5], rescaled to [-1, 1] for tensors.
The number of quantization steps per quarter note.
If True, flatten all input velocities and microtiming. The model then maps from a flattened input one with velocities and microtiming. Defaults to False.
If True, squash all input drums at each timestep to the hi-hat channel (3) and set velocities to 0. Defaults to False.
An array of arrays, grouping together MIDI pitches to treat as the same drum. The first pitch in each class will be used in the
NoteSequence
returned bytoNoteSequence
. A default mapping to 9 classes is used if not provided.If True, the individual drum/pitch events for a given time are split across seprate, sequentail steps of the RNN. Otherwise, they are combined into a single step of the RNN. Defaults to False.