Thanks so much for all these responses ! It’s really appreciated.
@smoge That would be incredibly nice, unfortunately i’m on mac and they’ve decided to serve a ready meal, make only home cinema surround systems available for tweaking, which is unbelievably annoying.The node option sounds good though if it could run in the background and resist command-period.
@tremblap I think you might have understood perfectly, but i’m not sure i understand well myself. How would I go about using this in a Ndef or SynthDef ? The only idea that came to mind after a while was to try this but that doesn’t seem to be it:
~outputs = (0..8)++(11..17);
~input = In.ar(~outbus,16); ~outputs.collect{|j, i| Out.ar(j,~input[i])};
(
t = Ndef(\test, {
var snd;
snd = SinOsc.ar(100, 0, Env.perc().kr(2));
snd = SplayAz.ar(~numChannels, snd, 1, 1, ~numChannels);
}).mold(~numChannels);
t.play(out: ~input);
)
@dscheiba thanks ! That seems like a good solution that i can wrap my head around. However I’m running into a problem, which i’ve had in many other contexts the past few days. This is what i get when i evaluate the Ndef(\out) code:
ERROR: Meta_Bus:audio: failed to get an audio bus allocated. numChannels: 19 server: localhost
ERROR: BusPlug:setBus: bus can't be set to nil.
CALL STACK:
Exception:reportError
arg this = <instance of Error>
Nil:handleError
arg this = nil
arg error = <instance of Error>
Thread:handleError
arg this = <instance of Thread>
arg error = <instance of Error>
Object:throw
arg this = <instance of Error>
BusPlug:setBus
arg this = <instance of Ndef>
arg inBus = nil
NodeProxy:setBus
arg this = <instance of Ndef>
arg argBus = nil
BusPlug:defineBus
arg this = <instance of Ndef>
arg rate = 'audio'
arg numChannels = 19
BusPlug:initBus
arg this = <instance of Ndef>
arg rate = 'audio'
arg numChannels = 19
SynthDefControl:build
arg this = <instance of SynthDefControl>
arg proxy = <instance of Ndef>
arg orderIndex = 0
var ok = nil
var rate = 'audio'
var numChannels = 19
var outerDefControl = nil
var outerBuildProxy = <instance of Ndef>
var controlNames = nil
NodeProxy:put
arg this = <instance of Ndef>
arg index = nil
arg obj = <instance of Function>
arg channelOffset = 0
arg extraArgs = nil
arg now = true
var container = <instance of SynthDefControl>
var bundle = <instance of MixedBundle>
var oldBus = nil
NodeProxy:source_
arg this = <instance of Ndef>
arg obj = <instance of Function>
Meta_Ndef:new
arg this = <instance of Meta_Ndef>
arg key = 'out'
arg object = <instance of Function>
var res = <instance of Ndef>
var server = <instance of Server>
var dict = <instance of ProxySpace>
< closed FunctionDef > (no arguments or variables)
Interpreter:interpretPrintCmdLine
arg this = <instance of Interpreter>
var res = nil
var func = <instance of Function>
var code = "(
Ndef(\out, {
// get signa..."
var doc = nil
var ideClass = <instance of Meta_ScIDE>
Process:interpretPrintCmdLine
arg this = <instance of Main>
^^ The preceding error dump is for ERROR: BusPlug:setBus: bus can't be set to nil.
I’ve also had this error message thrown about a lot when i set the server’s numOutputBusChannels to 18 channels instead of 16. The exact same Ndef might work… or not, without any changes other than setting numOutputBusChannels to a higher number at startup.
I’m also wondering how would i make sure that the Ndef(\out) keeps running in the background ? Say if i hit Command-period for instance.
Overall my main concern with this approach is the above error message, and that i’ve noticed higher CPU with a higher number of outputs channels. I didn’t realise it would affect the audio and code that much to have a higher number of server outputs. Which means I was hoping for a solution that would be a bit lower level i guess, like a hack to fully ignore certain hardware outs at startup and remain at 16 channels out in the server. (Although I don’t know if that makes much sense from a computering point of view :/)
Thanks again for all these suggestions.