I want to detect chords based on input String with notes (e.g. 'C'
, 'F'
, 'G'
) and get the resulting output chord (in this case, 'Csus4'
). I've done some research and it seems that all of the solutions out there are for working on audio stream input. Is there some JavaScript library that does this based on String input rather than an audio stream?
I found the danigb/tonal library and the Detect module does exactly what I need:
import { chord } from 'tonal-detect'
chord(['C', 'F', 'G']) // => ['Csus4']