Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OSC messages that fall within a block override each other failing DoneActions #2501

Closed
telephon opened this issue Nov 16, 2016 · 0 comments
Closed

Comments

@telephon
Copy link
Member

@telephon telephon commented Nov 16, 2016

This has been a long standing issue, but I'd like to put a good reproducer here. It has to do with how DoneActions in the server are handled, or rather when they are called. Because when controls are set within one block size, the appropriate action may never be performed.

As we all know, this may cause hanging noses.

// run a silent synth
a = { |gate=1| FreeSelf.kr(1 - gate) }.play; a.onFree { "synth ended.".postln };
 
// CASE 1 set the gate to 0. This frees the synth.
s.sendBundle(0.2, ["/n_set", a.nodeID, "gate", 0]);


// run a silent synth
a = { |gate=1| FreeSelf.kr(1 - gate) }.play; a.onFree { "synth ended.".postln };

// CASE 2 set the gate to 0, then to 1. This doesn't free the synth.
s.sendBundle(0.2, ["/n_set", a.nodeID, "gate", 0],  ["/n_set", a.nodeID, "gate", 1]);


// run a silent synth
a = { |gate=1| FreeSelf.kr(1 - gate) }.play; a.onFree { "synth ended.".postln };


// CASE 3 set the gate to 0, then to 1, but with 0.1 s time difference. This frees the synth.
(
s.sendBundle(0.2, ["/n_set", a.nodeID, "gate", 0]);
s.sendBundle(0.21, ["/n_set", a.nodeID, "gate", 1]);
)

CASE 2 may happen under the hood where one least expects it.

btw. also this doesn't free:

a = { |gate=1| FreeSelf.kr(1 - gate) }.play; a.onFree { "synth ended.".postln };

(
s.sendBundle(0.2, ["/n_set", a.nodeID, "gate", 0]);
s.sendBundle(0.200001, ["/n_set", a.nodeID, "gate", 1]);
)
@telephon telephon changed the title OSC messages that fall within a block override each other OSC messages that fall within a block override each other fainling DoneActions Nov 18, 2016
@telephon telephon changed the title OSC messages that fall within a block override each other fainling DoneActions OSC messages that fall within a block override each other failing DoneActions Jan 3, 2017
@muellmusik muellmusik closed this Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants