A dictionary of music chords. This contains a json file with chord definitions (currently 106), and a javascript function to access them:
var chord = require('chord.dictionary')
chord('Maj7') // => { name: 'Maj7', aliases: ['M7', 'maj7']
// intervals: [ '1', '3', '5', '7' ],
// steps: [ ... ]
// binary: '100010010001', decimal: 2193 }
This is part of tonal
Install via npm: npm install --save chord.dictionary
. For browsers use the browserify or similar tool or get tonal.chord
You can get or require json data file directly:
var data = require('chord.dictionary/chords.json')
Or use the function:
var chord = require('chord.dictionary')
chord('Maj7') // => { name: 'Maj7', ... }
The function returns a data object with the following properties:
- name: the name of the chord
- aliases: an array with the alternative names of the chord
- intervals: an array with the intervals
- steps: an array with the intervals in array notation
- binary: a binary representation of the chord set
- decimal: the decimal representation of the chord set
You can get an array of available names:
var chord = require('chord.dictionary')
chord.names // => ['Maj7', 'm7', ...]
chord.names.length // => 107
MIT License