Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface DrumsConverterArgs

Converts between a quantized NoteSequence containing a drum sequence and the Tensor objects used by MusicVAE.

The Tensor output by toTensor is a 2D "drum roll" format. Each row is a time step, and each column (up to the final) is a vector of Booleans representing whether a drum from the associated pitch class is being hit at that time. The final column is a Boolean computed by taking a NOR of the other columns in the row.

The expected Tensor in toNoteSequence is a one-hot encoding of labels generated by converting the bit string from the input (excluding the final bit) to an integer.

The output NoteSequence uses quantized time and only the first pitch in pitch class are used.

param

The length of each sequence.

param

(Optional) The number of conductor segments, if applicable.

param

(Optional) 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.

Hierarchy

Index

Properties

Optional numSegments

numSegments: number

Optional numSteps

numSteps: number

Optional pitchClasses

pitchClasses: number[][]

Generated using TypeDoc