Utils
Ranges
Functions to create note ranges
Range.numeric
Range.numeric(notes: Array<string|number>) => number[]
Create a numeric (midi) range. You supply a list of notes or numbers (peaks and valleys) and they will be connected to create complex ranges.
Arguments can be note names or midi numbers, ranges can be ascending or descending.
Range.chromatic
Range.chromatic(notes: Array<string|number>, options) => string[]
Create a range of chromatic notes. The same as numeric
but the result will be note names instead of midi numbers.
The optional options
object defines how note names are built:
- sharps: if
true
sharps will be used in altered notes. Default isfalse
- pitchClass: if
true
octaves are omited. Default isfalse