From c7e8e457da2973656e6b36f5d25de1a08c36409d Mon Sep 17 00:00:00 2001 From: Bas Date: Wed, 22 Jul 2026 00:19:13 +0200 Subject: [PATCH] Phase 2: pattern renderers + rhythm/fingerstyle/lead drills Add PickingLane renderer and PickingView. Variant-level meter overrides so R3 can drop from 7/8 to 4/4 live at the next bar boundary. Wire R2, R3, R5, F1-F3, L1-L3 (incl. L2 eighth-note triplets via stepsPerBeat=3). Refactor drill model into a strum/picking union with shared meter + accent-map helpers. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/components/patterns/PickingLane.svelte | 116 ++++++++ src/components/views/PickingView.svelte | 158 ++++++++++ src/components/views/StrumView.svelte | 14 +- src/drills.ts | 327 +++++++++++++++++++-- src/pages/DrillPage.svelte | 5 + src/pages/Index.svelte | 7 +- 6 files changed, 585 insertions(+), 42 deletions(-) create mode 100644 src/components/patterns/PickingLane.svelte create mode 100644 src/components/views/PickingView.svelte diff --git a/src/components/patterns/PickingLane.svelte b/src/components/patterns/PickingLane.svelte new file mode 100644 index 0000000..c60bd79 --- /dev/null +++ b/src/components/patterns/PickingLane.svelte @@ -0,0 +1,116 @@ + + +
+ {#each Array(rows) as _, r} +
{STRING_LABELS[r]}
+ {#each steps as step, c} +
+ + {#if step && step.string === r} + {glyph(step.marker)} + {/if} +
+ {/each} + {/each} +
+ + diff --git a/src/components/views/PickingView.svelte b/src/components/views/PickingView.svelte new file mode 100644 index 0000000..42faddb --- /dev/null +++ b/src/components/views/PickingView.svelte @@ -0,0 +1,158 @@ + + + + + + + + {#if drill.chordLabels && drill.chordLabels.length} +
+ Chords{drill.chordLabels.length > 1 ? ' (per bar)' : ''} +
+ {#each drill.chordLabels as c} + {c} + {/each} +
+
+ {/if} + + {#if drill.variants.length > 1} +
+ Variant +
+ {#each drill.variants as v} + + {/each} +
+
+ {/if} +
+ + diff --git a/src/components/views/StrumView.svelte b/src/components/views/StrumView.svelte index 6ed3c4a..d76135b 100644 --- a/src/components/views/StrumView.svelte +++ b/src/components/views/StrumView.svelte @@ -1,7 +1,7 @@