Package Exports
- coda-music
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (coda-music) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
coda
Tired of regexping your way through your music notes? This package provides some useful abstractions to work with music concepts.
Quickstart
Install with:
npm install coda-musicUsage:
> var coda = require('coda-music');
> var Scale = coda.Scale;
> var Interval = coda.Interval;
> var Chord = coda.Chord;
> Scale.make('C', 'M')
{ id: 'CM',
specId: 'M',
label: 'C Major Scale',
ascending: [ 'C', 'D', 'E', 'F', 'G', 'A', 'B' ],
descending: [ 'B', 'A', 'G', 'F', 'E', 'D', 'C' ] }
> Scale.makeAll().length;
84
> Chord.make('C', '7')
{ id: 'C7',
specId: '7',
label: 'C 7th',
notes: [ 'C', 'E', 'G', 'A#' ] }
> Chord.makeAll().length;
336
> Interval.getHalfsteps(Interval.AUGMENTED_FIFTH);
8Roadmap
- Key signatures
- Harmonize a scale
- Make scale notes key-aware (currently uses sharps only)
- Ability to provide custom "specs" (templates to build scales/chords upon)
- Suggestions? Please, file an issue or consider submitting a PR!