-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathredFrik-10.scd
80 lines (68 loc) · 2.66 KB
/
redFrik-10.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
/* 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-10.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);
)
//--tweet0086 atmospheric windy and ringing, whistle
//play{a=LFNoise2.kr(1/(9..17));Splay.ar(Ringz.ar(BPF.ar(Dust2.ar(a.abs*1e4),a.exprange(99,1e4),1.1-a),(9..1)*99,a+1.1,a)/5)}// #SuperCollider
(
Ndef(\y).fadeTime = 5;
Ndef(\y, {a=LFNoise2.kr(1/(9..17));Splay.ar(Ringz.ar(BPF.ar(Dust2.ar(a.abs*1e4),a.exprange(99,1e4),1.1-a),(9..1)*99,a+1.1,a)/5)});
)
//--tweet0084 play with 83
//play{a=Saw;Splay.ar(Formant.ar(a.ar((5,7..15)*19)*77+199,a.ar((1,3..13)*29)*199+299,a.ar((3,5..11)*a.ar(3,2,3))*299+399))/3}//#SuperCollider
(
Ndef(\x).fadeTime = 5;
Ndef(\x, {a=Saw;Splay.ar(Formant.ar(a.ar((5,7..15)*19)*77+199,a.ar((1,3..13)*29)*199+299,a.ar((3,5..11)*a.ar(3,2,3))*299+399))/3} );
)
//--tweet0075 uboot on titan.
//play{a=SinOsc;b=(1..16)*8;a.ar(a.ar(b).sum+[2,3]+a.ar(1/8)*99*a.ar(b/(a.ar(1/6)*2+2.05),0,4+a.ar(1/8)).reduce('bitOr'))*0.5}//#SuperCollider
(
Ndef(\y).fadeTime = 5;
Ndef(\y,{a=SinOsc;b=(1..16)*8;a.ar(a.ar(b).sum+[2,3]+a.ar(1/8)*99*a.ar(b/(a.ar(1/6)*2+2.05),0,4+a.ar(1/8)).reduce('bitOr'))*0.5} );
Ndef(\y).play;
)
//--tweet0074 laser war coming and receeding
//play{a=Pulse;BLowPass4.ar(a.ar(a.ar(2,0.2,a.ar(3,0.3)*500,[600,606]*a.ar(5))).sin,LFPar.ar(0.07)*4e3+5e3,LFPar.ar(0.1)+1.3)}//#SuperCollider
(
Ndef(\x).fadeTime = 5;
Ndef(\x,{a=Pulse;BLowPass4.ar(a.ar(a.ar(2,0.2,a.ar(3,0.3)*500,[600,606]*a.ar(5))).sin,LFPar.ar(0.07)*4e3+5e3,LFPar.ar(0.1)+1.3)});
Ndef(\x).play;
)