«Lamento» by 56228375

on 03 Dec'17 18:19 in padsadtheoryquark

( Requires the theory quark from https://github.com/shimpe/theoryquark ) Moments before life support was to fail, a supercollider satellite was ejected into deep space lamenting their brave but foolish undertaking. Eons later it still floats in empty space, sole witness of times long gone by. To install the quark, just unpack it in the directory that opens when you open scide -> "file menu" -> "open user support directory" and then restart scide (or recompile the class library using the "language" -> "recompile class library" menu)

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
62
63
64
65
66
67
68
69
70
71
72
(
s.options.memSize_(16384);
s.reboot;
)

(
s.waitForBoot({
	var parser = TheoryNoteParser.new;

	SynthDef(\pad, {
		| out = 0, freq = 440, gate=1, a = 0.1, s = 3, r = 1|
		var freqs = { freq * LFNoise2.kr(freq:1,mul:0.01,add:1) }!24;
		var gen = LFSaw.ar(freq:freqs) * 0.1;
		var fmod = 1;
		//var fmod = LFCub.kr(freq:1/12).range(1, LFNoise2.kr(freq:1).range(6,7)); // sharper sound
		var rqmod = LFNoise2.kr(freq:1/8).range(0.1,1.0);
		var modspeed = 1/s;
		//var modspeed = 10; // tremolo sound
		//var modspeed = 10k*LFNoise2.ar(freq:4/s); // wobble sound (works best with sharper sounding pad)
		var snd = RLPF.ar(in:gen, freq:SinOsc.kr(modspeed).range(freqs*0.8, freqs*1.2) * fmod, rq:rqmod);
		var env = EnvGen.ar(Env.new(levels:[0,1,1,0], times:[a, s, r]), gate, doneAction:2);
		Out.ar(bus:out, channelsArray:env*Splay.ar(snd));
	}).add;

	SynthDef(\flute, {
		| out = 0, freq = 440, amp = 1.0, a = 0.1, r = 0.1|
		//var fmod = 1; // clean
		//var fmod = LFCub.kr(freq:1/12).range(1, LFNoise2.kr(freq:12.0).range(1,1.1)); // tone deaf flute
		var fmod = LFCub.kr(freq:1/12).range(1, LFNoise2.kr(freq:12.0).range(1,1.02)); // flute-like sound
		var env = EnvGen.ar(Env.perc(a, r), levelScale:0.5, doneAction:2);
		var snd = SinOsc.ar(freq * fmod)!2;
		Out.ar(bus:out, channelsArray:(env*(amp*snd).tanh));
	}).add;

	s.sync;

	p = Pbind(
		\instrument, \pad,
		\freq, Pseq([
			Pseq([
				"c2 g3 eb4 g4",
			].collect({|el| parser.asMidi(el).midicps}), 1),
			Pseq([
				"g2 g3 d4 f4 g4",
				"c3 g3 eb4 g4 c5",
				"f2 f4 ab4 c5 eb5",
				"eb2 c4 eb4 g4",
				"g2 d4 f4 g4 b4 d5",
				"ab2 c4 eb4 ab4",
				"f2 c4 f4 g4 ab4 f5",
				"c2 g3 eb4 g4 eb5",
		].collect({|el| parser.asMidi(el).midicps}), inf)], 1),
		\dur, Pseq([5],inf),
		\s, Pkey(\dur),
		\a, 0.4
	);

	q = Pbind(
		\instrument, \flute,
		\freq, Pxrand(parser.asMidi("c5 eb5 g5 bb5 c6").midicps ++ [Rest(), Rest()], inf),
		\dur, Pbrown(lo:0.1,hi:1.0, step:0.125, length:inf),
		\a, Pkey(\dur)*0.8,
		\amp, Pseq([
			Pseq((((1..16)/16)*0.5), 1),
			Pbrown(lo:0.3,hi:0.6,step:0.1,length:inf)], inf
	));

	e = Ptpar([0.0, p, 8*5.0, q]).play;

});

)
raw 2192 chars (focus & ctrl+a+c to copy)
reception
comments