From 7928e4a7d3311cc1325d413c53ff349e5ef816b5 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Mon, 10 Mar 2025 16:23:07 -0400 Subject: scale: calculate diatonic scales --- scale.mjs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'scale.mjs') diff --git a/scale.mjs b/scale.mjs index 9bec03b..d33a5c3 100644 --- a/scale.mjs +++ b/scale.mjs @@ -182,3 +182,11 @@ export function MinorScale(tonic) { const intervals = [2, 1, 2, 2, 1, 2]; return new Scale(tonic, intervals); } + +// well, a lot of them. +export const allDiatonicScales = chromaticScale.flatMap(tonic => { + return [ + MajorScale(tonic), + MinorScale(tonic) + ]; +}) -- cgit v1.3