Tokenize a chord name. It returns an array with the tonic and chord type If not tonic is found, all the name is considered the chord name.
This function does NOT check if the chord type exists or not. It only tries to split the tonic and chord type.
the chord name
an array with [tonic, type]
tokenize("Cmaj7") // => [ "C", "maj7" ]tokenize("C7") // => [ "C", "7" ]tokenize("mMaj7") // => [ null, "mMaj7" ]tokenize("Cnonsense") // => [ null, "nonsense" ] Copy
tokenize("Cmaj7") // => [ "C", "maj7" ]tokenize("C7") // => [ "C", "7" ]tokenize("mMaj7") // => [ null, "mMaj7" ]tokenize("Cnonsense") // => [ null, "nonsense" ]
Tokenize a chord name. It returns an array with the tonic and chord type If not tonic is found, all the name is considered the chord name.
This function does NOT check if the chord type exists or not. It only tries to split the tonic and chord type.