2023-04-09 01:42:17 +00:00
|
|
|
|
2023-04-24 06:49:36 +00:00
|
|
|
// this is just output effects now
|
2023-04-09 01:42:17 +00:00
|
|
|
|
|
|
|
(
|
|
|
|
|
2023-04-24 06:49:36 +00:00
|
|
|
|
|
|
|
~outfxb = Bus.audio(s, 2);
|
2023-04-09 01:42:17 +00:00
|
|
|
~delayb = Bus.audio(s, 2);
|
|
|
|
~reverbb = Bus.audio(s, 2);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
~grainmixer = SynthDef(
|
|
|
|
\grain_mixer,
|
|
|
|
{
|
2023-04-24 06:49:36 +00:00
|
|
|
arg in=2, grainb=4, out=0, passthrough=0.75, grains=1;
|
|
|
|
Out.ar(out, (grains * In.ar(grainb, 2)) + (passthrough * In.ar(in, 1) ! 2));
|
2023-04-09 01:42:17 +00:00
|
|
|
}
|
2023-04-24 06:49:36 +00:00
|
|
|
).play(s, [\in, ~infxb, \grainb, ~grainsb, \out, ~outfxb ], \addToTail);
|
2023-04-09 01:42:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// delay always passes through 100% of its input + amp % of the delay
|
|
|
|
|
|
|
|
|
|
|
|
~delay = SynthDef(
|
|
|
|
\delay, {
|
|
|
|
arg in, out, maxdelay=1, delaytime=0.2, decaytime=0.1, amp=0.5;
|
|
|
|
var sig = In.ar(in, 2), del;
|
|
|
|
del = CombC.ar(sig, maxdelay, delaytime, decaytime, amp);
|
|
|
|
Out.ar(out, sig + del);
|
|
|
|
}
|
2023-04-24 06:49:36 +00:00
|
|
|
).play(s, [ \in, ~outfxb, \out, ~delayb ], \addToTail);
|
2023-04-09 01:42:17 +00:00
|
|
|
|
|
|
|
// try taking out the reverb because I think it causes noises
|
|
|
|
|
|
|
|
~reverb = SynthDef(
|
|
|
|
\reverb, {
|
|
|
|
arg in, out, mix=0.33, room=0.5, damp=0.5, amp=0.25;
|
|
|
|
var input = In.ar(in, 2);
|
|
|
|
Out.ar(out, input + FreeVerb2.ar(input[0], input[1], mix, room, damp, amp));
|
|
|
|
}
|
|
|
|
).play(s, [ \in, ~delayb, \out, 0 ], \addToTail);
|
|
|
|
|
2023-04-24 05:54:24 +00:00
|
|
|
"Effects running".postln;
|
2023-04-09 01:42:17 +00:00
|
|
|
)
|
2023-04-24 06:49:36 +00:00
|
|
|
|