I’m wondering if calling set
on a freed node is a big problem (beyond cluttering logs with “Node not found” errors)?
I have a closed hi-hat sample sequence that repeats non-regularly, and a open hi-hat sample sequence that is regular. The musical effect I want is for the closed hat to choke the open hat, so every time the closed hat triggers, I also call set(\gate,0)
on the open hat synth to stop it. Thing is, often the open-hat synth is already done and freed, so the set
call throws the error.
I mention the musical context because I can’t explicitly score the open-hat chokes due to the chaotic way the two sequences interact. My current method works, musically and sonically speaking, but the blast of errors is eyebrow-raising.
The bigger question would be, can I send a message to the server somehow “only set
if this node is not freed already”?
It’s not, and you can suppress the error posts using the /error
command: Server Command Reference | SuperCollider 3.12.2 Help
hjh
2 Likes
Thanks! I went with the per-bundle error suppression, documenting here for messaging noobs like me:
s.sendBundle(nil, // nil: send ASAP *
["/error",-1], // suppress errors for this bundle only
synth.setMsg(\gate,0)); // messaging version of Synth.set
*I couldn’t find documentation for passing nil
as the latency arg to sendBundle
, but it seems to be the right value for “send ASAP”, since e.g. 0
results in “Late” warnings, and s.latency
was way too slow.
EDIT: I found a documented example for nil
in makeBundle
…
It is the correct way to send ASAP – but, when sequencing, generally you do want to use some amount of latency (“Server Timing” help file). It doesn’t have to be the default 200 ms that Server objects start off with, but it should be at least as long as the hardware buffer size.
hjh
1 Like