Commit 2e3c8000 by PLN (Algolia)

feat(compose): realtime.tidal — the crossfade off switch, three shapes

PLN wanted `$ realtime` as a prefix. That shape cannot work: `realtime $ d1 $
pat` parses as `realtime (d1 pat)`, and d1 has already applied its transition
by then, so nothing in that position can undo it. What does work ships here:
`rt 1 $ ...` for a single transition-free launch, a one-line `let` that shadows
d1-d12 for the session, and the exact restore. No BootTidal edit, so tomorrow's
boot cannot break on tonight's untested Haskell — every line is copied from
BootTidal's own definitions, and the file says plainly that it has not been
through GHCi yet.

Also written down where he will find it again: the retrigger he blamed on the
crossfade is `resetCycles` sharing a block with the patterns, and the real fix
for the mode (an IORef compose/perform toggle, promoted into BootTidal) is
tomorrow's C-1.
parent ea52a32c
-- REALTIME / COMPOSE MODE — kill the crossfade while you cook
--
-- PLN, 2026-08-30: "the crossfade makes composing harder, how can i disable it
-- atm in the parvagues system? ... can we have a own command? so i add to do
-- $ realtime $ d1 ... and realtime command redefines the d1-d12 for me easily?
-- and ill remove $ realtime once cooked?"
--
-- WHY IT BITES. BootTidal redefines every stream as a crossfade launch:
-- d1 = xfade 1 . (|< orbit 0) -- BootTidal.hs:206
-- xfade i = transition tidal True (xfadeCutIn 1) i
-- So a re-eval overlays the outgoing and incoming patterns for a cycle. On any
-- orbit with `# cut N` the second voice releases the first, and the seam costs
-- 6 dB (the analysis lives at BootTidal.hs:154). Great for track->track moves,
-- hostile while adjusting a gain twenty times in a row.
--
-- WHY NOT LITERALLY `$ realtime`. `realtime $ d1 $ pat` parses as
-- `realtime (d1 pat)` — by then d1 has already applied its transition, so no
-- function in that position can undo it. The two shapes below do work, and one
-- of them is one character longer than the idea.
--
-- NOTE: shipped UNVERIFIED in GHCi (writing it required either your live rig or
-- a second Tidal, and taking your rig hostage at midnight was the worse trade).
-- Every line is copied from BootTidal's own known-good definitions. If block 2
-- errors, block 3 is the restore, and a BootTidal reload always resets both.
-- (1) PER-BLOCK, no mode to remember: launch a stream with no transition at all.
-- Use `rt 1 $ ...` while cooking, then put `d1 $ ...` back when it is done.
-- The `|< orbit` must stay: without it the sound lands on orbit 0, which is
-- the wrong LCXL column and the wrong Ardour stem.
let rt i = p i . (|< orbit (i - 1))
-- (2) MODE ON — shadow every stream so plain `d1 $ ...` stops crossfading.
-- A GHCi `let` shadows BootTidal's binding for the rest of the session, so
-- nothing needs reloading and nothing is edited.
let d1 = p 1 . (|< orbit 0); d2 = p 2 . (|< orbit 1); d3 = p 3 . (|< orbit 2); d4 = p 4 . (|< orbit 3); d5 = p 5 . (|< orbit 4); d6 = p 6 . (|< orbit 5); d7 = p 7 . (|< orbit 6); d8 = p 8 . (|< orbit 7); d9 = p 9 . (|< orbit 8); d10 = p 10 . (|< orbit 9); d11 = p 11 . (|< orbit 10); d12 = p 12 . (|< orbit 11)
-- (3) MODE OFF — BootTidal's own definitions, restored verbatim.
let d1 = xfade 1 . (|< orbit 0); d2 = xfade 2 . (|< orbit 1); d3 = xfade 3 . (|< orbit 2); d4 = xfade 4 . (|< orbit 3); d5 = xfade 5 . (|< orbit 4); d6 = xfade 6 . (|< orbit 5); d7 = xfade 7 . (|< orbit 6); d8 = xfade 8 . (|< orbit 7); d9 = xfade 9 . (|< orbit 8); d10 = xfade 10 . (|< orbit 9); d11 = xfade 11 . (|< orbit 10); d12 = xfade 12 . (|< orbit 11)
-- ONE MORE THING, unrelated to the crossfade and probably the actual culprit
-- behind "if i ctrl+enter few times quick i hear the kick few times triggered
-- as if it was a once": `resetCycles` sitting in the SAME blank-line-delimited
-- block as your patterns. Ctrl+enter sends the whole run of non-blank lines, so
-- every press zeroes the clock and the downbeat fires at the press instant.
-- Fix: a blank line under the resetCycles/setcps header, so the pattern block
-- is its own block. (Your call — it changes where your cursor has to sit.)
--
-- TOMORROW: promote `rt` into BootTidal and add a real compose/perform toggle
-- on an IORef, so the mode is a command instead of a shadow (register C-1).
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment