The Line items of which the song consists
The song's metadata. When there is only one value for an entry, the value is a string. Else, the value is an array containing all unique values for the entry.
Returns a copy of the song with the key set to the specified key. It changes:
key
in the metadata setkey
directiveThe new key.
The changed song
Returns a copy of the song with the directive value set to the specified value.
value
is null
it will act as a delete, any directive matching name
will be removed.The directive name
The value to set, or null
to remove the directive
Returns all chord definitions from the song.
Definitions are made using the {chord}
or {define}
directive.
A chord definitions overrides a previous chord definition for the exact same chord.
Optional
context: FormattingContextthe chord definitions
Returns a copy of the song with the key value set to the specified capo. It changes:
capo
in the metadata setcapo
directivethe capo. Passing null
will:
capo
directiveThe changed song
Returns a copy of the song with the key value set to the specified key. It changes:
key
in the metadata setkey
directivethe key. Passing null
will:
key
directiveThe changed song
Transposes the song by the specified delta. It will:
key
directiveThe number of semitones (positive or negative) to transpose with
Optional
options: { modifier?: null | Modifier; normalizeChordSuffix?: boolean } = {}options
Optional
modifier?: null | ModifierOptional
normalizeChordSuffix?: booleanwhether to normalize the chord suffixes after transposing
The transposed song
Transposes the song down by one semitone. It will:
key
directiveOptional
options: { normalizeChordSuffix?: boolean } = {}options
Optional
normalizeChordSuffix?: booleanwhether to normalize the chord suffixes after transposing
The transposed song
Transposes the song up by one semitone. It will:
key
directiveOptional
options: { normalizeChordSuffix?: boolean } = {}options
Optional
normalizeChordSuffix?: booleanwhether to normalize the chord suffixes after transposing
The transposed song
Represents a song in a chord sheet. Currently a chord sheet can only have one song.