Returns a deep copy of the chord
Determines whether the chord is a chord solfege
Determines whether the chord is a chord symbol
Determines whether the chord is a numeral
Determines whether the chord is numeric
Normalizes the chord root and bass notes:
Besides that it normalizes the suffix if normalizeSuffix
is true
.
For example, sus2
becomes 2
, sus4
becomes sus
.
All suffix normalizations can be found in src/normalize_mappings/suffix-mapping.txt
.
When the chord is minor, bass notes are normalized off of the relative major
of the root note. For example, Em/A#
becomes Em/Bb
.
Optional
key: null | string | Key = nullthe key to normalize to
Optional
options: { normalizeSuffix?: boolean } = {}options
Optional
normalizeSuffix?: booleanwhether to normalize the chord suffix after transposing
the normalized chord
Converts the chord to a chord solfege, using the supplied key as a reference.
For example, a numeric chord #4
with reference key Mi
will return the chord symbol La#
.
When the chord is already a chord solfege, it will return a clone of the object.
Optional
referenceKey: null | string | Key = nullthe reference key. The key is required when converting a numeric or numeral.
the chord solfege
Converts the chord to a chord solfege string, using the supplied key as a reference.
For example, a numeric chord #4
with reference key E
will return the chord solfege A#
.
When the chord is already a chord solfege, it will return a string version of the chord.
Optional
referenceKey: null | string | Key = nullthe reference key. The key is required when converting a numeric or numeral.
the chord solfege string
Converts the chord to a chord symbol, using the supplied key as a reference.
For example, a numeric chord #4
with reference key E
will return the chord symbol A#
.
When the chord is already a chord symbol, it will return a clone of the object.
Optional
referenceKey: null | string | Key = nullthe reference key. The key is required when converting a numeric or numeral.
the chord symbol
Converts the chord to a chord symbol string, using the supplied key as a reference.
For example, a numeric chord #4
with reference key E
will return the chord symbol A#
.
When the chord is already a chord symbol, it will return a string version of the chord.
Optional
referenceKey: null | string | Key = nullthe reference key. The key is required when converting a numeric or numeral.
the chord symbol string
Converts the chord to a numeral chord, using the supplied key as a reference. For example, a chord symbol A# with reference key E will return the numeral chord #IV.
Optional
referenceKey: null | string | Key = nullthe reference key. The key is required when converting a chord symbol
the numeral chord
Converts the chord to a numeral chord string, using the supplied kye as a reference. For example, a chord symbol A# with reference key E will return the numeral chord #4.
Optional
referenceKey: null | string | Key = nullthe reference key. The key is required when converting a chord symbol
the numeral chord string
Converts the chord to a numeric chord, using the supplied key as a reference. For example, a chord symbol A# with reference key E will return the numeric chord #4.
Optional
referenceKey: null | string | Key = nullthe reference key. The key is required when converting a chord symbol
the numeric chord
Converts the chord to a numeric chord string, using the supplied kye as a reference. For example, a chord symbol A# with reference key E will return the numeric chord #4.
Optional
referenceKey: null | string | Key = nullthe reference key. The key is required when converting a chord symbol
the numeric chord string
Converts the chord to a string, eg Esus4/G#
or 1sus4/#3
Optional
configuration: { useUnicodeModifier?: boolean } = {}options
Optional
useUnicodeModifier?: booleanWhether or not to use unicode modifiers.
This will make #
(sharp) look like ♯
and b
(flat) look like ♭
the chord string
Transposes the chord by the specified number of semitones
de number of semitones
the new, transposed chord
Transposes the chord down by 1 semitone. Eg. A# becomes A, E becomes Eb
the new, transposed chord
Transposes the chord up by 1 semitone. Eg. A becomes A#, Eb becomes E
the new, transposed chord
Switches to the specified modifier
the modifier to use: '#'
or 'b'
the new, changed chord
Static
parseTries to parse a chord string into a chord
Any leading or trailing whitespace is removed first, so a chord like \n E/G# \r
is valid.
the chord string, eg Esus4/G#
or 1sus4/#3
.
Represents a Chord, consisting of a root, suffix (quality) and bass