Add new tests, organize old tests, fix issue with note
This commit is contained in:
parent
7046c1f546
commit
a4c040e101
3 changed files with 120 additions and 87 deletions
|
|
@ -238,7 +238,7 @@ export function transpose(note, step) {
|
|||
}
|
||||
|
||||
// Converts a `scaleName` into a corresponding list of chromas between 0 and 12
|
||||
export function scaleToChromas (scaleName) {
|
||||
export function scaleToChromas(scaleName) {
|
||||
if (Array.isArray(scaleName)) {
|
||||
scaleName = scaleName.flat().join(' ');
|
||||
}
|
||||
|
|
@ -247,5 +247,5 @@ export function scaleToChromas (scaleName) {
|
|||
const chroma = rootMidi % 12;
|
||||
const intervals = Scale.get(name).intervals;
|
||||
const scaleSteps = intervals.map(Interval.semitones);
|
||||
return scaleSteps.map(s => (s + chroma) % 12);
|
||||
return scaleSteps.map((s) => (s + chroma) % 12);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue