Options
All
  • Public
  • Public/Protected
  • All
Menu

musictheoryjs

Index

Type aliases

ChordInitializer

ChordInitializer: { octave?: number; root?: Semitone; template?: ChordInterval[] }

Used to initialize a chord

Type declaration

ChordInterval

ChordInterval: number | number[]

represents an array of intervals
can have single integers like [0, 2, 4, 5, 7, 9, 11]
or can have a neted array represent a modifier for the note
like [1, [2, Modifier.flat], 4, 5, [7, Modifier.flat], 9, [11, Modifier.sharp]]

NoteInitializer

NoteInitializer: { octave?: number; semitone?: Semitone }

Describes the fields expected by the Note constrtuctor.

Type declaration

  • Optional octave?: number
  • Optional semitone?: Semitone

ScaleInitializer

ScaleInitializer: { key?: Semitone; octave?: number; template?: number[] }

The type used to initialize a scale

Type declaration

  • Optional key?: Semitone
  • Optional octave?: number
  • Optional template?: number[]

Variables

ScaleTemplates

ScaleTemplates: {} = ...

Maps predefined scales to their names.

Type declaration

  • [key: string]: number[]

Functions

Const buildTables

  • buildTables(): void
  • Builds lookup tables for more performant string parsing.
    Should only(optionally) be called once soon after the library is loaded and
    only if you are using string initializers.

    Returns void

Generated using TypeDoc