Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Chord<T>

A set of notes or note classes; equivalently, a set of intervals, and an optional root. For example, "E Major" and "C Minor" name chords.

A Chord<Note> is a set of specific notes: for example, {C4, E4, G4}. A Chord<PitchClass> is a set of note classes, without specifying octaves.

See Wikipedia: Chord.

Type parameters

Hierarchy

  • Chord

Index

Constructors

constructor

Properties

abbr

abbr: string

The preferred abbreviation.

abbrs

abbrs: ReadonlyArray<string>

chordClass

chordClass: ChordQuality

intervals

intervals: ReadonlyArray<Interval>

inversion

inversion: number

notes

notes: ReadonlyArray<T>

root

root: T

Accessors

fullName

  • get fullName(): string

name

  • get name(): string

Methods

invert

  • invert(inversionKey: number | string): Chord<T>

Static fromPitches

  • fromPitches<T>(pitches: ReadonlyArray<T>): Chord<T>
  • Return the Chord that matches a set of notes. The first note should be the root.

    Type parameters

    Parameters

    • pitches: ReadonlyArray<T>

    Returns Chord<T>

Static fromString

  • Return either a Chord or a ChordQuality, depending on whether name specifies a pitch or pitch class (e.g. "E Major" or "E7 Major"), or just a chord class (e.g. "Major").

    Parameters

    • name: string

    Returns Chord<Note> | Chord<PitchClass> | ChordQuality

Generated using TypeDoc