This commit is contained in:
Kaspars 2024-05-08 10:38:06 +02:00
parent 33a73c37bc
commit a4f10d5339
2 changed files with 4 additions and 4 deletions

View file

@ -33,10 +33,10 @@ describe('tonal', () => {
it('scale with n and note values', () => { it('scale with n and note values', () => {
expect( expect(
n(0, 1, 2) n(0, 1, 2)
.note(3, 4, 5) .note(3, 4, 0)
.scale('C major') .scale('C major')
.firstCycleValues.map((h) => h.note), .firstCycleValues.map((h) => [h.n, h.note]),
).toEqual(['F3', 'G3', 'A3']); ).toEqual([[0, 'F3'], [1, 'G3'], [2, 'C3']]);
}); });
it('scale with colon', () => { it('scale with colon', () => {
expect( expect(

View file

@ -201,7 +201,7 @@ export const scale = register(
const isObject = typeof value === 'object'; const isObject = typeof value === 'object';
let step = value; let step = value;
if (isObject) { if (isObject) {
if (value.note) { if (typeof value.note !== 'undefined') {
step = value.note; step = value.note;
} else { } else {
step = value.n; step = value.n;