«bird» by LFSaw

on 26 May'17 11:16 in live codingbirdsimple exampleentrypoint

Example sound explored in the temporary event Creating soundscapes with live coding techniques https://temporary.fi/experiments/creating-soundscapes-with-live-coding-techniques

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
(
Ndef(\bird).addSpec(\dur, [0.01, 1]);
Ndef(\bird).addSpec(\trig, [0, 1, \lin, 1]);
Ndef(\bird, {|dur = 1|

	var freqEnv, env, wEnv, src;
	var startFreq = \startFreq.kr(1000);
	var endFreq   = \endFreq.kr(4000);
	var trig = \trig.tr(1);

	env = EnvGen.ar(Env(
		[0, 1, 1, 0],
		[0.1, 1, 0.5].normalizeSum
	), trig, timeScale: dur);


	wEnv = EnvGen.ar(Env(
		[0, 1, 0],
		[1, 0],
		2
	), trig, timeScale: dur);

	freqEnv = wEnv * (endFreq - startFreq).abs + startFreq;
	wEnv = 1- (wEnv * 0.5);
	
	src = Pulse.ar(freqEnv * SinOsc.ar(0.1).range(0.99, 1.01), wEnv) * env!2;
	src
})
)

Ndef(\bird).play


Ndef(\bird).set(\trig, 1, \dur, 0.1)


Ndef(\bird).set(\trig, 1, \dur, rrand(0.1, 0.2), \endFreq, exprand(500, 1000), \startFreq, 4000)
raw 773 chars (focus & ctrl+a+c to copy)
reception
comments