From 32c3d85afe767ceaefb26f0cadd962793d3de642 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sun, 9 Mar 2025 23:38:07 -0400 Subject: diatonic → scale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- index.html | 4 ++-- key-picker.mjs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/index.html b/index.html index fc12e45..b4b345c 100644 --- a/index.html +++ b/index.html @@ -113,8 +113,8 @@ - - diff --git a/key-picker.mjs b/key-picker.mjs index fc6b4ed..0a9068b 100644 --- a/key-picker.mjs +++ b/key-picker.mjs @@ -1,7 +1,7 @@ import { MajorScale, MinorScale, chromaticScale } from "./scale.mjs"; -function scaleFrom(tonic, diatonic) { - switch (diatonic) { +function scaleFrom(tonic, scale) { + switch (scale) { case 'major': return MajorScale(tonic); case 'minor': @@ -13,7 +13,7 @@ function scaleFrom(tonic, diatonic) { function formChanged(form) { const formData = new FormData(form); - const scale = scaleFrom(formData.get('tonic'), formData.get('diatonic')); + const scale = scaleFrom(formData.get('tonic'), formData.get('scale')); ['tonic', 'second', 'third', 'fourth', 'fifth', 'sixth', 'seventh'].forEach((c, i) => { Array.from(form.getElementsByClassName(c)).forEach(elt => elt.innerText = scale[i]); }); -- cgit v1.3