Multiple pb control synths working in basic ways

feature-multitrack
Mike Lynch 2023-04-09 12:32:11 +10:00
parent 735a1712ea
commit dfc508ee02
3 changed files with 37 additions and 37 deletions

View File

@ -15,7 +15,7 @@
} }
).play(s, [\in1, ~usbinput1, \in2, ~usbinput2, \out, ~recordb]); ).play(s, [\in1, ~usbinput1, \in2, ~usbinput2, \out, ~recordb]);
~granulatorb = Bus.audio(s, 2); ~grb = Bus.audio(s, 2);
// LFO buses and synths // LFO buses and synths

View File

@ -17,7 +17,7 @@
arg in=2, gbus=4, out=0, passthrough=0.75, grains=0.75; arg in=2, gbus=4, out=0, passthrough=0.75, grains=0.75;
Out.ar(out, (grains * In.ar(gbus, 2)) + (passthrough * In.ar(~recordb, 1) ! 2)); Out.ar(out, (grains * In.ar(gbus, 2)) + (passthrough * In.ar(~recordb, 1) ! 2));
} }
).play(s, [\in, ~usbinput, \gbus, ~granulatorb, \out, ~fxb ], \addToTail); ).play(s, [\in, ~usbinput, \gbus, ~grb, \out, ~fxb ], \addToTail);
~filtermodb = Bus.control(s, 1); ~filtermodb = Bus.control(s, 1);

View File

@ -5,14 +5,21 @@ Server.default.options.inDevice_("Scarlett 2i2 USB");
//Server.default.options.outDevice_("Scarlett 2i2 USB"); //Server.default.options.outDevice_("Scarlett 2i2 USB");
) )
Server.killAll; Server.killAll;
~frippbuffer.write("/Users/mike/Music/SuperCollider Recordings/slow.aiff");
~frippbuffer.isNil;
("./synths.scd").loadRelative; ("./synths.scd").loadRelative;
("./control.scd").loadRelative; ("./control.scd").loadRelative;
("./effects.scd").loadRelative; ("./effects.scd").loadRelative;
Granulator.init(s);
(
// set up four position buffers with synths
~modes = [ ~modes = [
[ "saw", \pos_saw ], [ "saw", \pos_saw ],
[ "reverse", \pos_reverse ], [ "reverse", \pos_reverse ],
@ -21,9 +28,34 @@ Server.killAll;
[ "random", \pos_rand ] [ "random", \pos_rand ]
]; ];
~granulators = Array.new(4);
~posb = Array.new(4);
~possynth = Array.new(4);
(0..3).do({
var pb = Bus.control(s, 1), ps;
~posb.add(pb);
ps = Synth(\pos_saw, [ \out, pb ]);
~possynth.add(ps);
});
)
(
(0..3).do({ |i|
var pb = ~posb.at(i);
~granulators.add(Granulator.new(~buflen, ~recordb, ~outb, pb, ~triggerb, ~pitchb));
});
)
~granulators[1].record(1.0);
~possynth[0].set(\speed,200);
("./interface.scd").loadRelative;
Granulator.init(s)
~g3 = Granulator.new(4, ~recordb, ~granulatorb, ~playbacklfob, ~triggerb, ~pitchb); ~g3 = Granulator.new(4, ~recordb, ~granulatorb, ~playbacklfob, ~triggerb, ~pitchb);
@ -82,35 +114,3 @@ Granulator.init(s)
~frippbuffers[~currentfripp].write("/Users/mike/Music/SuperCollider Recordings/test.aiff");
(
~monitor = SynthDef(
\monitor_synth,
{
arg in=2, out=0;
Out.ar(out, In.ar(in, 2))
}
).play(s, [\in, ~fxb, \out, 0 ], \addToTail);
)
~monitor.set(\in, ~reverbb)
~monitor.free
~pitchb.scope()
~frippbuffers.plot;
~bufrecorder.set(\buffer, ~frippbuffers[1]);
~granulators[0].get(\buffer, {|v| v.postln});
(
~frippbuffers.do({
|b, i|
b.write("/Users/mike/Music/SuperCollider Recordings/buffer" ++ i.asString ++ ".aiff");
});
)