This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set_sched_ahead_time! 0 # Setting that one to a negative value makes Sonic Pi complain, it sounds like. | |
with_fx :bpf do |s| # Setting up the fx to be controlled internally | |
synth :square, note: 32,release: 400 # Long release as the control will affect a single note | |
live_loop :ctl do # The loop is inside the fx as this is where the action will be. | |
ctl=sync "/ctl" # The OSC message which Processing sends, based on mouse coordinates. | |
rz=ctl[:args][0] # Assigning the first argument to resonance. | |
ct=ctl[:args][1] # Assigning the second argument to centre. | |
control s, res: rz, centre: ct # The actual control of the fx. | |
set_sched_ahead_time! -2 # Sounds like setting this again every time actually helps. |