Options
All
  • Public
  • Public/Protected
  • All
Menu

Class PitchChordEncoder

ChordEncoder that outputs (concatenated) a one-hot encoding over chord root pitch class, a binary vector indicating the pitch classes contained in the chord, and a one-hot encoding over chord bass pitch class.

Hierarchy

Index

Properties

Methods

Properties

depth

depth: number = 1 + 3 * constants.NUM_PITCH_CLASSES

Methods

encode

  • encode(chord: string): Tensor<R1>

encodeProgression

  • encodeProgression(chords: string[], numSteps: number): Tensor<R2>
  • Encode a chord progression over a specified number of steps.

    Parameters

    • chords: string[]

      An array of chord symbol strings.

    • numSteps: number

      Number of steps to use.

    Returns Tensor<R2>

    A 2D tensor containing the encoded chord progression.

Generated using TypeDoc