2022-01-19
#jamuary jam number 10. Another gritty, triangle-wave based chord bed, this time with some FM bass and granular processing (via the MiClouds ugen).
(
var fxBus = Bus.audio(s, 1);
SynthDef(\tri, { |out, freq = 440, gate=1, amp = 0.2, pos=0, dis = 0.1|
var snd, env;
env = EnvGen.ar(Env.asr(3, 0.9, 3), gate: gate, doneAction: 2);
snd = Mix.new([
LFTri.ar(freq),
LFTri.ar(freq*(3/2)*1.005),
BrownNoise.ar(0.2)
]);
snd = CrossoverDistortion.ar(snd, dis);
snd = LPF.ar(snd, IRand.new(3000,5000));
snd = snd * env;
Out.ar(out, Pan2.ar(snd, pos: pos, level: amp));
Out.ar(fxBus, snd * 0.2);
}).add();
SynthDef(\bass, { |out, midinote=60, t_trig=1, amp=0.2|
var snd, env;
snd = MiPlaits.ar(pitch: midinote, engine: 2, harm: 0.1, timbre: 0.5, morph: 0, trigger: t_trig);
Out.ar(out, Pan2.ar(snd, level: amp));
}).add();
SynthDef(\fx, {
var in = In.ar(fxBus);
var dens = LFNoise1.kr(0.3).range(0.3, 0.45);
var snd = MiClouds.ar(in, 0, 0, 0.2, dens, 0.5, drywet: 1, mode: 0, rvb: 0.5);
Out.ar(0, snd);
}).add();
)
Synth.new(\fx, addAction: 'addToTail');
(
Pdef(\c1, Pbind(
\instrument, \tri,
\dur, Pseq([8, 8, 8], inf),
\scale, Scale.major,
\degree, Pseq([1, 3, 9], inf),
\legato, 1.1,
\out, 0,
\ctranspose, -12,
\pos, -0.5,
));
Pdef(\c2, Pbind(
\instrument, \tri,
\dur, Pseq([4, 3, 2], inf),
\scale, Scale.majorPentatonic,
\degree, Pseq([1, \, 4, \, 5], inf),
\legato, 1.1,
\out, 0,
\pos, 0.5,
\dis, 0.3,
));
Pdef(\bass, Pmono(
\bass,
\delta, Pbjorklund(3, 8) * 2,
\trig, 1,
\scale, Scale.major,
\degree, Pwrand([1, 5, 9], [0.6, 0.3, 0.1], inf),
\out, 0,
\amp, 0.2,
\gtranspose, -24,
));
)