223 Commits

Author SHA1 Message Date
clement 96bb1151a7 fix: guard matrix mod OSC arg 2026-06-28 20:06:49 +02:00
clement 3ece3c9e8e feat: per-voice matrix capture modulation 2026-06-28 20:01:20 +02:00
clement e33796c1b4 feat: matrix capture mod source cache 2026-06-28 19:51:08 +02:00
clement 38f1974455 feat: persist instruments in matrix presets 2026-06-28 19:33:56 +02:00
clement 744ba6475a fix: nil instrument and OSC arg guards 2026-06-28 19:28:38 +02:00
L'électron rare 529d6c5cd9 feat: matrix loop region and seek 2026-06-28 19:18:17 +02:00
clement 3fb9e0eca0 feat: per-voice matrix instrument + kits 2026-06-28 19:16:05 +02:00
L'électron rare 46c88236f6 feat: matrix-only boot via MATRIX_ONLY env
CI build oscope-of / build-check (push) Has been cancelled
2026-06-28 19:03:38 +02:00
L'électron rare 6482baf22c feat: creative full-kit matrix presets
CI build oscope-of / build-check (push) Has been cancelled
Replace the 14 sparse starter grids with 16 hand-authored arrangements
that use all 16 voices and evolve over the 32 bars via sections
(intro / build / drop / break / final) with fills and accents.

- Styles: techno_drive, acid_journey, trance_euphoria, psytrance_roll,
  detroit_soul, industrial_grind, hardcore_punk, dub_techno, breakbeat,
  minimal_hypno, ambient_intro, peak_drop, rave_stab, tribal_perc,
  bass_science, melodic_builder.
- Every voice featured across the set (ride/rim/tom/reese/bells/sweep
  now used, not empty); peak_drop activates the full kit on the drop.
- generate_presets.py reworked with a sections DSL; prints a voice-
  coverage report (16/16).
2026-06-28 18:54:05 +02:00
L'électron rare 16adac4bec merge: matrix glow with persistence presets
CI build oscope-of / build-check (push) Has been cancelled
Reconcile two parallel matrix features built since 3ce4c38:
- macm1 main: matrix audio-reactive glow (/matrix/trig, triggerGlow,
  matEmitTrig, --glow CSS var, matrix_glow.js).
- gitea main: matrix file persistence + 14 morceau-inspired presets
  (/matrix/save|load|list, web save/load UI).

Conflict resolution kept BOTH features:
- control.js: /matrix/list + /matrix/grid handlers AND /matrix/trig.
- control.css: glow-enhanced .mcell.playing AND persistence-bar styles.
- test_matrix.scd: persistence round-trip AND matEmitTrig/matGlow tests.

Verified: SC headless test_matrix TEST PASS (both suites), matrix.scd
P:0 B:0, node --check control.js OK.
2026-06-28 18:41:45 +02:00
L'électron rare b141127a13 feat: matrix presets inspired by morceaux
CI build oscope-of / build-check (push) Has been cancelled
2026-06-28 18:32:42 +02:00
L'électron rare 2ed077bbf5 feat: matrix save load presets in sc
CI build oscope-of / build-check (push) Has been cancelled
Add durable file-based persistence for the 16x32 arrangement matrix:
~matSave / ~matLoad / ~matNames helpers with OSC routes /matrix/save,
/matrix/load, /matrix/list; ~matGridPush sends full 512-int grid dump
on load; preset dir scaffolded.  Root-causes fixed during development:
String.== is identity-based in SC (use Symbol storage + \sym literals),
String.copyFromTo -> copyRange, Pipe/pathMatch unreliable headless.
Headless test round-trip: save -> clear -> load -> verify.
2026-06-28 18:24:22 +02:00
clement 9c8c271113 test: cover matGlow path through matVariation 2026-06-28 18:21:06 +02:00
clement f9d64cd7a5 feat: emit per-note matrix trigger for glow 2026-06-28 17:56:58 +02:00
clement 3ce4c38f1c Merge remote-tracking branch 'origin/main' into refactor/sc-finish
CI build oscope-of / build-check (push) Has been cancelled
2026-06-28 17:13:21 +02:00
clement 7ca9fd98ff docs: namespace, OSC registry, boot modes 2026-06-28 17:10:30 +02:00
L'électron rare 6843e5aafc fix: matrix re-source only on color change
CI build oscope-of / build-check (push) Has been cancelled
Track last-applied color per voice in ~matLastColor; ~matApplyBar
skips Pdef re-source and re-play when color is unchanged and non-zero,
eliminating envelope re-attacks on sustaining pads/subs/reese/sweeps.
~matStop resets ~matLastColor to -1 so subsequent play re-applies all.
~matVariation now returns nil for color 0 instead of the base pattern.
loadMatState validates each cell is an integer 0..6.
2026-06-28 17:07:04 +02:00
clement 015374af38 fix: keep shared clock alive on scene stop 2026-06-28 17:00:13 +02:00
L'électron rare ee7f349359 feat: load matrix after sections
CI build oscope-of / build-check (push) Has been cancelled
Adds step 6i to data_only/boot.scd: loads matrix.scd after
sections.scd, matching the additive load pattern used by every
other data_only feature file.
2026-06-28 16:48:40 +02:00
L'électron rare 2250fe347f feat: matrix arranger engine in sc
Adds sound_algo/data_only/matrix.scd: a 16-voice x 32-bar
song-arrangement matrix with a bar-by-bar playhead Routine.

