Hello everyone, I need to figure out how to receive two or more microphone signals into the supercollider. by connecting two microphones to my sound card, SC always and only reads the microphone connected to input num. 1 and the others don’t.
I leave the code below
ServerOptions.devices;
s.options.inDevice_("Microfono (US-16x08)");
s.options.outDevice_("Cuffie (Realtek High Definition");
(
SynthDef(\glive_1,{arg outBus=0, inBus=0,
gden=2, gdur=0.2, amp=0, pan=0, envbuf= -1,
fadein=0.2,fadeout=1,gate=0;
var trig, sig, env;
trig = Impulse.ar(gden);
sig = SoundIn.ar(inBus, 2); // Segnale in ingresso
sig = GrainIn.ar(2,
trig,
gdur,
sig ! 2, // Doppio mono
pan,
envbuf,512,amp);
env = Linen.kr(gate,fadein,1,fadeout,doneAction:2);
Out.ar(outBus,sig * env)
}).add
)
a = Synth(\glive_1,[\inBus,0,\outBus,0,\gden,10,\gdur,0.1,\amp,1,\gate,1]);