pitch-set

Create music pitch sets

Usage no npm install needed!

<script type="module">
  import pitchSet from 'https://cdn.skypack.dev/pitch-set';
</script>

README

pitch-set npm version

tonal

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 = require('pitch-set')

// pitch sets from a collection of notes (using first note as tonic)
pitchSet('C2 d4 g6 g3 f5') // => ['C', 'D', 'F', 'G']
// pitch set from intervals (simplified and ordered by size)
pitchSet('11 10 9 8') // => ['1P', '2M', '3M', '4P']

This is part of tonal:

var tonal = require('tonal')
tonal.pitchSet(...)

Install via npm: npm i --save pitch-set

License

MIT License