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?
Asked
Active
Viewed 1,517 times
2

Matthieu Brucher
- 21,634
- 7
- 38
- 62

Dara Java
- 2,410
- 3
- 27
- 52
-
I'm voting to close this question as off-topic because this question belong to https://softwarerecs.stackexchange.com/ – Nelson Teixeira Dec 14 '18 at 20:28
1 Answers
3
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']

Erick Petrucelli
- 14,386
- 8
- 64
- 84

Dara Java
- 2,410
- 3
- 27
- 52
-
-
it's now `Tonal.Chord.detect(['C', 'F', 'G'])` in the latest version (v4) – DataGreed Mar 19 '23 at 03:17