diff --git a/packages/tonal/test/tonal.test.mjs b/packages/tonal/test/tonal.test.mjs index 647fed80..73c4de15 100644 --- a/packages/tonal/test/tonal.test.mjs +++ b/packages/tonal/test/tonal.test.mjs @@ -33,10 +33,10 @@ describe('tonal', () => { it('scale with n and note values', () => { expect( n(0, 1, 2) - .note(3, 4, 5) + .note(3, 4, 0) .scale('C major') - .firstCycleValues.map((h) => h.note), - ).toEqual(['F3', 'G3', 'A3']); + .firstCycleValues.map((h) => [h.n, h.note]), + ).toEqual([[0, 'F3'], [1, 'G3'], [2, 'C3']]); }); it('scale with colon', () => { expect( diff --git a/packages/tonal/tonal.mjs b/packages/tonal/tonal.mjs index acf35a59..dd723c2d 100644 --- a/packages/tonal/tonal.mjs +++ b/packages/tonal/tonal.mjs @@ -201,7 +201,7 @@ export const scale = register( const isObject = typeof value === 'object'; let step = value; if (isObject) { - if (value.note) { + if (typeof value.note !== 'undefined') { step = value.note; } else { step = value.n;