Options
All
  • Public
  • Public/Protected
  • All
Menu

Class DrumRollConverter

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

The Tensor output by toTensor is the same 2D "drum roll" as in DrumsConverter.

The expected Tensor in toNoteSequence is the same as the "drum roll", excluding the final NOR column.

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

Hierarchy

Index

Constructors

constructor

Properties

NUM_SPLITS

NUM_SPLITS: number = 0

SEGMENTED_BY_TRACK

SEGMENTED_BY_TRACK: boolean = false

depth

depth: number

endTensor

endTensor: tf.Tensor1D

numSegments

numSegments: number

numSteps

numSteps: number

pitchClasses

pitchClasses: number[][]

pitchToClass

pitchToClass: Map<number, number>

Methods

tensorSteps

  • tensorSteps(tensor: tf.Tensor2D): tf.Scalar

toNoteSequence

  • toNoteSequence(roll: tf.Tensor2D, stepsPerQuarter?: number, qpm?: number): Promise<NoteSequence>

toTensor

  • toTensor(noteSequence: INoteSequence): tf.Tensor2D

Generated using TypeDoc