Commit graph

223 commits

Author SHA1 Message Date
w1n5t0n
d3797945d2 tweak(playground): simplify descriptions in card body text 2026-03-22 02:22:47 +02:00
w1n5t0n
6b6881da7d fix(playground): fix RL button position on desktop and add floating output toggle
- Fix RL buttons stuck high on desktop: media query was overriding
  bottom to 196px, now matches mobile 92px
- Add floating Visual/Synth toggle at top-right of immersive view,
  synced with the existing sheet toggle
2026-03-22 02:11:31 +02:00
w1n5t0n
3db90b035a feat(playground): add spread param for sigmoid saturation control and fix randomise sync
Add ?spread=0-1 URL param that controls weight initialization scaling,
RL noise scaling per layer, noise cap, and weight decay to prevent
sigmoid output saturation. At spread=0 (original behavior) weights are
uniform [-1,1] and outputs polarise near 0/1. At spread=1 weights use
Xavier scaling (1/sqrt(fan_in)), noise is proportionally reduced, and
10% weight decay per thumbs-down prevents unbounded magnitude drift.

Also fix randomise to re-inject current joystick position and re-run
inference before routing outputs, eliminating the jump on first
joystick move after randomise.

Defaults: tame=1, spread=0.6 across all app variants.
2026-03-22 02:10:26 +02:00
w1n5t0n
d9be808aaa style(playground): unify dark theme with orange accents and improve RL button layout
- Replace fragmented green/blue/orange accent scheme with unified hacker
  orange (#ff6a00) across all CSS, JS canvas drawing, and param palettes
- Redesign designs.html: monospace font, clickable cards, grid background,
  remove A/B/C labels; copy to index.html as landing page
- Add JetBrains Mono font across all views for consistent techy aesthetic
- Sharpen border-radius (pills 20px→6px, back buttons→6px) for angular feel
- Restructure RL buttons: key numbers inside buttons (larger, white),
  teal-green for thumbs-up, dark red-orange for thumbs-down
- Fix RL button z-index (25→45) so they render above the bottom sheet
- Add Xavier-scaled weight randomization (spread parameter)
2026-03-22 01:36:00 +02:00
w1n5t0n
b80a9e4e86 fix(playground): resize canvas when switching output modes in Design B (meml-2c3)
When switching from synth back to visual mode, the FlowFieldVisualizer
canvas had stale dimensions from being hidden. Add requestAnimationFrame
resize call after toggling canvas visibility so the visualizer picks up
correct dimensions and renders properly.
2026-03-22 01:07:52 +02:00
w1n5t0n
a669a54543 feat(playground): add three alternative UI design explorations
Three redesigns of the playground UI, each exploring a different
interaction philosophy for the NISPS interactive ML engine:

A) Immersive — fullscreen canvas with floating glassmorphism overlays
B) Workbench — dashboard with 2D mapping heatmap as centerpiece
C) Journey — phased UI that dissolves (Explore → Teach → Perform)

All share the same 126-output MLP ([32,48,64] hidden layers), C15
synth bridge, and flow field visualizer. Each adds:
- SynthVisualizer (126 grouped vertical bars) replacing particles in synth mode
- RL as default learning mode with keyboard shortcuts (1/2)
- Follow mode for trackpad exploration
- ?tame= URL param for safe-range constraining
- localStorage persistence (random on first boot)
- Live iframe previews on designs.html homepage

See devlog/2026-03-21-ui-redesign-explorations.md and meml-2c3 for
remaining refinements identified during browser testing.
2026-03-22 00:57:58 +02:00
w1n5t0n
925ddc5be6 feat(playground): add volume safety limiter, devmode tame parameter, and voice buildup mitigation
- Insert DynamicsCompressorNode as always-on brick-wall limiter after
  master gain (threshold -6dB, ratio 20:1, 2ms attack)
- Add devmode tame parameter (0-1) controlling range constraining:
  - ?tame=0.7 URL param (default) or window.setTameLevel(n)
  - 0 = no mitigation, 1 = strongest constraining
- Constrain 20 volume/buildup-sensitive params with safeMin/safeMax:
  - Envelope release/decay2 times capped to prevent infinite ringing
  - Envelope gains kept in moderate range
  - All 5 drive stages (ShpA/B, FB, Out, Cabinet) capped
  - Output mixer levels given floor and ceiling
  - Echo feedback and reverb size limited to prevent wash buildup
- Fix Comb Filter group count (8, not 9) in comments and color generator
2026-03-22 00:15:11 +02:00
w1n5t0n
c3577be42c docs: update CLAUDE.md and playground README for 126-param C15 map
Document the expanded parameter map, MLP architecture, exclusion
rationale table, and synth mode in both project-level and playground docs.
2026-03-21 23:11:45 +02:00
w1n5t0n
24e3e9665e feat(playground): expand C15 param map from 20 to 126 synth parameters
Control all sonically meaningful C15 parameters through NISPS ML outputs.
Excludes hardware routing, macros, scale/tuning, key tracking, velocity,
envelope mod depths, discrete switches, and dangerous volume/pitch params.

