A dictionary of music scales:
var scale = require('music.scale.dictionary')
scale.get('phrygian') // => [ '1P', '2m', '3m', '4P', '5P', '6m', '7m' ]
scale.get('Db phrygian') // => [ 'Db', 'Ebb', 'Fb', 'Gb', 'Ab', 'Bbb', 'Cb' ]
scale.get('Eb4 phrygian') // => [ 'Eb4', 'Fb4', 'Gb4', 'Ab4', 'Bb4', 'Cb5', 'Db5' ]
This is part of music.kit
Via npm: npm i --save music.scale.dictionary
or grab the file (10kb minified) from dist folder.
The simplest usage is creating a scale from a name with tonic:
scale.get('F altered') // => [ 'F', 'Gb', 'Ab', 'A', 'Cb', 'Db', 'Eb' ]
scale.get('Gb enigmatic') // => [ 'Gb', 'Abb', 'Bb', 'Dbb', 'Ebb', 'Fb', 'F' ]
You can get scale intervals if you don't specify the tonic:
scale.get('bebop') // => [ '1P', '2M', '3M', '4P', '5P', '6M', '7m', '7M' ]
Use the names
function to get scale names. Passing true
as first argument return scale aliases names too:
scale.names() // => ['major', ...] (89 names)
scale.names(true) // => ['major', ...] (108 names)
The find
function get the scale name from a list of notes. All the notes of the scale must be inside the list and the first note of the list is considered the tonic:
scale.find('c g a b e f b5 d') // => 'major'
scale.find('d c g a b e f b5 d') // => 'dorian'
MIT License