«Stockmarket Sonification» by telephon

on 11 Aug'11 23:54 in mood musicmoney
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
(
SynthDef(\dollar, { |out, freq = 440, amp = 0.1, pan = 0, sustain = 1.0|
	var env = EnvGen.kr(Env([amp, amp, 0], [sustain, 0.01]), doneAction: 2);
	var decay = freq ** -0.5 * 100;
	var string = CombL.ar(Decay2.ar(Impulse.ar(0), 0.0001, 0.001), 1/freq, 1/freq, decay);
	var damped = string; //LPF.ar(string, Line.kr(11000, 3000, decay));
	OffsetOut.ar(out, Pan2.ar(damped * env, pan));
}).add;
);

(
SynthDef(\euro, { |out, freq = 440, amp = 0.1, pan = 0, sustain = 1.0|
	var env = EnvGen.kr(Env.perc(0.001, sustain), doneAction: 2);
	var decay = freq ** -0.5 * 100;
	var thing;
	freq = freq * (1..7).nthPrime;
	thing = SinOsc.ar(freq , 0, amp * AmpComp.kr(freq)).mean;
	OffsetOut.ar(out, Pan2.ar(thing * env, pan));
}).add;
);


(
Pdef(\stock, { |note = 0, sustain = 1|
	Pbind(
		\instrument, [\dollar, \euro].choose,
		\note, note.value + Pseq((12..0).curdle(0.1).scramble.flat * 3), 
		\dur, sustain.value / 12
	)
})
);

(
Pdef(\ett, 
	Pbind(
		\type, \phrase,
		\instrument, \stock,
		\dur, 4,
		\legato, Prand((1..5), inf),
		\note, Prand((0..12), inf) + Prand([[0, 2], [0, 6], [0, 7], 0, 0], inf)
	)
).play
)
descendants
«Ellyanna» by anonymous (private)
«wmgghazs» by anonymous (private)
full graph
raw 1157 chars (focus & ctrl+a+c to copy)
comments