It it possible ? (using it like the “all notes off” or “panic” of midi.
I tried this:
CmdPeriod.removeAll;
but after I was playing on my connected midi keyboard I got this:
note_on 1 41 95
FAILURE IN SERVER /s_new Group 1002 not found
note_off 1 41 0
FAILURE IN SERVER /n_set Node 1081 not found
(I have a group for each midi channel, in order to send control messages to each of them
This does not what you seem to expect: it removes the registration, if you want to stop with CmdPeriod explicitely, you have to do CmdPeriod.run.
If you want to stop only all those synths with CmdPeriod, that you’re playing with your keyboard, you would have to unregister all others, but this is probably impractical.
Not knowing your setup, but as you already have arranged midi-triggered synths in groups I’d put these groups in another metagroup, say m. Then just do m.release or m.free.
Also, ServerTree
is a companion to CmdPeriod
, which runs whenever the server re-initializes. You can use it to re-create a group/bus architecture.
ServerTree.add { g = Group.new.debug("made") };
g // nil
s.boot;
// localhost: server process's maxLogins (1) matches with my options.
// localhost: keeping clientID (0) as confirmed by server process.
// made: Group(1000) <<<-- HERE! :)
// Shared memory server interface initialized
g // Group(1000)
// hit cmd-.
-> made: Group(1001)
g // Group(1001)
At this point, if you’re playing new synths into g
, the behavior should be seamless.
hjh
The following works:
ServerTree.add { // rebuilt the groups after CmdPeriod
~groups = Array.newClear(~max_channels);
~max_channels.do({|i| ~groups[i] = Group.new});
}; CmdPeriod.removeAll; // To keep midi and OSC alive
Thank you very much!
I just realized than by using CmdPeriod.removeAll, it is not possible to stop the Pbinds with CmdPeriod. So, it is necessary, either to use CmdPeriod.remove on every midi and osc handler, or redefining them in ServerTree.add.
No, that isn’t necessary.
http://doc.sccode.org/Classes/AbstractResponderFunc.html#-permanent
OSCdef(\pleaseSurviveCmdPeriod, { ... }, ...).permanent;
hjh
Oh yes, I forget that this is also a possibility. And I forgot how to do that. Thanks !