Options
All
  • Public
  • Public/Protected
  • All
Menu

Main MusicRNN model class.

A MusicRNN is an LSTM-based language model for musical notes.

Hierarchy

  • MusicRNN

Index

Constructors

constructor

  • MusicRNN constructor.

    Parameters

    • checkpointURL: string

      Path to the checkpoint directory.

    • Optional spec: MusicRNNSpec

      (Optional) MusicRNNSpec object. If undefined, will be loaded from a config.json file in the checkpoint directory.

    Returns MusicRNN

Methods

continueSequence

  • continueSequence(sequence: INoteSequence, steps: number, temperature?: number, chordProgression?: string[]): Promise<INoteSequence>
  • Continues a provided quantized NoteSequence.

    Parameters

    • sequence: INoteSequence

      The sequence to continue. Must be quantized.

    • steps: number

      How many steps to continue.

    • Optional temperature: number

      (Optional) The softmax temperature to use when sampling from the logits. Argmax is used if not provided.

    • Optional chordProgression: string[]

      (Optional) Chord progression to use as conditioning.

    Returns Promise<INoteSequence>

continueSequenceAndReturnProbabilities

  • continueSequenceAndReturnProbabilities(sequence: INoteSequence, steps: number, temperature?: number, chordProgression?: string[]): Promise<object>
  • Continues a provided quantized NoteSequence, and returns the computed probability distribution at each step.

    Parameters

    • sequence: INoteSequence

      The sequence to continue. Must be quantized.

    • steps: number

      How many steps to continue.

    • Optional temperature: number

      (Optional) The softmax temperature to use when sampling from the logits. Argmax is used if not provided.

    • Optional chordProgression: string[]

      (Optional) Chord progression to use as conditioning.

    Returns Promise<object>

dispose

  • dispose(): void

initialize

  • initialize(): Promise<void>
  • Loads variables from the checkpoint and instantiates the Encoder and Decoder.

    Returns Promise<void>

isInitialized

  • isInitialized(): boolean

Generated using TypeDoc