piu音符集合中的和弦识别
使用più库,我们可以从音符集中推断一些和弦名称。首先,通过npm安装库:
$ npm install piu
然后,您可能还需要安装teoria库,因为所有方法都依赖于teoria对象:
$ npm install teoria
现在,您已准备好推断三和弦、和弦扩展和名称!
示例代码:
// Infer the chords (strictly) constituted by the notes D, F, A, C
piu.infer(['d', 'f', 'a', 'c'].map(teoria.note)).map(piu.name);
// -> ['Dm7', 'F6']
下载地址
用户评论