ChordTrack

interface ChordTrack { enabled: boolean events: readonly ChordEvent[] addEvent(props?: ChordEventProps): ChordEvent chordAt(position: number): Nullable<Readonly<{ root: number notes: readonly number[] name: string }>> clearEvents(): void }

The chord progression of the song, as steps of the key


Properties

enabled: boolean

Enable the chords

events: readonly ChordEvent[]

readonly

All chords sorted by position

Methods

addEvent(props?: ChordEventProps): ChordEvent

Add a chord (one bar on step 1 by default). Chords it covers are shortened or removed

Parameters

Returns

chordAt( position: number, ): Nullable<Readonly<{ root: number notes: readonly number[] name: string }>>

The chord sounding at a position in the key that applies there, null where no chord sits

Parameters

  • position (number)

Returns

  • Nullable<Readonly<{ root: number; notes: readonly number[]; name: string }>>

clearEvents(): void

Remove all chords

Returns

  • void