[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-users] Sending Data from a SynthDef on a control bus. (beginner problem)
Hello All,
I'm trying to write something into my synth def code that will send values
out on a control bus, so that I can use them on the language side.
I'm probably going about this the wrong way but if I try setting up the bus
in the synth def, I get an error:
(
SynthDef("simpleComb",{arg filtF=300,delayTime=0.3,s=Server.default;
var in, out,out2,out3,bus,amp;
in=Mix.new(SoundIn.ar([0,1]));
out=CombN.ar(in,delayTime,10,5);
out2=CombN.ar(in,delayTime+(delayTime/2),10,5);
out3=CombN.ar(in,delayTime+(delayTime/3),10,5);
bus=Bus.control(s,1);
amp=Amplitude.kr(out3);
Out.ar(0,Pan2.ar(RLPF.ar(out+out2+out3,filtF,0.5),0));
}).load(s);
)
However if I leave the bus out of the SynthDef, try to set it up after and
map the value to it, obviously I don't have access to the variable:
(
SynthDef("simpleComb",{arg filtF=300,delayTime=0.3,s=Server.default;
var in, out,out2,out3,amp;
in=Mix.new(SoundIn.ar([0,1]));
out=CombN.ar(in,delayTime,10,5);
out2=CombN.ar(in,delayTime+(delayTime/2),10,5);
out3=CombN.ar(in,delayTime+(delayTime/3),10,5);
amp=Amplitude.kr(out3);
Out.ar(0,Pan2.ar(RLPF.ar(out+out2+out3,filtF,0.5),0));
}).load(s);
)
Synth(\simpleComb);
b=Bus.control(s);
amp.map(1,b); // - obviously won't work.
What is the best approach for what I'm attempting here? All the examples and
help seem to either use control busses for sending values to a synth def or
use them without synth defs and just {}.play notation. I would use shared
busses but (am I right in thinking?) I can't use the internal server with
external soundcard. I know SendTrig.kr and an OSC responder is an option but
I'm already using several OSC responders to listen to others via a network
so I'm keen to keep them out of my "local" code if possible.
Thanks,
Pat
_______________________________________________
sc-users mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/