-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredFrik-1.scd
219 lines (198 loc) · 5.89 KB
/
redFrik-1.scd
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
/* from Fredrik Olofsson https://sccode.org/1-4Qy
* This is the first set of sc tweets converted to Ndefs to play them
* The intent is to stick to triptychs
* alternating between two Ndefs swapping voices.
*/
Ndef.clear;
(
//t.stop; //t.start; t.pause; t.resume;
Ndef.clear;
a.stop;
b.stop;
c.stop;
s.free;
t.free;
u.free;
v.free;
w.free;
)
(
s.boot; // start the server
MIDIIn.connectAll;
r = Recorder(s);
//setup
Ndef.clear;
m = NdefGui.new;
n = NdefGui.new;
m.object_(Ndef(\x));
n.object_(Ndef(\y));
// volume control via midi
i = MIDIFunc.cc( {arg ...args; Ndef(\y).vol_(args[0]/127.0)}, 0); // match cc 0
j = MIDIFunc.cc( {arg ...args; Ndef(\x).vol_(args[0]/127.0)}, 1); // match cc 1
// record via midi
s = MIDIFunc.cc({arg ...args;
if (args[0] > 0,
{ r.record(path:"~/Audio/supercollider/olofsson-triptychs/red-1.aiff"); },
{ r.stopRecording } )} , 41); // match cc 41 is record onkontrol2
// pause resume via midi
t = MIDIFunc.cc({arg ...args; if (args[0] > 0, { Ndef(\y).resume}, {Ndef(\y).pause })} , 48); // match cc 48
u = MIDIFunc.cc({arg ...args; if (args[0] > 0, { Ndef(\x).resume}, {Ndef(\x).pause })} , 49);
v = MIDIFunc.cc({arg ...args; if (args[0] > 0, { Ndef(\y).play}, {Ndef(\y).stop })} , 64);
w = MIDIFunc.cc({arg ...args; if (args[0] > 0, { Ndef(\x).play}, {Ndef(\x).stop })} , 65);
)
// IN PROG
//--tweet0023 nice drip dropping and bloops
//play{Splay.ar({|i|f=i+5*99;RHPF.ar(Ringz.ar(Ball.ar(Saw.ar(i+1)>0,SinOsc.kr(0.1,0,1/5,0.3),0.05,0.02)/99,f,0.05),f,0.1)}!5)}//#SuperCollider
(
Ndef(\x).fadeTime = 5;
Ndef(\x, {Splay.ar({|i|f=i+5*99;RHPF.ar(Ringz.ar(Ball.ar(Saw.ar(i+1)>0,SinOsc.kr(0.1,0,1/5,0.3),0.05,0.02)/99,f,0.05),f,0.1)}!5)} );
)
/*(
Ndef(\x).fadeTime = 5;
Ndef(\x, { |i=1 |
//var e = Env.adsr(fadeTime, 0.01, 0.4, fadeTime).ar(2, gate);
y={ Pan2.ar( SinOsc.ar(i+1, SinOsc.ar( (i%9).div(3)*100+(i%9)+500),0.03) * 4 ,1.0.rand2)} } );
Ndef(\y, { |i=1 |
z={ Pan2.ar(BPF.ar(Impulse.ar(18.linrand+0.5),9999.linrand,0.3.linrand,5)*3.0,1.0.rand2)} } );
)*/
(
a.stop;
Ndef(\x).fadeTime = 15;
a = Task({
3.do({ arg i;
Ndef(\x).map(\i, i);
Ndef(\x, { { Pan2.ar( SinOsc.ar(i+1, SinOsc.ar( (i%9).div(3)*100+(i%9)+500),0.03) * 4 ,1.0.rand2) } });
[10,15,5].choose.wait;
Ndef(\x).fadeTime = [10,15,5].choose;
});
});
a.start;
Ndef(\x).play;
)
//--tweet0002 tick drip impulses.
//r{99.do{x={Pan2.ar(BPF.ar(Impulse.ar(18.linrand+0.5),9999.linrand,0.3.linrand,5),1.0.rand2)}.play;3.wait;x.release(9)}}.play//#SuperCollider
(
b.stop;
Ndef(\y).fadeTime = 15;
b = Task({
3.do({ arg i;
Ndef(\y).map(\i, i);
Ndef(\y, { x={ Pan2.ar(BPF.ar(Impulse.ar(18.linrand+0.5),9999.linrand,0.3.linrand,5)*3.0,1.0.rand2)}} );
3.wait;
x.release(9);
});
});
b.start;
Ndef(\y).play;
)
//--tweet0003 metalic whips and blips
//r{loop{x=play{t=SinOsc.ar(999.rand).abs;Formlet.ar(TDuty.ar(t,0,t),4e3.linrand,t,1-t)!2};wait(9.rand+1);x.release(39)}}.play//#SuperCollider
(
Ndef(\x).fadeTime = 15;
a.stop;
a = Task({
19.do({ arg i;
Ndef(\x).map(\i, i);
Ndef(\x, x = { t=SinOsc.ar(999.rand).abs;Formlet.ar(TDuty.ar(t,0,t),4e3.linrand,t,1-t) ! 2} );
wait(9.rand+1);
Ndef(\x).fadeTime = 9.rand+1;
//Ndef(\z).fadeTime = [5,15,30].choose;
});
});
a.start;
Ndef(\x).play;
)
//--tweet0005 light ringing soundscape
//r{loop{z=60.rand+1;x={y=LFTri.ar(z).abs/z;RLPF.ar(TDuty.ar(y,0,y),z*99+y,0.01,6+y)!2}.play(s,0,z);wait(z/3);x.release}}.play//#SuperCollider
(
b.stop;
Ndef(\y).fadeTime = 15;
b = Task({
20.do({ arg i;
Ndef(\y).map(\s, i);
Ndef(\y, { z=60.rand+1;x={y=LFTri.ar(z).abs/z;RLPF.ar(TDuty.ar(y,0,y),z*99+y,0.01,6+y)!2}} );
Ndef(\y).fadeTime = 60.rand+1/3;
});
});
b.start;
Ndef(\y).play;
)
//--tweet0006 Blows up in original with reverb. works well with 0005
//r{loop{x={ MoogFF.ar(ClipNoise.ar*0.4,LFPar.kr({0.3.rand}!2,0,600,990))}.play(s,0,19);1.wait;x.release}}.play//#SuperCollider
(
a.stop;
Ndef(\x).fadeTime = 15;
a = Task({
20.do({ arg i;
Ndef(\x).map(\s, i);
Ndef(\x, { MoogFF.ar(ClipNoise.ar*0.4,LFPar.kr({0.3.rand}!2,0,600,990))} );
1.wait;
});
});
a.start;
Ndef(\x).play;
)
// THESE ALSO in 7
//--tweet0004 whirring soundscape 4 & 5
//r{loop{ z=20.rand+6;x={y=LFTri.ar(z).abs/9/z;RLPF.ar(TDuty.ar(y,0,y),z*600,0.06,9)!2}.play(s,0,z);wait(26-z);x.release}}.play//#SuperCollider
// this one needs another def to start.
(
Ndef(\y).fadeTime = 15;
b.stop;
b = Task({
20.do({ arg i;
Ndef(\y).map(\s, i);
Ndef(\y, { z=20.rand+6;x={ y=LFTri.ar(z).abs/9/z;RLPF.ar(TDuty.ar(y,0,y),z*600,0.06,9)!2}} );
Ndef(\y).fadeTime = 26-20.rand+6;
});
});
b.start;
Ndef(\y).play;
)
b.stop;
b.start;
//--tweet0007 nice room plucked instrument with strums and nice growing druming.
//r{loop{x={BPF.ar(Pluck.ar(Crackle.ar([1.9,1.8]),Impulse.ar(5.rand+1),0.05,0.05.linrand),1200.rand)}.play(s,0,9);wait(9);x.release(69)}}.play
(
Ndef(\x).fadeTime = 15;
a.stop;
a = Task({
20.do({ arg i;
Ndef(\x).map(\s, i);
Ndef(\x, { BPF.ar(Pluck.ar( Crackle.ar([1.9,1.8]),Impulse.ar(5.rand+1),0.05,0.05.linrand),1200.rand)*5} );
Ndef(\x).fadeTime = (9);
9.wait;
});
});
a.start;
Ndef(\x).play;
)
//--tweet0050 clonky percussion exploration. play with 51
//play{a=Saw;b=(2..12);c=0.015;GVerb.ar(Splay.ar(Klank.ar(`[b*50+b,c,c],Hasher.ar(a.ar(b/4pi,a.ar(c)*b+b).ceil)))/9,5.rand+1)}//#SuperCollider
(
Ndef(\y).fadeTime = 15;
b.stop;
b= Task({
20.do({ arg i;
Ndef(\y, {
a=Saw;b=(2..12);c=0.015;GVerb.ar(Splay.ar(Klank.ar(`[b*50+b,c,c],Hasher.ar(a.ar(b/4pi,a.ar(c)*b+b).ceil)))/9,5.rand+1) });
});
});
b.start;
Ndef(\y).play;
)
//--tweet0051 mix with 50 above
//play{a=Saw;GVerb.ar(Splay.ar(BBandPass.ar(a.ar("sunday".ascii),a.ar(9/"slow".ascii)*400+500,a.ar(7/"coding".ascii)+1.1)/5))}//#SuperCollider
(
Ndef(\x).fadeTime = 15;
a.stop;
a = Task({
1.do({ arg i;
Ndef(\x, {
a=Saw; GVerb.ar(
Splay.ar(BBandPass.ar(a.ar("sunday".ascii),a.ar(9/"slow".ascii)*400+500,a.ar(7/"coding".ascii)+1.1)/5))});
});
});
a.start;
Ndef(\x).play;
)