Morning peeps,
Is there a way to pass more than one control to a with_fx block; the following works fine:
with_fx :echo, phase: 0.025, mix: 0 do |mix|
# how to get 2 opts into the block??
live_loop :glix do
tick
play 36, release: 0.2
control mix, mix: (ring 1, 0, 0, 0).look
sleep 0.25
end
end
But if I try to add control for phase, for example:
with_fx :echo, phase: 0.025, mix: 0 do |mix, phase|
# how to get 2 opts into the block??
live_loop :glix do
tick
play 36, release: 0.2
control mix, mix: (ring 1, 0, 0, 0).look
sleep 0.25
end
end
Sonic Pi throws the error “with_fx must only accept 0 or 1 args”.
I suppose I could put the fx into a separate function (using define do/end), and pass the opts that way, but that would duplicate the fx wrapper with each pass.
Many thanks
PD-Pi