mirror of
https://codeberg.org/uzu/strudel
synced 2026-07-13 06:19:33 -04:00
don't interpret note as n
This commit is contained in:
@@ -30,18 +30,6 @@ describe('tonal', () => {
|
||||
.firstCycleValues.map((h) => h.note),
|
||||
).toEqual(['C3', 'D3', 'E3']);
|
||||
});
|
||||
it('scale with n and note values', () => {
|
||||
expect(
|
||||
n(0, 1, 2)
|
||||
.note(3, 4, 0)
|
||||
.scale('C major')
|
||||
.firstCycleValues.map((h) => [h.n, h.note]),
|
||||
).toEqual([
|
||||
[0, 'F3'],
|
||||
[1, 'G3'],
|
||||
[2, 'C3'],
|
||||
]);
|
||||
});
|
||||
it('scale with colon', () => {
|
||||
expect(
|
||||
n(0, 1, 2)
|
||||
|
||||
@@ -199,14 +199,9 @@ export const scale = register(
|
||||
pat
|
||||
.fmap((value) => {
|
||||
const isObject = typeof value === 'object';
|
||||
let step = value;
|
||||
let step = isObject ? value.n : value;
|
||||
if (isObject) {
|
||||
if (typeof value.note !== 'undefined') {
|
||||
step = value.note;
|
||||
} else {
|
||||
step = value.n;
|
||||
delete value.n; // remove n so it won't cause trouble
|
||||
}
|
||||
delete value.n;
|
||||
}
|
||||
if (isNote(step)) {
|
||||
// legacy..
|
||||
|
||||
Reference in New Issue
Block a user