A collection of functions manipulates the scale and returns diverse information about it
Methods
# (static) area(ropt) → {Number}
Returns the area of the polygon created by the nodes of the set on the bracelet. With radius left to its default value, the area of the entire bracelet is 1, so this function will return a value between 0 to 1.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
r |
Number |
<optional> |
0.56418958354776 | The radius of the circle/bracelet. The default value is the radius of a circle with area=1 |
- See:
-
- EDO#get.area
The area of the polygon. with the default settings if also conveys the percentage of the circle being occupied. (0=0% - 1=100%)
- Type
- Number
let edo = new EDO(12) //define context
let scale = edo.scale([0,1,2,3,4,5,6,7,8,9,10,11]) //chromatic scale
scale.get.coordinates() //returns 0.9549296585513847
scale = edo.scale([0,4,7]) //major triad
scale.get.area() //returns 0.376564638493296
# (static) binary_unevenness()
Documentation missing.
- See:
-
- EDO#get.unevenness()
# (static) cardinality_variety_ratio() → {Boolean}
returns the ratio of cardinality to variety as described by Clough and Myerson (see citation)
In the paper the concept of cardinality equals variety which is a maximally even set property. other scales may have a higher variety than cardinality and vice a versa.
- See:
-
- Clough, J. and G. Myerson (1985). "Variety and multiplicity in diatonic systems." Journal of music theory 29(2): 249-270.
- Type
- Boolean
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.is.cardinality_variety_ratio() //returns 1
let scale = edo.scale([0,1,4,5,7,9,10]) //major scale
scale.is.cardinality_variety_ratio() //returns 0.7104978354978355
# (static) chord_quality_from_shape(shape, scale_degreeopt) → {Array.<Number>}
Returns the pitch classes of a chord "shape" on a given scale degree.
for instance, in the C major scale, the shape 1,2,3,5 on 1 gives C D E G, and starting on 2, gives D E F A.
Remark: "pitch classes" conform to the current tuning system used. E.g., 0-11 in 12EDO, 0-16 in 17EDO, etc.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
shape |
Array.<Number> | The "shape" starting from 1. |
||
scale_degree |
Number |
<optional> |
1 | The scale degree on which to apply the shape (starting from 1) |
- The resultant pitch classes from that shape on that scale degree.
- Type
- Array.<Number>
let edo = new EDO(12) // define a tuning system
let scale = edo.scale([0,2,4,5,7,9,11])
scale.get.chord_quality_from_shape([1,5,6],1)
//returns [0, 7, 9]
scale.get.chord_quality_from_shape([1,3,4,5,7],7)
//returns [11, 2, 4, 5, 9]
scale.get.chord_quality_from_shape([1,7,3,13,9],5) //Get a 7,9,13 (no 5) chord, on scale degree 5, in this specific voicing.
# (static) coherence_quotient()
Returns the coherence quotient according to Carey (2007) (see citation)
- See:
-
- Carey, N. (2007). "Coherence and sameness in well-formed and pairwise well-formed scales." Journal of Mathematics and Music 1(2): 79-98.
Number
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,7,9]) //The pentatonic scale
scale.get.coherence_quotient() //returns 1
# (static) common_tone_transpositions(normalizeopt) → {Array.<Array.<Number>, Number>}
Returns all the transpositions of the scale that are constructed on the scale degrees of the original scale, As well the the number of notes altered to get from the original scale to the new scale as a "Tuple"
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
normalize |
Boolean |
<optional> |
true | when true, all of the transpositions will be constructed by altering the original scale |
An array containing all of the stacks
- Type
- Array.<Array.<Number>, Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,3,7]) //minor triad
scale.get.common_tone_transpositions()
//returns
[
[ [ 0, 3, 7 ], 0 ],
[ [ 0, 4, 9 ], 2 ],
[ [ 0, 5, 8 ], 2 ],
[ [ 3, 6, 10 ], 2 ],
[ [ 3, 8, 11 ], 2 ],
[ [ 2, 7, 10 ], 2 ],
[ [ 4, 7, 11 ], 2 ]
]
# (static) complement(from_0opt) → {Array.<Number>}
Returns all the pitch-classes (of the current tuning system) that the scale does not use.
Remark: "pitch classes" conform to the current tuning system used. E.g., 0-11 in 12EDO, 0-16 in 17EDO, etc.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
from_0 |
boolean |
<optional> |
false | when true, the output will be normalized to 0. |
- Type
- Array.<Number>
let edo = new EDO(12) // define a tuning system
let scale = edo.scale([0,2,4,5,7,9,11])
scale.get.complement()
//returns [1, 3, 6, 8, 10]
scale.get.complement(true)
//returns [0, 2, 5, 7, 9]
# (static) constituent_similarity() → {Number}
returns a measure of self similarity in the scale's steps sizes (not to be confused with Scale#get.step_similarity() which takes all steps into account). The more similar the sizes are to one another the closer the value is to 1. The less similar the sizes are to one another, the closer they are to 0.
- See:
-
- Scale#get.step_similarity()
The self-similarity measure
- Type
- Number
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.constituent_similarity() //returns 0.9166666666666666
let scale = edo.scale([0,2,4,6,8,10]) //whole-tones
scale.get.constituent_similarity() //returns 1
let scale = edo.scale([0,1]) //
scale.get.constituent_similarity() //returns 0.16666666666666663
# (static) coordinates(circle_centeropt, ropt) → {Array.<Array.<Number, Number>>}
Returns the [x,y] coordinates of the nodes of the scale.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
circle_center |
Array.<Number> |
<optional> |
[0,0] | The center of the circle |
r |
Number |
<optional> |
0.56418958354776 | The radius of the circle. By default the radius is of a circle with area=1 |
- See:
An array with tuples each corresponding to the x,y position of every pitch
- Type
- Array.<Array.<Number, Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,3,7]) //minor triad
scale.get.coordinates()
//returns [
[00.56418958354776]
[0.564189583547763.454664838020213e-17]
[-0.2820947917738801-0.48860251190292314]
]
# (static) diagnostic_combinations() → {Array.<Array.<Number>>}
Returns the intervals and combinations of intervals that only occur once in the set.
For instance, in the diatonic set (0 2 4 5 7 9 11) an interval of 6 semitones only occurs once (between 5 and 11). It is therefore a "diagnostic" interval within the diatonic scale.
- See:
-
- EDO#get.diagnostic_intervals
- EDO#get.minimal_diagnostic_combination
An array containing all diagnostic combinations
- Type
- Array.<Array.<Number>>
# (static) diagnostic_intervals() → {Array.<Number>}
Returns the (specific) intervals that only occur once in the set.
For instance, in the diatonic set (0 2 4 5 7 9 11) an interval of 6 semitones only occurs once (between 5 and 11). It is therefore a "diagnostic" interval within the diatonic scale.
- See:
-
- EDO#get.minimal_diagnostic_combination
- EDO#get.diagnostic_combinations
An array containing all diagnostic intervals (or an empty array if none are available)
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //The diatonic set
scale.get.diagnostic_intervals() //returns [6]
# (static) edo()
Returns the current edo (number of equal divisions of the octave) used by the scale
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //The diatonic set
scale.get.edo() //returns 12
# (static) entropy() → {Number}
from Information Theory: Returns the (weighted) average (in bits) representing how much information on average, an n-chord of cardinality n provides. .
- Type
- Number
# (static) evenness_of_spread() → {Number}
Returns the variance value between the current scale, and a perfectly even scale. So 0 is maximally even.
- Type
- Number
# (static) generic_intervals(generic_interval_size-) → {Array.<Object>}
Given a generic interval ("scale degrees apart") returns all of the specific intervals.
Name | Type | Description |
---|---|---|
generic_interval_size- |
Number | The generic interval |
- See:
-
- Rahn, J. (1991). "Coordination of interval sizes in seven-tone collections." Journal of Music Theory 35(1/2): 33-60.
- Scale#get.specific_intervals
- Type
- Array.<Object>
let edo = new EDO(12) // define a tuning system
let scale = edo.scale([0,2,4,5,7,9,11])
scale.get.generic_intervals(3) //3 scale-degrees apart (e.g 4ths)
//returns
[
{"generic":3,"specific":5,"pitches":[[0,5],[2,7],[4,9],[7,0],[9,2],[11,4]],"instances":6},
{"generic":3,"specific":6,"pitches":[[5,11]],"instances":1}
]
# (static) identity_fragment() → {Identity_Fragment}
Returns the Identity Fragments of the given set.
An identity fragment is a combination of pitches from the set, that appear in ALL of the set's Scale#get.diagnostic_combinations[diagnostic combinations].
- An array of objects. Each object contains
- Type
- Identity_Fragment
let edo = new EDO(12) // define a tuning system
let scale = edo.scale([0,2,5,7,10])
scale.get.identity_fragment()
//returns
[
{
set: [ 0, 2, 5, 7, 10 ],
mode: [ 0, 2, 4, 7, 9 ],
fragment: [ 0, 4 ],
is_diagnostic: true
}
]
# (static) information() → {Number}
from Information Theory: Returns the self-information (in bits) representing how much the space of possible transpositions of this scale are narrowed down given this combination of pitches.
For instance, in the set [0,2,4,7,9] the combination [0 5] can appear in 4 combinations: [10,0,2,5,7], [8,10,0,3,5], [5,7,9,0,2], and [3,5,7,10,0] Therefore, the combination narrows down the space of possible transposition from 12 to 4, which is a factor of 3, or 1.584962500721156 bits of entropy
Similarly, [0,2] cuts the space by a factor of 4, or 2 bits.
- Type
- Number
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9])
scale.get.entropy([0,4]) // returns 3.584962500721156
scale.get.entropy([0,3,5]) // returns 2.584962500721156
# (static) interval_class(PC1, PC2) → {Array.<Number>}
Returns the interval between two pitch classes.
Remark: "pitch classes" conform to the current tuning system used. E.g., 0-11 in 12EDO, 0-16 in 17EDO, etc.
Name | Type | Description |
---|---|---|
PC1 |
Number | The first pitch class |
PC2 |
Number | The second pitch class |
- Type
- Array.<Number>
let edo = new EDO(12) // define a tuning system
edo.get.interval_class(1,8) //returns 5
# (static) interval_vector(cache) → {Array.<Number>}
Returns the interval vector of the scale.
Name | Type | Description |
---|---|---|
cache |
Boolean | When true, the result will be cached for faster retrieval |
An array representing the vector
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.interval_vector() //returns [ 1, 5, 2, 3, 3, 1 ]
# (static) inversion(cacheopt) → {Array.<Number>}
Returns the scale's inversion
Name | Type | Attributes | Description |
---|---|---|---|
cache |
Boolean |
<optional> |
When true, the result will be cached for future retrieval |
the inverted pitches
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.inversion() //returns [0, 2, 4, 6, 7, 9, 11]
# (static) least_step_multiplier() → {Number}
Returns the smallest multiplier between the sizes of steps
The step sizes
- Type
- Number
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,1,4,5,7,8,11]) //define scale with 3 kinds of steps (1,2, and 3)
scale.get.least_step_multiplier()
//returns 1.5
//2 is a multiplier of 2 over 1. 3 is a multiplier of 3 over one and 1.5 over two.
//Therefore, the function will return 1.5.
# (static) lerdahl_attraction(note1, note2) → {Number}
Calculates the attraction between note1 to note2 according to Lerdahl's formula in TPS
Name | Type | Description |
---|---|---|
note1 |
Number | The first pitch-class |
note2 |
Number | The second pitch-class |
- See:
-
- Lerdahl, F. (2004). Tonal pitch space, Oxford University Press.
The value of attraction between note1 and note2
- Type
- Number
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.lerdahl_attraction(1,0) //returns 4
# (static) lerdahl_attraction_vector() → {Array.<String>}
Returns a graphic vector showing the tendencies of each note in the scale
- See:
-
- Scale.get.lerdahl_attraction()
- Lerdahl, F. (2004). Tonal pitch space, Oxford University Press.
The attraction vector
- Type
- Array.<String>
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.lerdahl_attraction_vector() //returns [*,<>,*,<>,*,<<,>>]
# (static) levenshtein(t, ratio_calcopt) → {Number}
Returns the Levenshtein distance of the scale to another scale
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
t |
Array.<Number> | Some collection of pitches to perferm the comparison with |
||
ratio_calc |
Boolean |
<optional> |
false | When true, the function computes the levenshtein distance ratio of similarity between two strings |
- See:
- Type
- Number
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,7,9]) //a major pentatonic scale
scale.get.levenshtein([0,2,4,5,7,9,11]) //returns 2
scale.get.levenshtein([0,2,4,5,7,9,11],true) //returns 0.9230769230769231
# (static) mean() → {Number}
Returns the mean of the scale's pitches. This is useful if you need to quantify how sharp/flat a scale is.
- The mean of the pitches
- Type
- Number
# (static) melody_from_intervals(intervals, starting_scale_degreeopt, starting_pitchopt) → {Array.<Number>}
Returns a melody by providing a list of generic intervals to traverse within the scale.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
intervals |
Array.<Number> | A list of generic intervals (how many scale degrees away from current) |
||
starting_scale_degree |
Number |
<optional> |
1 | The first note of the melody |
starting_pitch |
Number |
<optional> |
0 | The first pitch of the melody |
- The a diatonic melody
- Type
- Array.<Number>
let edo = new EDO(12) // define a tuning system
let scale = edo.scale([0,2,4,5,7,9,11]) //major
scale.get.melody_from_intervals([7,-1,-2,1,1,1,-7,5,-1,-6,5,-1]) //Over the rainbow
//returns [0, 12, 11, 7, 9, 11, 12, 0, 9, 7, -3, 5, 4]
# (static) minimal_diagnostic_combination() → {Array.<Array.<Number>>}
Returns the smallest combination of interval that identifies the mode and transposition of the scale. That is, given some specific set (say, the diatonic), what are the least amount of information that is neccesary to know which transposition and mode of the diatonic the set manifests in.
- See:
-
- EDO#get.diagnostic_intervals
- EDO#get.diagnostic_combinations
An array containing all diagnostic combinations of the lowest possible cardinality
- Type
- Array.<Array.<Number>>
# (static) mixture(expand_by) → {Array.<Array.<Number>>}
Returns the substitution possibilities available by "borrowing" notes from other modes of the set. This follows the basic concept of mixture, wherein one might explain the ascending melodic minor scale as a major scale, with a flattened 3 "borrowed from the natural minor"
Name | Type | Description |
---|---|---|
expand_by |
Number | A number by which to expend the possible mixture possibilities in every direciton. |
- The mixture
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) // define a tuning system
let scale = edo.scale([0,2,4,7,9]) // The pentatonic
scale.get.mixture()
//returns [ [ 0 ], [ 2, 3 ], [ 4, 5 ], [ 7, 8 ], [ 9, 10 ] ]
scale.get.mixture(1)
//returns [
[ 0 ],
[ 1, 2, 3, 4 ],
[ 3, 4, 5, 6 ],
[ 6, 7, 8, 9 ],
[ 8, 9, 10, 11 ]
]
# (static) mode_variance(cache) → {Number}
Returns a measure in cents of how different on average are the different modes from one another. 0 means all modes are exactly the same (there's no variance between the modes = there are no modes).
Name | Type | Description |
---|---|---|
cache |
Boolean | When true, the result will be cached for faster retrieval |
- Type
- Number
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,6,8,10]) //Wholetones
scale.get.mode_variance() // returns 0
let scale = edo.scale([0,2,4,5,7,9,11]) //Diatonic
scale.get.mode_variance() // returns 42.857142857142854
let scale = edo.scale([0,1,2,3,4]) //chromatic tetrachord
scale.get.mode_variance() // returns 280
# (static) modes(cache) → {Array.<Array.<Number>>}
Returns all the various modes (normalized to 0, that include all pitches) available from this scale
Name | Type | Description |
---|---|---|
cache |
Boolean | When true, the result will be cached for faster retrieval |
- See:
An array of the different modes
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9]) //pentatonic scale
scale.get.modes()
//returns
[
[ 0, 2, 4, 7, 9 ],
[ 0, 2, 5, 7, 10 ],
[ 0, 3, 5, 8, 10 ],
[ 0, 2, 5, 7, 9 ],
[ 0, 3, 5, 7, 10 ]
]
# (static) modes_with_notes() → {Array.<Array.<Number>>}
Returns all the modes of the set that contain the specified notes
An array of the different modes
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9]) //pentatonic scale
scale.get.modes_with_notes([2,5])
//returns
[
[ 0, 2, 5, 7, 10 ],
[ 0, 2, 5, 7, 9 ],
]
# (static) motives_diatonic(melody, allow_skipsopt) → {Array.<motive>}
Same as EDO.get.motives() only instead of considering pitches as pitch classes, it looks at them as scale degrees.
As such, in the scale [0,2,4,5,7,9,11]
, [0,2,4]
and [2,4,5]
are considered the same motive
This is because while the former has steps of size [2,2]
and the latter [2,1]
they both represent moving
2 scale degrees up step wise in the scale [1,1]
.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
melody |
Array.<Number> | a collection of pitches to find (in order) |
||
allow_skips |
Boolean |
<optional> |
true | if false, the search will only be done on consecutive items |
- See:
- Type
- Array.<motive>
let edo = new EDO(12) // define a tuning system
let melody = [8,7,7,8,7,7,8,7,7,15,15,14,12,12,10,8,8,7,5,5] // Mozart Symphony no. 40
let scale = edo.scale([0,2,3,5,7,8,10]) //natural minor
scale.get.motives_diatonic(melody) // find diatonic motives in the melody
.slice(0,3) //show top 3
//returns (motives are represented in change in scale degrees)
[
{ motive: [ 0 ], incidence: 9 },
{ motive: [ -1 ], incidence: 6 },
{ motive: [ -1, 0 ], incidence: 5 }
]
# (static) n_chords(n, normalizeopt, prime_formopt, cacheopt) → {Array.<Number>}
Returns every n_chord (bichord (n=2
), trichord (n=3
), tetrachord (n=4
), etc.) available in this scale
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
n |
Number | Number of pitches in every chord |
||
normalize |
Boolean |
<optional> |
true | When true, the function will return n_chords in normal order. otherwise it will return them as they appear in the scale |
prime_form |
Boolean |
<optional> |
false | When true, the function will return n_chords in prime form |
cache |
Boolean |
<optional> |
When true, the result will be cached for faster retrieval |
An array containing all n_chords
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9]) //pentatonic scale
scale.get.n_chords(3) //same as scale.get.trichords()
[
[ 0, 2, 4 ],
[ 0, 2, 7 ],
[ 0, 3, 5 ],
[ 0, 4, 7 ],
[ 0, 3, 7 ],
[ 0, 2, 5 ]
]
# (static) n_chords_diatonic(n) → {Array.<steps_quality_obj>}
Return every quality available in the scale for a combination of n
scale degrees.
Name | Type | Description |
---|---|---|
n |
Number | Number of pitches in every chord |
- Type
- Array.<steps_quality_obj>
# (static) name()
The name of the scale in the form EDO-Code, EDO being the number of divisions of the octave in the current system, and code being the binary value of the scale (see example below).
For simplicity consider a system with 4 divisions. Such a system has 4 possible pitches: [0,1,2,3]
.
The scale vector is a binary representation of the pitch-classes used in the scale in reversed order. So the scale
[0,2] would have a representation of: [0,1,0,1]
As such, the name for this scale will be 4-5
# (static) necklace_family()
Returns the steps of the scale in descending order
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9]) //pentatonic scale
scale.get.necklace_family() // returns [ 3, 3, 2, 2, 2 ]
# (static) necklace_family_members()
Returns the steps of the scale in descending order
- See:
-
- Scale#get.necklace_family()
let edo = new EDO(12) //define context
let scale = edo.scale([0, 3, 5, 8, 10]) //pentatonic scale
scale.get.necklace_family_members()
// [
[ 0, 3, 5, 8, 10 ],
[ 0, 3, 6, 8, 10 ]
]
# (static) neighborhood(sizeopt, alterationsopt, normalizeopt, maintain_cardinalityopt) → {Array.<Number>}
Returns all of the sets whose constituents are at most size
away from the original constituent, where no more than alterations
constituents were altered.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
size |
Number |
<optional> |
1 | Maximal alteration size (e.g. if 2, 3 can be altered into 2, 1, 4, or 5) |
alterations |
Number |
<optional> |
1 | Maximal number of constituents that can be altered. |
normalize |
Boolean |
<optional> |
true | When true, the function will return the sets in normal order. |
maintain_cardinality |
Boolean |
<optional> |
true | When true, the function will only return sets that have the same number of pitches as the original set. |
An array containing all neighboring sets
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,4,7])
scale.get.neighborhood() //returns
[
[ 0, 3, 6 ],
[ 0, 3, 7 ],
[ 0, 2, 7 ],
[ 0, 4, 8 ],
[ 0, 4, 6 ]
]
# (static) normal_order(cacheopt) → {Array.<Number>}
Returns the scale's pitches in normal order
Name | Type | Attributes | Description |
---|---|---|---|
cache |
Boolean |
<optional> |
When true, the result will be cached for future retrieval |
The pitches in normal order
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.normal_order() //returns [0, 1, 3, 5, 6, 8, 10]
# (static) pairwise_generic_specific_intervals(SD1, SD2) → {Array.<Number>}
Returns the generic and specific intervals for a pair of scale degrees
Name | Type | Description |
---|---|---|
SD1 |
Number | The first scale degree |
SD2 |
Number | The second scale degree |
- Type
- Array.<Number>
* @see Rahn, J. (1991). "Coordination of interval sizes in seven-tone collections." Journal of Music Theory 35(1/2): 33-60.
# (static) per_note_set_difference(setopt) → {Object}
Returns a vector indicating the delta between two different sets of the same cardinality.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
set |
Array.<Number> |
<optional> |
[0,2,4,5,7,9,11] | The set the current scale is compared to |
- Type
- Object
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,8,10])
scale.get.per_note_set_difference() //returns [0, 0, 0, 0, 0, 1, 1]
# (static) permutations() → {Array.<Array.<Number>>}
Returns every ordering (permutation) of notes in the scale
- See:
The permutations of the scale
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,3,7]) //minor triad
scale.get.permutations()
//returns
[
[ 0, 4, 7 ],
[ 0, 7, 4 ],
[ 4, 0, 7 ],
[ 4, 7, 0 ],
[ 7, 0, 4 ],
[ 7, 4, 0 ]
]
# (static) pitches() → {Array.<Number>}
Returns the scale's pitches as pitch classes
Remark: "pitch classes" conform to the current tuning system used. E.g., 0-11 in 12EDO, 0-16 in 17EDO, etc.
The scale's pitches as pitch-classes
- Type
- Array.<Number>
# (static) position_of_quality() → {Array.<Number>}
Gets a list of intervallic units above a root, and returns all the positions in the scale where this chord quality can be created
Remark: "intervallic units" conform to the current tuning system used. E.g., 0-11 occupy 1 octave in 12EDO, 0-16 in 17EDO, etc.
The pitch-classes (that appear in the scale) on which the quality can be built
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.position_of_quality([4,7]) (a major triad)
//returns [0,5,7] because you can construct a major triad on 0, 5, and 7
# (static) prime_form(cacheopt) → {Array.<Number>}
Returns the scale's pitches in prime form
(Notice, the prime form calculation conforms to Rahn's prime form rather than Forte's)Name | Type | Attributes | Description |
---|---|---|---|
cache |
Boolean |
<optional> |
When true, the result will be cached for future retrieval |
The pitches in prime form
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.prime_form() //returns [0, 1, 3, 5, 6, 8, 10]
# (static) product(multiplier, sortopt) → {Array.<Number>}
Returns the scale's pitches in prime form
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
multiplier |
Number | The number by which to multiply the set |
||
sort |
Boolean |
<optional> |
false | When true, the returned result will be sorted |
The pitches after multiplication
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9]) //pentatonic scale
scale.get.product(2) //returns [ 0, 4, 8, 2, 6 ]
scale.get.product(5,true) //returns [ 0, 8, 9, 10, 11 ]
# (static) quality_with_intervals(intervals, length) → {Array.<Number>}
Returns note combination of a given length who are restricted to only using specified intervals that are members of the scale
Name | Type | Description |
---|---|---|
intervals |
Array.<Number> | A list of allowed intervals |
length |
Number | The length of the returned combinations. If not specific length will default to the length of the scale |
The pitches after multiplication "intervals" conform to the current tuning system used. 0-11 occupy 1 octave in 12EDO, 0-16 in 17EDO, etc.
- Type
- Array.<Number>
# (static) reflectional_symmetry() → {Array.<Array.<Number>>}
Returns the pitches of the scales about which the scale is symmetrical by reflection.
An array containing the scale's steps about which it is symmetrical by reflection
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0, 1, 3, 5, 6, 7, 9, 11])
scale.get.reflectional_symmetry() //returns [0, 3, 6, 9]
let edo = new EDO(13) //define context
let scale = edo.scale([0, 1, 4, 6, 7, 9, 12])
scale.get.reflectional_symmetry() //returns [0]
# (static) resize_melody(melody, resize_by, methodopt) → {Array.<Number>}
Expends / contracts the intervals between pitches of a melody.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
melody |
Array.<Number> | The melody to be modified |
||
resize_by |
Number | The amount by which the melody will be modified (can be positive/negative/fraction) |
||
method |
String |
<optional> |
"multiply" | "add" to add resize by to any interval. "multiply" to multiply the intervals by the value. |
- Type
- Array.<Number>
let edo = new EDO(12) // define a tuning system
edo.get.resize_melody([0,2,4,5,7,5,4,2,-1,0],2)
//returns [0, 4, 8, 10, 14, 10, 8, 4, -2, 0]
edo.get.resize_melody([0,2,4,5,7,5,4,2,-1,0],-1)
//[0,-2,-4,-5,-7,-5,-4,-2,1,0]
edo.get.resize_melody([0,2,4,5,7,5,4,2,-1,0],-1,method='add')
//returns
[0,1,2,2,3,2,2,1,-1,-1]
# (static) rotational_symmetry() → {Array.<Array.<Number>>}
Returns the pitches of the scales about which the scale is symmetrical by rotation.
An array containing the scale's steps about which it is symmetrical by rotation
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,3,6,9])
scale.get.rotational_symmetry() //returns [0, 3, 6, 9]
let scale = edo.scale([0, 1, 7, 9])
scale.get.rotational_symmetry() //returns [0]
# (static) rotations() → {Array.<Array.<Number>>}
Returns all of the rotations of the scale (not normalized to 0).
To get the rotations normalized to zero (the modes) use Scale.get.modes()
The rotations of the scale
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,3,7]) //minor triad
scale.get.rotations()
//returns [[0,3,7],[3,7,0],[7,0,3]]
# (static) rothenberg_propriety(cacheopt) → {'strictly proper'|'proper'|'improper'}
Returns the Rothenberg Propriety value for this scale
Name | Type | Attributes | Description |
---|---|---|---|
cache |
Boolean |
<optional> |
When true, the result will be cached for future retrieval. |
- See:
-
- Rothenberg, D. (1977). "A model for pattern perception with musical applications part I: Pitch structures as order-preserving maps." Mathematical Systems Theory 11(1): 199-234.
The step sizes
- Type
- 'strictly proper' | 'proper' | 'improper'
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,7,9]) //a major pentatonic scale
scale.get.rothenberg_propriety()
//returns "strictly proper"
# (static) roughness(all_modesopt, base_freqopt)
Returns the sum of the roughness of every pair in the set in a certain mode or averaged across all modes
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
all_modes |
Boolean |
<optional> |
false | When true, the algorithm returns the roughness value for all of the modes |
base_freq |
Number |
<optional> |
440 | The frequency to associate with the pitch-class 0 |
- See:
-
- EDO#get.sine_pair_dissonance
Number
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,7,9]) //a major pentatonic scale
scale.get.roughness()
//returns 0.21543265646088483
# (static) runs(minimizeopt) → {Array.<Array.<Number>>}
Returns the scale as steps, broken to their repetitive segments (runs).
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
minimize |
Boolean |
<optional> |
false | when true, the scale will be rotated to the mode that minimizes the number of segments |
An array containing the scale's steps in segments
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.runs()
//returns [[2,2],[1],[2,2,2],[1]]
let scale2 = edo.scale([0,2,4,7,10])
scale2.get.runs(true) // returns [[3,3],[2,2,2]] (rather than [[2,2],[3,3],[2]] without minimizing)
# (static) sameness_quotient()
Returns the sameness quotient according to Carey (2007) (see citation)
- See:
-
- Carey, N. (2007). "Coherence and sameness in well-formed and pairwise well-formed scales." Journal of Mathematics and Music 1(2): 79-98.
Number
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,6,8,10]) //a whole-tone scale
scale.get.sameness_quotient() //returns 1
scale = edo.scale([0,2,4,5,7,9,11]) //the diatonic scale
scale.get.sameness_quotient() //returns 0.5555555555555556
# (static) scale_degree_roles(interval_mapopt) → {Array.<Array.<Number>>}
Returns every possible interpretation of the scale's intervals in terms of their possible scale degree
Name | Type | Attributes | Description |
---|---|---|---|
interval_map |
Object |
<optional> |
a map of every interval and the role it can play in the scale (for instance PC6 in 12EDO can be both an augmented 4th and a diminished 5th. see code for clarity). This paramater must be passed in EDO systems other than 12. |
An array containing every interpretation of the scale degrees.
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9]) //pentatonic scale
scale.get.scale_degree_roles()
//returns [ [ 1, 2, 3, 5, 6 ] ] (the last note can be interpreted as a major 6th, or a diminished 7th)
# (static) scale_degree_transpositions(normalizeopt) → {Array.<Array.<Number>, Number>}
Returns all the transpositions of the scale that are constructed on the scale degrees of the original scale, As well the the number of notes altered to get from the original scale to the new scale as a "Tuple"
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
normalize |
Boolean |
<optional> |
true | when true, all of the transpositions will be constructed by altering the original scale |
An array containing all of the stacks
- Type
- Array.<Array.<Number>, Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.scale_degree_transpositions()
//returns
[
[ [0, 2, 4, 5, 7, 9, 11], 0 ],
[ [0, 2, 4, 5, 7, 9, 10], 1 ],
[ [0, 2, 4, 6, 7, 9, 11], 1 ],
[ [1, 2, 4, 6, 7, 9, 11], 2 ],
[ [1, 2, 4, 6, 8, 9, 11], 3 ],
[ [1, 3, 4, 6, 8, 9, 11], 4 ],
[ [1, 3, 4, 6, 8, 10, 11], 5 ]
]
# (static) sequence_transposition(seq, transposition) → {Array.<Number>}
Transposes a melody within the scale by a given number of scale degrees
Name | Type | Description |
---|---|---|
seq |
Array.<Number> | The original melody / sequence to be "transposed" |
transposition |
Number | The number of scale degrees (up or down) by which to shift the melody. |
The transposed pitches
- Type
- Array.<Number>
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,7,9]) //a major pentatonic scale
scale.get.sequence_transposition([0,2,4],1) //returns [ 2, 4, 7 ]
# (static) set_difference(setopt, consider_all_modesopt, valid_diviations_maxopt) → {Object}
Returns the difference between the current scale and a given set.
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
set |
Array.<Number> |
<optional> |
[0,2,4,5,7,9,11] | The set the current scale is compared to |
consider_all_modes |
Boolean |
<optional> |
false | Indicates whether the algorithm should consider every possible mode of the current scale to assess which is closest to the comparison set, or whether it should only consider the current set in its current mode. |
valid_diviations_max |
Number |
<optional> |
1 | The maximal amount each constituent can be "altered" to still be considered a "valid" alteration of the comparison set. |
- Type
- Object
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,8,10]) //
scale.get.set_difference() //returns
{
valid: true, //Whether it's a valid alteration of the comparison set or not
alterations: 2, //The amount of pitches that were altered between the sets
delta: [0, 0, 0, 0, 0, -1, -1], //The alteration vector
mode: [0, 2, 4, 5, 7, 8, 10] // The mode of the scale that was used
}
# (static) shortest_path(destination_scale_degree, up_steps, down_steps)
Same as EDO.get.shortest_path() but for diatonic cases.
Instead of thinking in "intervals" it thinks in steps and scale degrees. so in the context of C major, moving from E to G is a move of size 3 (scale degrees), and from C to E is also 3 (scale degrees) even though in one case it's a minor third and in the other its a Major third.
<p>In this function the starting point is scale_degree 1</p>
Name | Type | Description |
---|---|---|
destination_scale_degree |
Number | |
up_steps |
Number | |
down_steps |
Number |
# (static) sine_pair_dissonance(freq1, freq2, amp1opt, amp2opt) → {Number}
Returns the ROUGHNESS OF SINE-PAIRS based on algorithm from Vassilakis, 2001 & 2005 .
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
freq1 |
Number | the frequency of the 1st sine |
||
freq2 |
Number | the frequency of the 2nd sine |
||
amp1 |
Number |
<optional> |
1 | the amplitude of the 1st sine |
amp2 |
Number |
<optional> |
1 | the amplitude of the 2nd sine |
- See:
-
- http://www.acousticslab.org/learnmoresra/moremodel.html
- Vassilakis, P. (2001). "Auditory roughness estimation of complex spectra—Roughness degrees and dissonance ratings of harmonic intervals revisited." The journal of the Acoustical Society of America 110(5): 2755-2755.
- Type
- Number
edo.get.sine_pair_dissonance(440,475) //returns 0.08595492117939352
# (static) specific_intervals(specific_interval_size-) → {Array.<Object>}
Given a specific interval (in semitones or whatever the smallest division is) returns all of the generic intervals.
Name | Type | Description |
---|---|---|
specific_interval_size- |
Number | The specific interval size (in semitones or whatever the smallest division is) |
- See:
-
- Rahn, J. (1991). "Coordination of interval sizes in seven-tone collections." Journal of Music Theory 35(1/2): 33-60.
- Scale#get.generic_intervals
- Type
- Array.<Object>
let edo = new EDO(12) // define a tuning system
let scale = edo.scale([0,2,4,5,7,9,11])
scale.get.specific_intervals(6)
//returns
[
{"generic":"3","specific":6,"pitches":[[5,11]],"instances":1},
{"generic":"4","specific":6,"pitches":[[11,5]],"instances":1}
]
# (static) stacks(levels, skip) → {Array.<Array.<Number>>}
Returns a list of lists of size "levels" made out of scale degrees with "skip" steps skipped apart.
Name | Type | Description |
---|---|---|
levels |
Number | The number of levels to the stack |
skip |
Number | The number of scale steps to skip between each level on the stack |
An array containing all of the stacks
- Type
- Array.<Array.<Number>>
[0,2,4,5,7,9,11] in 12-TET Scale.get.stacks(3,1)
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.stacks(3,1) //get all tercial stacks of 3
//returns [[0, 3, 6], [0, 3, 7], [0, 4, 7]]
scale.get.stacks(5,2) //get all quartal stacks of 5
//returns
[
[ 0, 5, 11, 4, 9 ],
[ 0, 5, 10, 3, 9 ],
[ 0, 5, 10, 3, 8 ],
[ 0, 6, 11, 4, 9 ],
[ 0, 5, 10, 4, 9 ]
]
# (static) step_mean_error() → {Number}
Returns the mean difference between each step in the set, and an equally-dividing step-size. (In a scale of cardinality-7, the difference between each step, and the minimal step-size in 7-EDO)
The mean difference
- Type
- Number
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.step_mean_error() //returns 0.4081632653061225
let scale = edo.scale([0,2,4,6,8,10]) //whole-tones
scale.get.step_mean_error() //returns 0
# (static) step_similarity() → {Number}
returns a measure of self similarity in the scale's steps. The more similar the steps are to one another the closer the value is to 1. The less similar the steps are to one another, the closer they are to 0.
The self-similarity measure
- Type
- Number
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.step_similarity() //returns 0.9319727891156463
let scale = edo.scale([0,2,4,6,8,10]) //whole-tones
scale.get.step_similarity() //returns 1
let scale = edo.scale([0,1]) //
scale.get.step_similarity() //returns 0.16666666666666663
# (static) step_sizes() → {Array.<Number>}
Returns a list of unique step sizes that appear in the scale.
The step sizes
- Type
- Array.<Number>
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.step_sizes()
//returns [1,2]
# (static) step_tally(cacheopt) → {Array.<Array.<Number>>}
Returns and array with every step size appearing in the set, with the number of times it occurs.
Name | Type | Attributes | Description |
---|---|---|---|
cache |
Boolean |
<optional> |
When true, the result will be cached for future retrieval |
The step tally in the form of [[step_size,# occurances],[ST,#],...]
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,1,4,5,7,9,11])
scale.get.step_tally()
//returns [ [ 1, 3 ], [ 2, 3 ], [ 3, 1 ] ] //step size 1 occures 3 times, step size 2 occues 3 times, step size 3, occures 1 time.
# (static) steps_to_qualities(steps) → {quality_position_obj}
from a given array of steps taken, returns all of the available qualities and their positions
Name | Type | Description |
---|---|---|
steps |
Array.<Number> | steps in the scale in the form of [1,1,2,1..] (1=one step, 2= two steps, etc) |
The step sizes
- Type
- quality_position_obj
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,5,7,9,11]) //major scale
scale.get.steps_to_qualities([1,1]) //two successive steps
//returns
{
"steps":[1,1],
"combos":[
{"quality":[0,2,4],"positions":[0,5,7]},
{"quality":[0,2,3],"positions":[2,9]},
{"quality":[0,1,3],"positions":[4,11]}
]
}
# (static) supersets(scales) → {Array.<Array.<Number>>}
Returns the sets that the scale is contained in from a given list of sets
Name | Type | Description |
---|---|---|
scales |
Array.<Array.<Number>> | a list of scales |
the scales that contain the Scale object
- Type
- Array.<Array.<Number>>
let edo = new EDO(12) //define context
let scale = edo.scale([0,3,7]) //minor triad
scale.get.supersets([[0,1,2,3,4,5,6,7],[0,3,4,7],[0,1,2]])
//returns [[0,1,2,3,4,5,6,7],[0,3,4,7]]
# (static) symmetricalness(optionsopt) → {Symmetricalness|Symmetricalness_verbose}
Returns a measure of how geometrically symmetrical (self-similar) the structure is.
This done by counting the total number of pitch combinations, and dividing them by the number of distinct pitch combinations
Name | Type | Attributes | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
An object with optional parameters Properties
|
let edo = new EDO(12) //define context
let scale = edo.scale([0,3,6,9])
scale.get.Symmetricalness() // returns { distinct: 4, manifestations: 16, ratio: 4, normalized: 1 }
let scale = edo.scale([0,1,6,7])
scale.get.Symmetricalness() // returns { distinct: 6, manifestations: 14, ratio: 2.3333333333333335, normalized: 0.4444444444444445}
let scale = edo.scale([0,2,6,8])
scale.get.Symmetricalness() // returns { distinct: 8, manifestations: 14, ratio: 1.75, normalized: 0.25 }
let scale = edo.scale([0,2,4,6,8])
scale.get.Symmetricalness({min_n:3,max_n:4,verbose:true})
// returns [
{ fragment: [ 0, 2, 4 ], manifestations: 3 },
{ fragment: [ 0, 2, 6 ], manifestations: 3 },
{ fragment: [ 0, 4, 6 ], manifestations: 3 },
{ fragment: [ 0, 4, 8 ], manifestations: 3 },
{ fragment: [ 0, 2, 4, 6 ], manifestations: 2 },
{ fragment: [ 0, 2, 4, 8 ], manifestations: 2 },
{ fragment: [ 0, 2, 6, 8 ], manifestations: 2 }
]
# (static) tetrachords(cache) → {Array.<Number>}
Returns every tetrachord (normalized to 0) available in this scale
Note: for a collection of all pitch subsets of length n (rather than 4) use Scale.get.n_chords()
Name | Type | Description |
---|---|---|
cache |
Boolean | When true, the result will be cached for faster retrieval |
An array containing all tetrachords
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9]) //pentatonic scale
scale.get.tetrachords()
//returns [ [ 0, 2, 4, 7 ], [ 0, 3, 5, 7 ], [ 0, 2, 5, 7 ], [ 0, 3, 5, 8 ] ]
# (static) transposition(amount) → {Array.<Number>}
Returns the scale's pitches transposed by a certain amount
Name | Type | Description |
---|---|---|
amount |
Number | The amount by which to transpose the pitches |
The transposed pitches
- Type
- Array.<Number>
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,7,9]) //a major pentatonic scale
scale.get.transposition(5) //returns [ 5, 7, 9, 0, 2 ]
# (static) transpositions_with_pitches(pitches) → {Array.<Object>}
Returns the transpositions of the scale that include the given pitches verbatim.
Name | Type | Description |
---|---|---|
pitches |
Array.<Number> | The pitches to find |
- The property 'pitches' includes the pitches of the transposition. The property 'common_tones' tallies how many pitches the original scale and the transposed scale have in common..
- Type
- Array.<Object>
let edo = new EDO(12) //define tuning
let scale = edo.scale([0,2,4,5,5,9,11]) //a major scale
scale.get.transpositions_with_pitches(1,4,8)
[
{pitches: [9,11,1,2,4,6,8], alterations: 4}, //The transposition starting on 9 contains 1,4,8 verbatim. It has 4 tones in common with the original scale.
{pitches: [4,6,8,9,11,1,3], alterations: 3}, //The transposition starting on 4 ... It has 3 tones in common...
{pitches: [11,1,3,4,6,8,10], alterations: 2} //The transposition starting on 11 ... It has 2 tones in common...
]
# (static) trichords(cache) → {Array.<Number>}
Returns every trichord (normalized to 0) available in this scale
Note: for a collection of all pitch subsets of length n (rather than 3) use Scale.get.n_chords()
Name | Type | Description |
---|---|---|
cache |
Boolean | When true, the result will be cached for faster retrieval |
An array containing all trichords
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,7,9]) //pentatonic scale
scale.get.trichords()
//returns
[
[ 0, 2, 4 ],
[ 0, 2, 7 ],
[ 0, 3, 5 ],
[ 0, 4, 7 ],
[ 0, 3, 7 ],
[ 0, 2, 5 ]
]
# (static) unevenness() → {Number}
Returns a numeric value of how unevenlyy a set's steps are distributed.
The measure is done by splitting the set into n parts and checking by how much each part differs from an ideal even split of the set (the current edo / n).
For example, 2 whole-steps and 2 major-3rds can be represented as [2 2 4 4], [2 ,4, 2, 4]. While the first distribution is imbalanced (the small steps are bunched together, and the big steps are bunched together), the 2nd distribution represents an even split
The normalization occurs within the current EDO and cardinality. 1 for the most uneven set in the tuning context with the same number of notes; and 0 for the most even set within that context
- See:
-
- Clough, John, and Jack Douthett. "Maximally even sets." Journal of music theory 35.1/2 (1991): 93-173.
- Scale#get.necklace_family()
- Scale#get.necklace_family_members()
- Type
- Number
let edo = new EDO(12) //Create a tuning context
edo.get.unevenness([0,2,4,5,7,9,11]) //returns 0
// It returns 0 because in the universe of scale with steps [1 1 2 2 2 2 2], the scale above has the least "unevenness"
# (static) without(to_remove, normalopt) → {Array.<Number>}
Returns the scale without the pitches in to_remove
array
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
to_remove |
Array.<Number> | The pitches to be removed from the original scale |
||
normal |
Boolean |
<optional> |
false | When true, the returned array will be in normal order. |
An array containing the original scale with pitches to_remove
removed.
- Type
- Array.<Number>
let edo = new EDO(12) //define context
let scale = edo.scale([0,2,4,5,7,9,11])
scale.get.without([5,11]) //returns [0,2,4,7,9]