Chive
A utility for music related web apps. Chive makes it easy to generate scales for use in your web synth or other music related web app.
To add to your project:
$ [sudo] npm install --save chive
Usage
Use it with your app by implementing the following:
const chive = require('chive');
const scale = chive.newScale('D', 'major', '4');
const notes = scale.notes // returns an array of scale notes
Functions
newScale(key, type, octave);
options
key = a letter from A - G, # or b is optional
type = the scale quality. see input section for more details
octave = a number between 0 and 8 inclusive
Note: As of now only scales with key signatures are available to use ex. instead of D# major use Eb major
Input
Current scale build types include:
- Major / Ionian (major)
- Minor / Aeolian (minor)
- Dorian (dorian)
- Phrygian (phrygian)
- Lydian (lydian)
- Mixolydian (mixolydian)
- Locrian (locrian)
- Melodic Minor (melodic minor)
- Harmonic Minor (harmonic minor)
- Altered (altered)
Chive is a work in progress. The rebuild allows a cleaner way to generate scales for musical use.