home/ atoms/ sonicpi-control-node-lifecycle

Sonic Pi control on a synth node requires capturing its handle and setting *_slide before calling control

To automate a Sonic Pi parameter over time (e.g. sliding cutoff), the synth node must be captured at creation, the matching *_slide parameter must be set before control is called, and the node must remain alive (long sustain:) for the duration. If control is called after the node has ended, or if the fx block is rebuilt each pass (creating a new node), the slide doesn’t happen or resets. with_fx ... do |fx| captures the fx handle for later control(fx, ...) calls.

Examples

s = play :e2, sustain: 8, cutoff: 80, cutoff_slide: 4; sleep 1; control s, cutoff: 120 — the cutoff glides over 4 beats.

Assessment

Explain why control sometimes has no effect in a Sonic Pi live_loop. Write a code snippet that correctly captures a synth handle, sets a slide parameter, and uses control to automate it.

“Capture the handle (`s = play …` / `with_fx … do |fx|`), set the matching `*_sli”
context/ · L5-debug/sonicpi.md · chunk 1