memlnaut-nisps/playground/js/synth
w1n5t0n 2fb00f20a9 fix(playground): move arpeggiator to Worker thread, throttle synth params
Hand tracking at 30fps was writing 126 params per frame to the C15 ring
buffer (capacity 512), flooding it and starving arpeggiator noteOn/noteOff
messages — causing stuck/dropped notes.

Three-part fix:
- Arpeggiator now runs in a dedicated Web Worker with direct
  SharedArrayBuffer access, bypassing the main thread entirely for
  note timing. Worker setInterval isn't subject to main thread jank.
- RingBufferWriter uses CAS (Atomics.compareExchange) for multi-producer
  safety — both main thread (params) and worker (notes) write safely.
- routeOutputs throttles synth parameter sends: dead-zone filter
  (0.2% change threshold) + rate cap (~20fps), reducing ring buffer
  pressure from ~3800 msg/s to ~50-100 msg/s of actual changes.
2026-03-24 01:42:37 +02:00
..
arpeggiator-worker.js fix(playground): move arpeggiator to Worker thread, throttle synth params 2026-03-24 01:42:37 +02:00
arpeggiator.js fix(playground): move arpeggiator to Worker thread, throttle synth params 2026-03-24 01:42:37 +02:00
c15-bridge.js fix(playground): move arpeggiator to Worker thread, throttle synth params 2026-03-24 01:42:37 +02:00
midi-input.js feat(playground): unify learning modes, add MIDI input and gamepad support 2026-03-22 11:01:50 +02:00
param-map.js feat(playground): add synth parameter tooltips, group drawer with per-param curve/mute controls 2026-03-22 21:57:21 +02:00
presets.js feat(playground): add tiered synth parameter preset system 2026-03-23 00:50:56 +02:00