- Reads base Pdefs from launchpad.scd (additive, does NOT modify them)
- Colors 1-6 map to Pchain overlays: stretch (half/double-time),
  octave shift, amp accent; color 0 = Pdef.stop
- ~matBaseFor captures each voice's source once (lazy cache)
- ~matVariation, ~matApplyBar, ~matPlay, ~matStop, ~matSetCell,
  ~matClear exposed as environment functions
- OSCdefs /matrix/{cell,play,stop,clear} with \mat_* unique keys
- Nil-guarded, idempotent reload; TouchOSC feedback via ~toscSend

Adds test/test_matrix.scd: headless sclang assertions (no server
boot), verifies API wiring, cell write, Pchain return type,
out-of-range guard, and ~matStop no-raise.
2026-06-28 16:48:36 +02:00
clement 53f9111ed8 refactor: scenes and morceaux use setTempo 2026-06-28 16:45:10 +02:00
clement fe7b25e536 refactor: route data-only tempo to setTempo 2026-06-28 16:42:16 +02:00
clement 8d95f3e455 refactor: route live tempo writers to setTempo 2026-06-28 16:39:53 +02:00
clement e9022fab7d refactor: alias secondary clocks to default 2026-06-28 16:37:17 +02:00
clement 222c087610 fix: keep engine boot clean, test owns try
Remove the try-catch wrapper added around s.waitForBoot in
sound_algo/engine.scd — it swallowed real boot errors in
production. Move boot-failure tolerance into
sound_algo/tests/test_tempo.scd instead, where it belongs.
data_only/engine.scd was not affected (no wrapper added).
2026-06-28 16:34:40 +02:00
clement 141ed0e122 feat: single coordinated setTempo 2026-06-28 16:31:26 +02:00
L'électron rare 1990fc692f fix: guard scene clear bounds and lparm nil
CI build oscope-of / build-check (push) Has been cancelled
2026-06-28 16:05:55 +02:00
clement 17d78127f6 refactor: fpResolve delegates to noteFor 2026-06-28 15:57:37 +02:00
L'électron rare d7c1049661 fix: valueArray for melody state echo
CI build oscope-of / build-check (push) Has been cancelled
2026-06-28 15:56:42 +02:00
L'électron rare ab88b0f6df feat: load sections after touchosc feedback
Adds boot step 6h: sections.scd loaded after touchosc_feedback.scd
so ~toscSend is available. Net-zero paren balance change (P:-8 B:0).
2026-06-28 15:56:42 +02:00
L'électron rare ca21a4216d feat: live section scene slots in sc
8 snapshot slots (clips armed + seq presets + harmony).
Quantized recall via ~lpArm diff, next/prev chaining,
/scene/state feedback via ~toscSend. Headless test passes.
2026-06-28 15:56:42 +02:00
clement 562ac45d13 refactor: lpNote delegates to noteFor 2026-06-28 15:54:28 +02:00
clement 2777243d5c refactor: ccNote delegates to noteFor 2026-06-28 15:52:31 +02:00
clement 77249049c9 feat: load note helpers in all boot paths 2026-06-28 15:48:54 +02:00
clement fab35a5520 feat: unified note/scale source of truth 2026-06-28 15:43:57 +02:00
clement bb11311720 Merge remote-tracking branch 'origin/main'
CI build oscope-of / build-check (push) Has been cancelled
2026-06-28 15:18:44 +02:00
clement 463bab7665 feat: pinch arms launchpad clips
Pinch toggles launchpad patterns via ~lpArm (concert sounds,
clock sync, per-voice vol) instead of ad-hoc loops. Adds
~fpMode (clips/piano/both) and /control/fp reload.
2026-06-28 14:50:05 +02:00
L'électron rare 582d955522 fix: bump clip gen only in active branches
CI build oscope-of / build-check (push) Has been cancelled
Move ~lp[\clipGen] increment inside the four transitions that
schedule or cancel a closure (s==0 launch, s==3 cancel-stop,
s==1 stop, s==2 cancel-launch). No-op re-taps (s==1/2 on launch,
s==0/3 on stop) no longer clobber the pending generation counter.

