«8-bit synth» by jshimada

on 15 Mar'16 15:16 in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
(
SynthDef("AM2", { arg freq = 440, modfreq = 12, amp = 0.5, attack = 0.01, dur = 1, pos = 0;
	var carrier, modulator, env;
	modulator = LFSaw.kr(modfreq).range(0, 1);
	carrier = LFSaw.ar(freq: freq, mul: modulator);
	env = Env.perc(attackTime: attack, releaseTime: dur - attack, level: amp).kr(2);
	carrier = carrier * env;
	Out.ar(0, Pan2.ar(carrier, pos))
}).add;
)

//Example Melody

(
a=Pbind(
\instrument, "AM2",
\degree, Pseq([0,1,2,3,4,5,6,7,6,5,4,3,2,1],inf),
\amp, 0.70,
\dur, 0.125,
\modfreq, 12, // add different values
).play;
)
raw 562 chars (focus & ctrl+a+c to copy)
reception
comments