«Introduction of Sweet Dreams» by prko

on 28 Oct'23 00:16 in sweet dreams

inspired from "2018 09 18 18 20 48 sweet dreams twitch" by studioTTTguTTT: "https://www.youtube.com/watch?v=vFqCyfdNbZM&lc=Ugz8PRnQHrWs-XOm45p4AaABAg".openOS

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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// inspired from "2018 09 18 18 20 48 sweet dreams twitch" by studioTTTguTTT: 
"https://www.youtube.com/watch?v=vFqCyfdNbZM&lc=Ugz8PRnQHrWs-XOm45p4AaABAg".openOS

(
SynthDef(\eurythmics1,
 {
  |pit 60 amp 0.9 gate 1|
  var lfo, env, sig, pos, rel;
  amp.poll(0.1);
  pos = pit.linexp(36, 60, 1, 3) - 2;
  rel = Select.kr( pos > 0, [0.01, 0.08]);
  lfo = SinOsc.kr(TRand.kr(3, 5, gate)).range(0.1, -0.1);
  env = Env.adsr(0.08, 0, 1, rel, curve: -3).kr(gate: gate);
  pit = pit + lfo;
  sig = SawDPW.ar([pit, pit + 0.05].midicps).sum * env * amp;
  sig = JPverb.ar(sig, 0.2, 0.5, 0.5);
  sig = Balance2.ar(sig[0], sig[1], pos);
  FreeSelf.kr(DetectSilence.ar(sig + Impulse.ar(0)).product);
  Out.ar(0, sig);
 }
).add
);

(
~time = 128/60;
t = TempoClock(~time);
Pbind(
 \instrument, \eurythmics1,
 \pit, Pseq([[36, 24],36, 60, 60, 51, 63, 48, 60, 44, 56, 56, 60, 43, 55, [46, 55], 58], 32),
 \dur, Pseq([1/~time], inf),
 \amp, Pseq([rrand(-6.0, -12).dbamp, rrand(-12.0, -21).dbamp], inf)
).play(t);
)

////////

(
SynthDef(\eurythmicsVar2,
 {
  |pit 60 amp 0.9 gate 1 delayTime 0.2|
  var lfo, osc, env, sig;
  lfo = SinOsc.kr(TRand.kr(3, 5, gate)).range(0.1, -0.1);
  env = Env.adsr(0.08, 0, 1, 0.1, curve: -2).kr(gate: gate);
  pit = pit + lfo;
  osc = SawDPW.ar([pit, pit + 0.05].midicps).sum * env * amp;
  sig = FreeVerb.ar(osc, 0.2, 0.1, 0.8);
  sig = DelayC.ar(sig, 1, [0, delayTime], 1);
  sig = LPF.ar(sig, SampleRate.ir / [3, 2]);
  FreeSelf.kr(DetectSilence.ar(sig + Impulse.ar(0)).product);
  Out.ar(0, sig);
 }
).add
);

(
~time = 128/60;
t = TempoClock(~time);

Pbind(
 \instrument, \eurythmicsVar2,
 \pit, Pseq([[36, 24],36, 60, 60, 51, 63, 48, 60, 44, 56, 56, 60, 43, 55, [46, 55], 58], 32),
 \dur, Pseq([1/~time], inf),
 \delayTime, Pseq([1/~time/2], inf),
 \amp, Pseq([rrand(-18, -24).dbamp, rrand(-24, -33).dbamp], inf)
).play(t);
)

////////// final

(
~time = 128/60;
t = TempoClock(~time);
~pit = Pseq([[36, 24],36, 60, 60, 51, 63, 48, 60, 44, 56, 56, 60, 43, 55, [46, 55], 58], 32);
~dur = Pseq([1/~time], inf);

Pbind(
 \instrument, \eurythmicsVar2,
 \pit, ~pit,
 \dur, ~dur,
 \delayTime, ~dur / 2,
 \amp, Pseq([rrand(-18, -24).dbamp, rrand(-24, -33).dbamp], inf)
).play(t);

Pbind(
 \instrument, \eurythmics1,
 \pit, ~pit,
 \dur, ~dur,
 \amp, Pseq([rrand(-6.0, -12).dbamp, rrand(-12.0, -21).dbamp], inf)
).play(t);
)
raw 2429 chars (focus & ctrl+a+c to copy)
reception
comments
56228375 user 09 Dec'23 11:25

this crashes the server for me unless I increase memory

( o = s.options; o.memSize = 16384; s.reboot; )

56228375 user 09 Dec'23 11:25

sounds great though :)