JavaScript 中基于音符字符串数组的和弦检测

Chord detection in JavaScript based on String Array of notes

我想根据带音符的输入字符串检测和弦(例如 'C''F''G')并得到结果输出和弦(在本例中,'Csus4').我做了一些研究,似乎所有的解决方案都适用于音频流输入。是否有一些 JavaScript 库基于字符串输入而不是音频流来执行此操作?

我发现 danigb/tonal library and the Detect module 完全符合我的需要:

import { chord } from 'tonal-detect'
chord(['C', 'F', 'G']) // => ['Csus4']