Methods
(static) noteIndex(note) → {number}
What is chromatic number of a note (such as 'C', 'D#', or 'Ab') in the chromatic scale?
Parameters:
Name | Type | Description |
---|---|---|
note |
string | The note to compute the chromatic number of |
Returns:
the integer index into the chromatic scale
- Type
- number
(static) parseChord(spec) → {Object}
Parses a chord specification such as 'C#7b5:3' into an object
Parameters:
Name | Type | Description |
---|---|---|
spec |
string |
Returns:
note: the name of the note, eg 'C#'; type: the chord type, eg '7b5'; and the chord's octave
- Type
- Object
(static) parseDegree(spec) → {Object}
Parses a degree specification such as '1:5' into a degree and an octave
Parameters:
Name | Type | Description |
---|---|---|
spec |
string | number |
Returns:
the degree and the octave
- Type
- Object
(static) parseNashvilleChord(spec) → {Object}
Parse a nashville chord specification such as '1', or '2^M7:3', or even '#bb##2^dim:5'
Parameters:
Name | Type | Description |
---|---|---|
spec |
string |
Returns:
nashNum: the chord number; offset: number of half-steps from the chord number determined by the leading sharp/flat designators; type: the chord type, eg '7b5'; and the chord's octave
- Type
- Object
(static) parseNote(spec) → {Object}
Parses a note specification such as 'C#:3' into a note and an octave
Parameters:
Name | Type | Description |
---|---|---|
spec |
string |
Returns:
the note name and the octave
- Type
- Object
(static) resolveQualifiers(spec) → {Object}
Resolve a sequence of sharp/flat symbols into an integer offset from the base degree.
Parameters:
Name | Type | Description |
---|---|---|
spec |
string | [<#/b>...<#/b>] |
Returns:
the *base and the offset
- Type
- Object