Real-time processing of multiple microphone inputs

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


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,
	                var trig, sig, env;

	                    trig =;
	                    sig  =, 2);   // Segnale in ingresso
	                    sig  =,
		                                    sig ! 2,   // Doppio mono
	                    env =,fadein,1,fadeout,doneAction:2);
	      ,sig * env)

a = Synth(\glive_1,[\inBus,0,\outBus,0,\gden,10,\gdur,0.1,\amp,1,\gate,1]);

In your code it seems like you are only attempting to read from the first input bus as the arg inBus = 0 as a default value and you are also calling it explicitly in ‘Synth(\glive_1, [\inBus, 0…]’. What happens if you do ‘Synth(\glive_1, [\inBus, 1…]’?. If a microphone is connected to the 2nd input it should produce sound. An easy way to check if input 2 is connected:


This should produce sound (watch out for the feedback if you are using speakers).

1 Like

SoundIn’s inputs are different from those of In. To get multiple channels from SoundIn, provide an array of offsets from the first hardware input: + [0, 1]).


1 Like

Thanks a lot for the advice, it helped me a lot. now, if I wanted to connect a third microphone as well, would I have to do the same thing? or put a 2 in the array?