Skip to content

Commit 57fa670

Browse files
committed
update to auto select system based on scale
1 parent 51623c2 commit 57fa670

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/routes/+page.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@
1414
let key = $state("C");
1515
let scale = $state("minor pentatonic");
1616
let scaleObj = $derived(Scale.get(`${key} ${scale}`));
17-
let system = $state("Pentatonic");
17+
let system = $derived.by(() =>
18+
scaleObj.intervals.length === 7 ? "CAGED" : "Pentatonic",
19+
);
1820
let position = $state(null);
1921
let fretData = $derived(frets(tunings.get(tuning), 16, scaleObj));
2022
let triads = $derived(Mode.triads(scaleObj.type, scaleObj.tonic));

0 commit comments

Comments
 (0)