[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-users] Deal with In and Out with crucial Instr and Patch



thanks.
If i do

(
Instr(\reverb,{arg inbus=2, mix=0.5, room=0.5, damp=4, vol=0.3, outbus=2;

    var out, in;
in = In.ar(inbus+16, 1);//Input channels offset is +16 so to get the second input add 16.
out = FreeVerb.ar(in, mix, room, damp, vol);
Out.ar(outbus, out);
});
)

p = Patch(\reverb,[2, 0.5, 0.5, 4, 0.3, 2]);
p.play(bus: 2);

I have 


-> Instr("reverb")
-> Patch("reverb")
ERROR: source has nil rate Patch("reverb")
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>
Meta_PatchOut:new
arg this = <instance of Meta_PatchOut>
arg source = <instance of Patch>
arg group = <instance of Group>
arg bus = <instance of Bus>
AbstractPlayer:topMakePatchOut
arg this = <instance of Patch>
arg agroup = <instance of Group>
arg private = false
arg bus = <instance of Bus>
AbstractPlayer:makePatchOut
arg this = <instance of Patch>
arg agroup = <instance of Group>
arg private = false
arg bus = <instance of Bus>
arg bundle = <instance of MixedBundle>
AbstractPlayer:prepareToBundle
arg this = <instance of Patch>
arg agroup = <instance of Group>
arg bundle = <instance of MixedBundle>
arg private = false
arg bus = <instance of Bus>
AbstractPlayer:prPlay
arg this = <instance of Patch>
arg atTime = nil
arg bus = <instance of Bus>
arg timeOfRequest = 32396.632050954
var bundle = <instance of MixedBundle>
AbstractPlayer:play
arg this = <instance of Patch>
arg group = nil
arg atTime = nil
arg bus = <instance of Bus>
var timeOfRequest = 32396.632050954
Interpreter:interpretPrintCmdLine
arg this = <instance of Interpreter>
var res = nil
var func = <instance of Function>
var code = "p.play(bus: 2);"
var doc = nil
var ideClass = <instance of Meta_ScIDE>
Process:interpretPrintCmdLine
arg this = <instance of Main>
^^ The preceding error dump is for ERROR: source has nil rate Patch("reverb")

Could it be someting about Specs defaults?




On Fri, Jan 18, 2019 at 10:38 PM <crucialfelix@xxxxxxxxx> wrote:


https://github.com/crucialfelix/crucial-library/blob/master/HelpSource/Guides/Patch-Busses-and-Groups.schelp


// allocate a bus at index 10, 2 channels
b = Bus(\audio, 10, 2);

p = Patch(\reverb, [2, 0.5, 0.5, 4, 0.3, 2]);
// play patch onto that bus
p.play(bus: b);

I think you can also just pass in a number for what bus to use:

p.play(bus: 10);


You can also use In.ar and Out.ar within the Instr if you want.











On Fri, Jan 18, 2019 at 10:29 PM <alfonso.santimone@xxxxxxxxx> wrote:
Thanks mauritohm.
For example i don't understand why this

Instr(\reverb,{arg inbus=2,mix=0.5,room=0.5,damp=4,vol=0.3, outbus=2;

    var out, in;
in = In.ar(inbus + 16, 2);//Input channels offset is +16 so to get the second input add 16.
out = FreeVerb.ar(in, mix, room, damp, vol);
Out.ar(outbus, out);
});


)
p = Patch(\reverb, [2, 0.5, 0.5, 4, 0.3, 2]);
p.play;

gives me the following error when i evaluate p.play;

ERROR: numChannels is nil Patch Patch("reverb")
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>
AbstractPlayer:topMakePatchOut
arg this = <instance of Patch>
arg agroup = <instance of Group>
arg private = false
arg bus = nil
AbstractPlayer:makePatchOut
arg this = <instance of Patch>
arg agroup = <instance of Group>
arg private = false
arg bus = nil
arg bundle = <instance of MixedBundle>
AbstractPlayer:prepareToBundle
arg this = <instance of Patch>
arg agroup = <instance of Group>
arg bundle = <instance of MixedBundle>
arg private = false
arg bus = nil
AbstractPlayer:prPlay
arg this = <instance of Patch>
arg atTime = nil
arg bus = nil
arg timeOfRequest = 29943.628170553
var bundle = <instance of MixedBundle>
AbstractPlayer:play
arg this = <instance of Patch>
arg group = nil
arg atTime = nil
arg bus = nil
var timeOfRequest = 29943.628170553
Interpreter:interpretPrintCmdLine
arg this = <instance of Interpreter>
var res = nil
var func = <instance of Function>
var code = "p.play;"
var doc = nil
var ideClass = <instance of Meta_ScIDE>
Process:interpretPrintCmdLine
arg this = <instance of Main>
^^ The preceding error dump is for ERROR: numChannels is nil Patch Patch("reverb")

On Fri, Jan 18, 2019 at 10:19 PM <mauritohm@xxxxxxxxx> wrote:
If I recall correctly, you can just Out.ar(4, signal) and then you will be sending your output through the fifth channel (our bus).
Remember to set SC outputs using serverOptions.numOutputBusChannels, then in Jack just route SC's out 5th channel to whatever input on the other side.

I hope it helps.
Cheers

On Fri, Jan 18, 2019 at 2:03 PM <alfonso.santimone@xxxxxxxxx> wrote:
Hi eddi,
thanks for your suggestions. 
I'll do further explorations. 


Il giorno ven 18 gen 2019, 19:20 <alln4tlists@xxxxxxx> ha scritto:
Hi Alfonso,

I have little experience with the Instr/Patch way, but recall that it works well with James' MixerChannel quark, which I rely heavily on (thanks, James!)

Using it might solve your challenge already. If not, you can at least peek at how he does it.

Cheers,
eddi



--
https://soundcloud.com/all-n4tural
https://alln4tural.bandcamp.com


_______________________________________________ sc-users mailing list info (subscription, etc.): http://www.birmingham.ac.uk/facilities/ea-studios/research/supercollider/mailinglist.aspx archive: https://listarc.bham.ac.uk/marchives/sc-users/ search: https://listarc.bham.ac.uk/lists/sc-users/search/