Hi everyone.
I’m trying out different composition styles, and right now I’m trying to figure out a way to control the different aspects of the song with long envelopes. Something to control the volume of each element (drums, synth, etc.), each having it’s own Bus. So you could fade in smoothly, then after 4 bars, cut the Bus completely, then have it come back at some point, etc. while other sounds are being controlled by their own envelope.
So you’d basically start off with all elements of the song playing at once, then have the busses subtractively (that a word?) controlling the song. Like one Synth and Bus would be like this, but the problem is, this just doesn’t seem to work. It will fade in then just stay there:
~ampbus = Bus.audio(s,2);
(
SynthDef(\string, { arg i_out, freq = 360, gate = 1, pan, amp=0.1;
var out, eg, fc, osc, a, b, w;
fc = LinExp.kr(LFNoise1.kr(Rand(0.25,0.4)), -1,1,500,2000);
osc = Mix.fill(8, { LFSaw.ar(freq * [Rand(0.99,1.01),Rand(0.99,1.01)], 0, amp) }).distort * 0.2;
eg = EnvGen.kr(Env.asr(1,1,1), gate, doneAction: Done.freeSelf);
out = eg * RLPF.ar(osc, fc, 0.1);
#a, b = out;
Out.ar(i_out, Mix.ar(PanAz.ar(4, [a, b], [pan, pan+0.3])));
}).add;
Pdef(\testPbind, Pbind(\instrument, \string, \dur, 1, \out, ~ampbus)).play;
SynthDef(\env, {
arg out=0, in=0, gate=1;
var env, levels, times, curves;
in = In.ar(in,2);
levels = \levels.kr([0,1,0]);
times = \times.kr([1,1]);
curves = \curves.kr([5,-5]);
env = EnvGen.ar(Env.new(levels,times,curves), gate);
Out.ar(out, in * env);
}).add;
~ampsyn = Synth(\env, [\in, ~ampbus,\levels, [0,0.5,1,1,0,0,1,1,0], \times, [7,1,16,0,4,0.001,8,0]]);
)
I don’t have to use busses per say. I’m open to anything that can smoothly do this. Like if there was a way to do it with Patterns, or functions, Spawners, anything…that would be fine too. Any ideas appreciated!