Options
All
  • Public
  • Public/Protected
  • All
Menu

Class MelodyShape

Melodic shape control signal. Extracts a depth-3 tensor representing a melodic contour as a Parsons code, a sequence of {up, down, same} values corresponding to the pitch interval direction. We use a one-hot encoding, where 0 = down, 1 = same, and 2 = up.

Hierarchy

  • MelodyShape

Implements

Index

Properties

Methods

Properties

depth

depth: 3 = 3

Methods

extract

  • extract(melody: Melody): Tensor<R2>
  • Extract the melodic shape from a Melody object.

    Parameters

    • melody: Melody

      Melody object from which to extract shape.

    Returns Tensor<R2>

    An n-by-3 2D tensor containing the melodic shape as one-hot Parsons code.

Generated using TypeDoc