- Expand param-map.js with 126 curated params grouped by synthesis section
- Widen MLP architecture from [3,10,10,14,20] to [3,32,48,64,126]
- Add ParamDisplay.rebuild() for mode-dependent bar count (20 visual, 126 synth)
- Add scrollable compact layout for synth mode param bars
- Pad visual presets and old saves to 126 outputs for backward compatibility
2026-03-21 22:58:48 +02:00
w1n5t0n
6f6a334529 feat(playground): add C15 synth mode with NISPS-controlled parameters and arpeggiator
Adds a secondary Synth mode (toggled via collapsible left side panel)
where the NISPS ML engine's 20 outputs control curated C15 synthesizer
parameters (oscillator PM, shapers, filters, reverb, echo, flanger,
output mixer) through a WASM AudioWorklet bridge.

Includes a chord progression arpeggiator with controls for tempo (BPM),
octave range, octave offset, and 4 selectable progressions. The C15
engine runs in an AudioWorklet with lock-free SharedArrayBuffer ring
buffer communication.

New files: c15/ (WASM assets), js/synth/ (bridge, arpeggiator, param map),
serve-coop.py (COOP/COEP headers for SharedArrayBuffer support).
2026-03-21 22:26:37 +02:00
chriskiefer
ecacfb9d0c memlib 2026-03-18 16:30:19 +00:00
chriskiefer
6c66802b4e verbfx freeverb 2026-03-18 16:29:54 +00:00
w1n5t0n
d0c42d78b5 bd init: initialize beads issue tracking 2026-03-13 18:57:30 +02:00
chriskiefer
5d38e36e0e memlib 2026-03-07 15:14:53 +00:00
chriskiefer
c4659ce1d7 fm ops and clock estimation fix 2026-03-07 15:14:39 +00:00
chriskiefer
1af45be168 midi sync 2026-03-06 10:04:30 +00:00
chriskiefer
9906cbd154 i2c refactor and speed up 2026-03-05 22:25:21 +00:00
w1n5t0n
0e0f71d28e beads: receive MEMLNaut-NISPS issues 2026-03-05 10:26:28 +00:00
w1n5t0n
20cd059d91 fix(beads): use independent MEMLNaut-NISPS database, separate from shared beads_src 2026-03-04 23:45:35 +00:00
w1n5t0n
843f80c54a chore: add playground serve script 2026-03-04 20:47:06 +00:00
chriskiefer
3ddbcdfed9 break|| midi clock and seq control 2026-03-03 11:53:50 +00:00
chriskiefer
1656e7a4a4 phaseMul options 2026-02-25 17:33:19 +00:00
chriskiefer
16a38fbb66 refactor storage, no longer need node.hs 2026-02-25 16:57:02 +00:00
chriskiefer
6707781b3b phase offset 2026-02-25 16:30:52 +00:00
chriskiefer
497f1c8dfb breakcore!!! 2026-02-22 21:03:50 +00:00
chriskiefer
9498f77278 midi routing from audio app 2026-02-22 12:41:09 +00:00
chriskiefer
dd78891783 start of break|| 2026-02-22 11:39:27 +00:00
w1n5t0n
2c2c9f769d playground: add expandable visual mode and docs 2026-02-14 08:47:47 +00:00
w1n5t0n
3039221165 playground: add loss history tracking and diagnostics panel 2026-02-11 15:56:24 +00:00
w1n5t0n
96a88f4b0f playground: add follow-mode joystick and RL hotkeys 2026-02-11 15:56:19 +00:00
w1n5t0n
6187a4b4ae playground: add orbiting repulsor field controls 2026-02-11 15:50:06 +00:00
w1n5t0n
0498bbe371 playground: add inertia and drag velocity memory 2026-02-11 15:48:34 +00:00
w1n5t0n
06833cdd19 playground: add blended advection modes 2026-02-11 15:47:13 +00:00
w1n5t0n
97acfd2824 playground: add particle lifetime and respawn modes 2026-02-11 15:45:50 +00:00
w1n5t0n
0550088516 playground: add attractor and dispersion controls 2026-02-11 15:44:33 +00:00
monkey-w1n5t0n
57aae34870 feat: add web-based interactive playground for NISPS
Faithful JS port of nisps-core MLP + IML engine with a touch-friendly
UI for exploring neural parameter mapping visually. Two learning modes:
example-based (set slider targets) and RL feedback (thumbs up/down with
exploration noise). Flow field particle system controlled by 8 MLP outputs.
2026-02-11 13:17:17 +01:00
monkey-w1n5t0n
45193a2c01 fix: audit and fix nisps-core extraction issues
- Remove platform-specific code (ARM_MATH_CM33, XMOS __XS3A__, std::printf)
- Add set_output()/set_outputs()/add_example() API for programmatic training
- Fix release build crash: side effect inside assert() for loss function init
- Replace fake smoke test with real convergence tests (5 tests, all pass)
- Rewrite example to demonstrate actual training with real output
- Update README, CHANGELOG, and extraction plan to match reality
2026-02-08 18:01:48 +01:00
monkey-w1n5t0n
be85a5cd71 feat: extract nisps-core platform-agnostic ML library
Extract the interactive machine learning engine from MEMLNaut-NISPS
firmware into a standalone, platform-agnostic C++20 header-only library.

