MouseMixer from tonight

3 views
Skip to first unread message

Nick Colvin

unread,
Nov 18, 2015, 9:20:38 PM11/18/15
to nycsuper...@googlegroups.com
s = Server.default;

a = Bus.audio(s, 2);
b = Bus.audio(s, 2);
c = Bus.audio(s, 2);
d = Bus.audio(s, 2);


(
SynthDef(\mixer, 
{
arg in1, in2, in3, in4;

var out1, out2, out3, out4;

out1 = In.ar(in1, 2);
out1 = out1 * (MouseX.kr(1, -0.5, 0).max(0) * MouseY.kr(1, -0.5, 0).max(0));
out2 = In.ar(in2, 2);
out2 = out2 * (MouseX.kr(-0.5, 1, 0).max(0) * MouseY.kr(1, -0.5, 0).max(0));

out3 = In.ar(in3, 2);
out3 = out3 * (MouseX.kr(1, -0.5, 0).max(0) * MouseY.kr(-0.5, 1, 0).max(0));

out4 = In.ar(in4, 2);
out4 = out4 * (MouseX.kr(-0.5, 1, 0).max(0) * MouseY.kr(-0.5, 1, 0).max(0));

Out.ar(0, Mix([out1, out2, out3, out4]));


}).add;

)

Synth.new(\mixer, [\in1, a, \in2, b, \in3, c, \in4, d]);

(
{Out.ar(a, SinOsc.ar(220)!2)}.play;
{Out.ar(b, SinOsc.ar(440)!2)}.play;
{Out.ar(c, SinOsc.ar(660)!2)}.play;
{Out.ar(d, SinOsc.ar(880)!2)}.play;

)

MouseMixer.sc
Reply all
Reply to author
Forward
0 new messages