Files
AV-Live/touchosc/gen/lua/feedback.lua
T
L'électron rare 2ad47c705e feat(touchosc): layout pages lua scripts and dist
Three-page pager (LIVE / FX-HARM-CONCERT / SEQ) with corrected
OSC mapping: scale sends string name not index, octave is absolute
(0/1/2), body-play is /control/doScene "play", arm-mel/rhy send
/launch "melseq"/"rhythmseq". Per-voice VU strip deliberately
omitted (engine sums to bus 0 only). Lua scripts embedded from
gen/lua/*.lua. Dist file committed as the deliverable.
18 tests pass.
2026-06-28 13:03:42 +02:00

22 lines
611 B
Lua

-- Global feedback receiver: beat flash + master RMS VU.
-- Attached to the beat BOX and master VU FADER on page 1.
-- API verified on GrosMac at fidelity gate.
function onReceiveOSC(message, connections)
local p = message[1]
local args = message[2]
if p == "/sync/beat" then
self.color = Color(1, 1, 1, 1)
elseif p == "/sync/rms" then
local amp = (args and args[1] and tonumber(args[1].value)) or 0
self.values.x = amp
end
end
function onFrame()
local c = self.color
if c and c.r then
local decay = 0.85
self.color = Color(c.r * decay, c.g * decay, c.b * decay, 1)
end
end