pitch-set
is a function to create pitch sets (a collection of unique pitch classes or simplified intervals) from an arbitrary collection of notes or intervals:
var pitchSet = // pitch sets from a collection of notes (using first note as tonic) // => ['C', 'D', 'F', 'G']// pitch set from intervals (simplified and ordered by size) // => ['1P', '2M', '3M', '4P']
This is part of tonal:
var tonal = tonal
Install via npm: npm i --save pitch-set
License
MIT License