What is nisps-core?
-------------------
NISPS (Neural Interactive Shaping of Parameter Spaces) core is a
parameter mapping engine. It takes N input parameters (joystick,
sensors, audio features) and maps them to M output parameters through
an interactively-trained neural network.

Use it to control: synthesizers, effects, lights, robots, game
parameters, or anything that responds to continuous control data.

Key Features
------------
- Header-only: No compilation needed, just include and use
- Platform-agnostic: Pure C++20, works anywhere
- Zero dependencies: Only standard library
- Interactive learning: Train by demonstration
- Lightweight: ~3,500 lines of optimized neural network code
- Flexible: Map 1-100 inputs to 1-100 outputs

Architecture
------------
Core components:
- IML: High-level interactive ML interface
- MLP: Multi-layer perceptron (feedforward neural network)
- Dataset: Training data management with replay memory
- Layer/Node: Neural network building blocks
- Loss: MSE and categorical cross-entropy functions
- Utils: Activation functions (sigmoid, ReLU, tanh, etc.)

Transformations Applied
-----------------------
 Removed Arduino/RP2040 dependencies (Serial, SD, Pico SDK)
 Removed audio synthesis code (nisps-core is control-only)
 Added nisps namespace to all code
 Converted to header-only library with _impl.hpp pattern
 Updated to C++20 (required for std::span)
 Removed platform-specific serialization
 Replaced debug macros with no-op stubs
 Added comprehensive documentation and examples

Files Added
-----------
- nisps-core/README.md: Complete documentation and API reference
- nisps-core/CHANGELOG.md: Version history and migration guide
- nisps-core/include/nisps/*.hpp: 13 header files (~3,500 lines)
- nisps-core/test/main.cpp: XOR test demonstrating basic usage
- nisps-core/examples/simple_mapping.cpp: Interactive demo
- nisps-core/CMakeLists.txt: Build system for tests

Testing
-------
 Compiles with GCC 14.2 (C++20)
 All tests passing
 Successfully instantiates networks and runs inference

Performance
-----------
- Inference: 1-10 µs for small networks (2-10-10-4)
- Training: 10-100 ms for 100 examples, 1000 iterations
- Memory: ~1 KB per hidden neuron

Migration from Embedded IMLInterface
------------------------------------
Old (embedded):
  IMLInterface iml(n_inputs, n_outputs);

New (nisps-core):
  nisps::IML<float> iml(n_inputs, n_outputs);

All method names remain the same, just add the namespace.

Related
-------
- Implements: NISPS_CORE_EXTRACTION_PLAN.md
- Task graph: NISPS_CORE_TASKS.md
- Origin: MEMLNaut-NISPS firmware
- Docs: https://musicallyembodiedml.github.io/memlnaut/

Co-authored-by: Claude Code <claude@anthropic.com>
2026-02-08 17:47:23 +01:00
monkey-w1n5t0n
733ff90083 add nisps-core extraction task graph
Atomic tasks for AI agents to execute without decisions.
18 tasks with explicit dependencies, exact file contents,
and verification steps.
2026-02-08 17:03:40 +01:00
monkey-w1n5t0n
0ae854a802 add nisps-core extraction plan
Platform-agnostic C++17 parameter mapping engine.
Control data in → ML → control data out.
2026-02-08 16:16:00 +01:00
monkey-w1n5t0n
5dd7029643 add CLAUDE.md for AI assistant context 2026-02-08 15:49:16 +01:00
chriskiefer
706a969cdc memory storeage modes 2026-02-07 10:36:26 +00:00
chriskiefer
b8a7a6a9a1 memory storage modes 2026-01-13 17:20:19 +00:00
chriskiefer
43fae9a915 stereo channel strip 2026-01-13 08:23:01 +00:00
chriskiefer
75166e85d8 bypass toggle colours 2025-12-10 17:35:48 +00:00
chriskiefer
ec02ff68f1 xiasri and CS 2025-12-10 16:40:28 +00:00
chriskiefer
bb1e6de3df xiasri latest, and channel strip changes for 4D input 2025-12-10 16:40:00 +00:00
chriskiefer
b853326ab6 xiasri, channelstrip 2025-11-28 14:59:36 +00:00
chriskiefer
faf704fe7a refactor 2025-11-24 11:29:59 +00:00
chriskiefer
28f8bc7711 refactoring interface into modes 2025-11-24 11:29:33 +00:00