Class ChordLookupResult

The ChordFinder.findChord method returns a ChordLookupResult whenever it manages to find a chord that fits the lookup requirements.

The ChordLookupResult class is a collection of properties that give information about what was found.

Hierarchy

  • ChordLookupResult

Constructors

Properties

bass: number = 0

The bass pitch of the returned chord.

name: string = ''

The name of the chord in expression form, where {r} is a placeholder for root and {b} for bass

The reason for {r} and {b} instead of using actual pitch names is that the pitch namings can vary a lot depending on scale choice. The intention is to do something like:

 lookupResult.name
.replace('\{r\}', scale.getPitchName(lookupResult.root))
.replace('\{b\}', scale.getPitchName(lookupResult.bass))
pitches: number[] = []

The collection of all pitches in the returned chord.

pitchesAdded: number[] = []

Which of the pitches in the chord were missing from the lookup request.

pitchesRemoved: number[] = []

Which of the pitches in the lookup request were removed in the returned chord.

root: number = 0

The root pitch of the returned chord.

shapeName: string = ''

The name to use when refering to the shape of the returned chord, rather than the root-specific name of the chord.

For example, for a minor 7th chord, this would just be 'm7'.

Generated using TypeDoc