https://github.com/danigb/chromatic
Chromatic scales
https://github.com/danigb/chromatic
Last synced: 8 months ago
JSON representation
Chromatic scales
- Host: GitHub
- URL: https://github.com/danigb/chromatic
- Owner: danigb
- License: mit
- Created: 2015-07-05T09:11:08.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-07-15T02:34:45.000Z (almost 11 years ago)
- Last Synced: 2024-12-27T11:34:43.020Z (over 1 year ago)
- Language: JavaScript
- Size: 141 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Chromatic
Chromatic musical scales, in ascending or descending order, any length.
__This is a low level library, and almost an experiment. Probably you will prefer [musical-scales](http://github.com/danigb/musical-scales)__
## Usage
Require the module: `npm i --save chromatic` and use it:
```js
var chromatic = require('chromatic')
chromatic('C', 2) // => [ [ 'C2', 'Db2', 'D2', 'Eb2', 'E2', 'F2', 'Gb2', 'G2', 'Ab2', 'A2', 'Bb2', 'B2' ],
// [ 'C2', 'C#2', 'D2', 'D#2', 'E2', 'F2', 'F#2', 'G2', 'G#2', 'A2', 'A#2', 'B2' ] ]
```
## API: chromatic(root, octave = null, length = 12, descending = false)
Return an array of chromatic scales (array of notes) starting with the given root.
If octave is given, the notes has octave numbers. You can choose how many notes (with length) or if its descending (false by default)
```js
chromatic('Db', null, 3, true) // => [ [ 'Db4', 'C3', 'B3' ], [ 'Db4', 'Dbb4', 'Cb3' ] ]
´´´
## License
MIT