From 9620d3750c54b21c3da0460cea117b57fbeb9eac Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 28 Jul 2025 15:36:21 -0400 Subject: get volume control working --- scale.mjs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'scale.mjs') diff --git a/scale.mjs b/scale.mjs index 78c8433..9c6283e 100644 --- a/scale.mjs +++ b/scale.mjs @@ -9,25 +9,15 @@ export function naturalNotesBetween(a, b) { } export function chromaticNotesBetween(a, b) { - console.log('chromaticNotesBetween', a, b); const [aNote, bNote] = [a, b].map(x => Note.fromString(x)); - console.log(' -- aNote', aNote); - console.log(' -- bNote', bNote); const aIndex = Note.noteRange.findIndex(x => aNote.toString() == x.toString()); const bIndex = Note.noteRange.findIndex(x => bNote.toString() == x.toString()); - console.log(' -- aNote', aIndex); - console.log(' -- bNote', bIndex); return aIndex - bIndex; } export function toCents([aNote, aChord], [bNote, bChord]) { - console.debug('toCents', [aNote, aChord], [bNote, bChord]); - console.debug('- a', [aNote, aChord]); - console.debug('- b', [bNote, bChord]); const offset = (aNote.distanceTo(bNote)) * 100; - console.debug('- offset', offset); const scale = (bChord - aChord) * 1200; - console.debug('- scale', scale); return scale + offset; } -- cgit v1.3