«Wobble» by gacastillo
on 15 Mar'16 15:48 inWobble, tremolo, whatever you want to call it. This code uses amplitude modulation with a triangle wave to produce a lower register pulsating synth.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
(
SynthDef("Triangular AM", { arg freq = 440, modfreq = 5, amp = 0.5, attack = 0.01, release = 0.1, pos = 0, gate = 1;
var carrier, modulator, env;
modulator = SinOsc.kr(modfreq).range(0, 1); // provides amplitude modulation for wobble
carrier = LFTri.ar(freq: freq, mul: modulator); // provides triangle wave for an interesting harmonic
env = Env.asr(
attackTime: attack,
sustainLevel: amp,
releaseTime: release).kr(doneAction: 2, gate: gate);
carrier = carrier * env;
Out.ar(0, Pan2.ar(carrier, pos))
}).add;
)
(
// Using these settings you can produce a pulsating wobble sound
~wobble = Pbind(
\instrument, "Triangular AM",
\scale, Scale.aeolian,
\ctranspose, -12,
\degree, Pseq([
[-7,-3, 0, 2, 4, 7],
[-8, -4, -1, 1, 3, 6],
[-9, -5, -2, 0, 2, 5],
[-5, -1, 2, 4, 6, 9],
[-4, 0, 3, 5, 7, 10],
], inf),
\dur, Pseq([Pn(4, 3), 2, 2], inf),
\amp, 0.4,
\modfreq, Pseq([Pn(6.5, 3), 2, 6.5], inf),
\attack, 2,
\release, 1.2,
\pos, [-1, -0.7, -0.2, 0.2, 0.7, 1],
\gate, 0,
);
)
~wobble.play;
reception
comments