-
Notifications
You must be signed in to change notification settings - Fork 0
/
SP X.scd
191 lines (159 loc) · 6.07 KB
/
SP X.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
TempoClock.default.tempo_(120/45);
s.options.numOutputBusChannels=8;
TempoClock.default.tempo_(120/12);
);
ServerOptions.inDevices.postln;
s.record(numChannels:2);
s.options.sampleRate =48000
s.options.device_("USB Sound Device");
s.options.memSize = 65536;
s.options.memSize
s.options.numInputBusChannels=0;
s.record(numChannels:6) ;
s.options.memSize = 524288//2097152
(
/////////////////////
(
SynthDef.new(\id, {
arg dur;
var b=1,x=1,bus=1; var y=1,theta,phi; var k,z,pos; var sig,env,s;
x=dur.cos; y=dur.sin;
k=Complex(x,y).abs; theta=Complex(x,y).angle;
z=(((k)+theta))/(k);
s= Complex(k,z).abs; phi= Complex(z,k).angle;
//env=EnvGen.ar(Env.perc(0.01,dur/dur,1/s,[-4,-4]),doneAction:2);
//sig=PitchShift.ar(SoundIn.ar(0),0.2,pitchRatio:s.linlin(0,4,0,4),mul:1/s);
sig=FSinOsc.ar(s*220,mul:1/s,iphase:phi*pi);
Out.ar(2,sig*0.2);
//Out.ar(0,PanAz.ar(2,LeakDC.ar(sig),SinOsc.ar(phi),width:2));
// Out.ar(8,PanAz.ar(4,LeakDC.ar(sig*env*3),theta.linlin(1,2,-1,1),width:2));
//Out.ar(0,PanAz.ar(4,InFeedback.ar(8)*env,phi.linlin(0.3,0.5,-1,1),width:2));
// Out.ar(4,PanAz.ar(4,InFeedback.ar(9)*env,phi.linlin(0.3,0.5,-1,1),width:2));
}).add;
)
(
(Synth.new(\id,[\dur,6]));
(Synth.new(\id,[\dur,8]));
(Synth.new(\id,[\dur,9]));
(Synth.new(\id,[\dur,12]));
(Synth.new(\id,[\dur,16]));
(Synth.new(\id,[\dur,18]));
(Synth.new(\id,[\dur,24]));
(Synth.new(\id,[\dur,32]));
(Synth.new(\id,[\dur,36]));
)
/////////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////on pattern
(
SynthDef.new(\id, {
arg dur,pow=0;
var x=1,y=1,t,phi; var k,z,pos; var sig,env,s;
var r,o,a;
dur=dur*(2**pow);
x=dur.cos; y=dur.sin;
k=Complex(x,y).abs; t=Complex(x,y).angle;
z=(k+t)/(k);
s= Complex(k,z).abs;phi= Complex(k,z).angle;
r=(s+phi)/s;
dur=dur.sin;
o=Complex(dur,r).angle;
a=Complex(dur,r).abs;
env=EnvGen.ar(Env.perc(0.01,8,1/s,[-4,-4]),doneAction:2);
/////////sig=PitchShift.ar(SoundIn.ar(0),0.1,pitchRatio:s,mul:env);
//sig=PitchShift.ar(InFeedback.ar(2),0.5,pitchRatio:s,mul:env);
sig=FSinOsc.ar(phi*220,mul:env,iphase:phi*pi);
//+ FSinOsc.ar(phi*110*8,mul:env*1/8,iphase:theta*pi)
//+ FSinOsc.ar(phi*110*9,mul:env*1/9,iphase:theta*pi)
//+ FSinOsc.ar(phi*110*12,mul:env*1/12,iphase:theta*pi) ;
////////////////sig=BLowPass.ar(VarSaw.ar(s*440,width:s,mul:env),1200);
//Out.ar(0,sig*env);
Out.ar(0,PanAz.ar(2,sig*env,LFSaw.ar(a),width:o));
}).add;
)
Tdef(\sa).play;
Tdef(\sa).stop;
(
Tdef(\sa,
{
1.do({( Pdef(\1, Pbind(\instrument, \id,
\dur,Pseq([6,8,9,12],inf),
\pow,Pbrown(1,30,1,inf),
//\pow,Pgauss(15,15,inf),
//\pow,Pcauchy(15,5,inf),
//\pow,Pwhite(1,30,inf);
)).play(quant:1)); (0).yield});
1.do({( Pdef(\2, Pbind(\instrument, \id,
\dur,Pseq([6,8,9,12],inf),
\pow,Pbrown(1,30,1,inf),
//\pow,Pgauss(15,15,inf),
//\pow,Pcauchy(15,5,inf),
//\pow,Pwhite(1,30,inf);
)).play(quant:1)); (0).yield});
1.do({( Pdef(\3, Pbind(\instrument, \id,
\dur,Pseq([6,8,9,12],inf),
\pow,Pbrown(1,30,1,inf),
//\pow,Pgauss(15,15,inf),
//\pow,Pcauchy(15,5,inf),
//\pow,Pwhite(1,30,inf);
)).play(quant:1)); (0).yield})
})
)
////////////////////////////////////////////////////////////////////////////////////////////////////////spat
///////////////////////////////////////////////////////////////////////////////////////////////
(
(
SynthDef.new(\a, {
arg dur,pow=0;var x=1,y=1,t,phi; var k,z,pos; var sig,env,s; var r,o,a;
dur=dur*(2**pow); x=dur.cos; y=dur.sin; k=Complex(x,y).abs; t=Complex(x,y).angle; z=(k+t)/(k);
s= Complex(k,z).abs;phi= Complex(k,z).angle; r=(s+phi)/s; dur=dur.sin;o=Complex(dur,r).angle;a=Complex(dur,r).abs;
env=EnvGen.ar(Env.perc(0.01,12,1/s,[-4,-4]),doneAction:2);
sig=FSinOsc.ar(phi*512,mul:env,iphase:phi*pi);Out.ar(0,PanAz.ar(2,sig*env,LFSaw.ar(o),width:a));
}).add;≥
);
(
SynthDef.new(\b, {
arg dur,pow=0;var x=1,y=1,t,phi; var k,z,pos; var sig,env,s; var r,o,a;
dur=dur*(2**pow); x=dur.cos; y=dur.sin; k=Complex(x,y).abs; t=Complex(x,y).angle; z=(k+t)/(k);
s= Complex(k,z).abs;phi= Complex(k,z).angle; r=(s+phi)/s; dur=dur.sin;o=Complex(dur,r).angle;a=Complex(dur,r).abs;
env=EnvGen.ar(Env.perc(0.01,12,1/s,[-4,-4]),doneAction:2);
sig=FSinOsc.ar(phi*512,mul:env,iphase:phi*pi); Out.ar(0,PanAz.ar(2,sig*env,LFSaw.ar(o),width:a));
}).add;
);
(
SynthDef.new(\c, {
arg dur,pow=0;var x=1,y=1,t,phi; var k,z,pos; var sig,env,s; var r,o,a;
dur=dur*(2**pow); x=dur.cos; y=dur.sin; k=Complex(x,y).abs; t=Complex(x,y).angle; z=(k+t)/(k);
s= Complex(k,z).abs;phi= Complex(k,z).angle; r=(s+phi)/s; dur=dur.sin;o=Complex(dur,r).angle;a=Complex(dur,r).abs;
env=EnvGen.ar(Env.perc(0.01,12,1/s,[-4,-4]),doneAction:2);
sig=FSinOsc.ar(phi*512,mul:env,iphase:phi*pi); Out.ar(0,PanAz.ar(2,sig*env,LFSaw.ar(o),width:a));
}).add;
);
(
SynthDef.new(\d, {
arg dur,pow=0;var x=1,y=1,t,phi; var k,z,pos; var sig,env,s; var r,o,a;
dur=dur*(2**pow); x=dur.cos; y=dur.sin; k=Complex(x,y).abs; t=Complex(x,y).angle; z=(k+t)/(k);
s= Complex(k,z).abs;phi= Complex(k,z).angle; r=(s+phi)/s; dur=dur.sin;o=Complex(dur,r).angle;a=Complex(dur,r).abs;
env=EnvGen.ar(Env.perc(0.01,12,1/s,[-4,-4]),doneAction:2);
sig=FSinOsc.ar(phi*512,mul:env,iphase:phi*pi); Out.ar(0,PanAz.ar(2,sig*env,LFSaw.ar(o),width:a));
}).add;
);
)
Tdef(\sa).play;
Tdef(\sa).stop;
(
Tdef(\sa,
{
1.do({( Pdef(\1, Pbind(\instrument, \a,\dur,Pseq([6,8,9,12],inf),\pow,Pbrown(1,30,1,inf),
//\pow,Pgauss(15,15,inf),//\pow,Pcauchy(15,5,inf),//\pow,Pwhite(1,30,inf);
)).play(quant:1)); (0).yield});
1.do({( Pdef(\2, Pbind(\instrument, \b, \dur,Pseq([6,8,9,12],inf),\pow,Pbrown(1,30,1,inf),
//\pow,Pgauss(15,15,inf), //\pow,Pcauchy(15,5,inf),//\pow,Pwhite(1,30,inf);
)).play(quant:1)); (0).yield});
1.do({( Pdef(\3, Pbind(\instrument, \c,\dur,Pseq([6,8,9,12],inf),\pow,Pbrown(1,30,1,inf),
//\pow,Pgauss(15,15,inf),//\pow,Pcauchy(15,5,inf),//\pow,Pwhite(1,30,inf);
)).play(quant:1)); (0).yield});
1.do({( Pdef(\4, Pbind(\instrument, \d,\dur,Pseq([6,8,9,12],inf),\pow,Pbrown(1,30,1,inf),
//\pow,Pgauss(15,15,inf),//\pow,Pcauchy(15,5,inf),//\pow,Pwhite(1,30,inf);
)).play(quant:1)); (0).yield})
})
)