diff --git a/packages/tonal/test/tonal.test.mjs b/packages/tonal/test/tonal.test.mjs index a6cdae391..ec944b339 100644 --- a/packages/tonal/test/tonal.test.mjs +++ b/packages/tonal/test/tonal.test.mjs @@ -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) diff --git a/packages/tonal/tonal.mjs b/packages/tonal/tonal.mjs index 2a7f64a8f..27f993bae 100644 --- a/packages/tonal/tonal.mjs +++ b/packages/tonal/tonal.mjs @@ -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..