Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Scale

Scale is a named sequence of intervals from an (unspecified) tonic. For example, "Diatonic Major" names a scale.

Along with a number of other libraries, and much discussion of music (and even music theory), Scale here conflates the musical concepts of scale (a sequence of notes), key (that additionally includes a tonic and chords, but in which the notes are unordered), and mode (which additionally denotes notes' melodic functions — I think).

References:

Hierarchy

  • GenericScale<null>
    • Scale

Index

Constructors

Properties

Accessors

Methods

Constructors

constructor

  • new Scale(__namedParameters: object): Scale
  • Parameters

    • __namedParameters: object

    Returns Scale

Properties

intervals

intervals: ReadonlyArray<Interval>

modes

modes: ReadonlyArray<Scale> = []

name

name: string

parent

parent: Scale | null

For a minor scale, this is the relative major. For a mode, it's the deriving scale.

pitchClasses

pitchClasses: ReadonlyArray<number>

Accessors

Static scales

  • get scales(): IterableIterator<Scale>

Methods

at

  • Return a specific scale of the same scale class, at the specified tonic.

    Parameters

    • tonic: string

    Returns Key<PitchLike>

  • Type parameters

    Parameters

    • tonic: T

    Returns Key<T>

Static addScale

  • addScale(scale: Scale): void

Static fromString

  • fromString(name: string): Scale

Generated using TypeDoc