From 8a550361ea0ff364c47aef2dd0d890a41c220fcb Mon Sep 17 00:00:00 2001 From: w1n5t0n Date: Mon, 23 Mar 2026 00:50:56 +0200 Subject: [PATCH] feat(playground): add tiered synth parameter preset system MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 4 tiers of progressive complexity (Beginner 15 params → Expert 126), 13 presets total with per-param min/max/curve overrides that bias distributions without clamping extremes. Preset dropdown in UI, persisted to localStorage, supports ?preset= URL param. --- CLAUDE.md | 16 + playground/a-immersive.html | 25 ++ playground/css/a-immersive.css | 39 ++ playground/js/a-app.js | 138 +++++++- playground/js/synth/presets.js | 628 +++++++++++++++++++++++++++++++++ 5 files changed, 844 insertions(+), 2 deletions(-) create mode 100644 playground/js/synth/presets.js diff --git a/CLAUDE.md b/CLAUDE.md index 09f27fb..b641d4c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -44,6 +44,7 @@ Key files: `js/nisps/` (ML core port), `js/ui/` (visualizer, joystick, controls) |-------|-------|---------|--------| | `tame` | 0–1 | 1 | Constrains synth output ranges toward safe limits | | `spread` | 0–1 | 0.6 | Controls weight initialization, RL noise scaling, and weight decay (see below) | +| `preset` | preset id | _(none)_ | Auto-loads a synth parameter preset on first visit (e.g. `?preset=beginner-1`) | #### `spread` — sigmoid saturation control @@ -76,6 +77,21 @@ The 126 synth parameters in `js/synth/param-map.js` were curated from the C15's | PM shaper blend | 4 | Secondary routing params | | FB Mix source selects | 4 | Discrete A/B selectors | +### Synth Presets + +Presets (`js/synth/presets.js`) control which parameters the ML engine can modify, with unselected params muted at safe defaults. Each preset defines per-param `{ muted, fixedValue, min, max, curve }` — no training examples or model weights. + +4 tiers of progressive complexity: + +| Tier | Presets | Active params | What's exposed | +|------|---------|---------------|----------------| +| 1 (Beginner) | 1.1–1.4 | 15 | Basic ADSR, SVF cutoff/res, Shaper A drive/fold, output levels, reverb mix | +| 2 (Intermediate) | 2.1–2.4 | 40 | + Env B/C, filter FM, effects (reverb/echo/flanger), cabinet, stereo panning | +| 3 (Advanced) | 3.1–3.3 | ~95 | + Cross-oscillator PM, feedback mixer, dual shapers, comb/gap filters, ring mod | +| 4 (Expert) | 4.1–4.2 | 126 | Full engine | + +Presets use `curve` values to bias parameter distributions (< 0.5 = spend more time low, > 0.5 = bias high) without clamping extremes. Users can tweak any preset via the group drawer after loading. + ## Build System This is an Arduino project targeting Raspberry Pi Pico. Build and upload using Arduino IDE or arduino-cli with the earlephilhower/pico board package. diff --git a/playground/a-immersive.html b/playground/a-immersive.html index b8231f0..c0da7e6 100644 --- a/playground/a-immersive.html +++ b/playground/a-immersive.html @@ -28,6 +28,30 @@ + @@ -226,6 +250,7 @@

Synth Controls