Also clamp /launch/quant to clip(0.125, 64) instead of max(0.125)
to prevent a runaway large value from locking out launches.
2026-06-28 14:42:59 +02:00
L'électron rare 714c5988c2 feat: emit 4-state clip feedback
~toscArmedPush now iterates all 16 pads plus melseq and rhythmseq,
sending 0/1/2/3 (off/playing/queued-launch/queued-stop) from clipState
with fallback to armed membership for concert-driven clips. Test
extended with clipState in dummy ~lp and clipState read assertion.
2026-06-28 14:31:36 +02:00
L'électron rare ebe15d0804 feat: quantized clip launch stop with queue
Add 4-state machine (off/playing/queued-launch/queued-stop) to ~lpArm.
Launch and stop are quantized to ~lp[\quant] beats (default 4) via
clock.schedAbs(clock.nextTimeOnGrid(q)). Per-clip generation counter
cancels superseded callbacks on re-tap. New env fields: ~lp[\quant],
~lp[\clipState], ~lp[\clipGen]. New /launch/quant OSCdef. ~lp[\armed]
semantics preserved so /launch/clear and concert logic keep working.
2026-06-28 14:31:25 +02:00
clement 154db324cf fix: fallback scales for data-only air-piano
data-only boot does not load palette/scales.scd, so
~scaleMinorPent was nil and ~fpResolve crashed on wrapAt.
Embed fallback scale arrays so notes resolve headless.
2026-06-28 14:03:13 +02:00
L'électron rare 2213b4e53d feat: multicast tosc feedback to clients
Replace single ~tosc NetAddr with ~toscClients Dictionary
(keyed by ip) so feedback OSC reaches all connected clients
(web bridge + iPad) simultaneously. ~toscTouch deduplicates
by IP and logs only on first connection. ~toscSend iterates
the dictionary; no-op when empty.

Test: add assertion that two distinct IPs produce size==2.
Balance: P:0 B:0 on both files. Headless TEST PASS.
2026-06-28 14:02:41 +02:00
clement 217e41c632 feat: OSC remote control for air-piano
Add /control/fp (on/off/scale/inst/sens/octave/debug) so the
air-piano is controllable on a headless sclang, plus a debug
strike log gated by ~fpDebug.
2026-06-28 13:53:35 +02:00
L'électron rare a74d3fb402 fix: reload-safe tosc rms probe + portable test 2026-06-28 13:35:30 +02:00
clement 5c0007f961 docs: clarify fp modulation scope and inst gate 2026-06-28 13:26:56 +02:00
L'électron rare 1d62ff4347 feat: load touchosc feedback after launchpad 2026-06-28 13:23:56 +02:00
L'électron rare 73c17d41f7 feat: sc touchosc feedback sender
Adds sound_algo/data_only/touchosc_feedback.scd: captures the
controlling client IP from inbound /launch* OSC traffic, pushes
/armed/<name> for all 16 pads, /sync/beat each beat on ~lp[clock],
/sync/rms at 20 Hz (server-only, guarded), and echoes
/seq/rhythm/state + /seq/melody/state on preset select. Additive,
nil-guarded, safe to load headless without a booted audio server.

Also adds test/test_touchosc_feedback.scd: headless harness that
builds a dummy ~lp env, loads the feature, asserts the three public
API functions are wired, exercises ~toscArmedPush with nil ~tosc,
and prints TEST PASS.
2026-06-28 13:23:53 +02:00
clement 764bf02dc8 feat: load air-piano and hook hand modulation
Wire finger_piano.scd into both data-only boot paths so
OSCdef /pose/finger and ~fp* API are available at runtime.
Call ~fpModTick on every /pose/hands frame (~30 Hz) for
continuous air-piano modulation. Document FINGER_PIANO env
vars in CLAUDE.md.
2026-06-28 13:17:31 +02:00
clement 4cabf12eac test: assert fpModTick updates fpCut
Replace ghost isNil check with concrete one-pole assertion:
fpCut must equal 0.2 after one tick from dist=1.0, coeff=0.2.
2026-06-28 13:15:23 +02:00
clement 858762fe39 feat: air-piano finger note engine in sc 2026-06-28 13:11:13 +02:00