«Herbie Hancock's Chameleon» by Bruno Ruviaro

on 24 Jan'20 07:14 in sclorkchameleonhancock

SynthDef & Pbind bass line demo made for SCLOrk in 2021

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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
// Herbie Hancock's Chameleon
// SynthDef and Pbind
// made for SCLOrk in 2021

(
SynthDef("bassy", {arg out=0, freq=440, amp=0.1, att = 0.01, rel = 0.01, gate=1, pan=0;
	var snd, env, saw, sine;
	env = Env.asr(attackTime: att, sustainLevel: amp, releaseTime: rel).kr(gate: gate);
	saw = Saw.ar(freq: freq * Array.rand(16, 0.99, 1.01), mul: env / 3);
	sine = SinOsc.ar(
		freq: freq * [0.5, 1, 2],
		mul: env * [1, 0.5, 0.4]
	).tanh.distort / 4;
	snd = saw + sine;
	snd = FreeVerb.ar(snd, 0.3, 0.4, 0.9);
	snd = LPF.ar(snd, XLine.kr(15000, 700, 0.3));
	snd = Pan2.ar(Mix(snd), pan);
	snd = Limiter.ar(snd);
	DetectSilence.ar(snd, doneAction: 2);
	Out.ar(out, snd);
}).add;
)

~bpm = TempoClock.new(90/60).permanent_(true);

(
p = Pbind(
	\instrument, "bassy",
	\dur, Pseq([
		0.25, Rest(0.5), 0.25, // beat 1
		Rest(0.5), 0.25, Rest(0.25), // beat 2
		Rest(0.5), 0.5, // beat 3
		0.5, 0.5 // beat 4
	], inf),
	\midinote, Pseq([
		34, \rest, 44, // 1
		\rest, 46, \rest, // 2
		\rest, 36, // 3
		37, 38, // 4
		39, \rest, 46, // 1
		\rest, 49, \rest, // 2
		\rest, 31, // 3
		32, 33 // 4
	], inf),
	\amp, Pseq([
		1, \rest, 1, // 1
		\rest, 1, \rest, // 2
		\rest, 1, // 3
		1, 1, // 4
		1, \rest, 1, // 1
		\rest, 1, \rest, // 2
		\rest, 1, // 3
		1, 1 // 4
	], inf) * 0.2,
	\att, 0.001,
	\rel, 0,
	\legato, 0.9,
).play(~bpm);
)

p.stop;
raw 1397 chars (focus & ctrl+a+c to copy)
reception
comments