-
Notifications
You must be signed in to change notification settings - Fork 0
/
pyth.scd
255 lines (239 loc) · 7.57 KB
/
pyth.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
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
TempoClock.default.tempo_(60/15);
s.options.numOutputBusChannels=8
TempoClock.default.tempo_(120/20);
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 = 2097152
{Out.ar(0,SoundIn.ar(0)!2)}.play
(
(
SynthDef.new(\id, {
arg dur=1,pr1=1,pr2=1,pr3=1,pr4=1,pr5=1,pr6=1,pr7=1,pr8=1,par=1,n1=1,n2=1,n3=1,n4=1,n5=1,n6=1,n7=1,n8=1;
var sig1,sig2,sig3,sig4,sig5,sig6,sig7,sum;
var env1,env2,env3,env4,env5,env6,env7,env8;
var m=0;
par.do{
m=m+1;
env1=EnvGen.ar(Env.perc(4,6,pr1*(2/(n1*6)),[-4,-4]),doneAction:2);
env2=EnvGen.ar(Env.perc(4,6,pr2*(2/(n2*6.75*m)),[-4,-4]),doneAction:2);
env3=EnvGen.ar(Env.perc(4,6,pr3*(2/(n3*6.75*(9/8)*m)),[-4,-4]),doneAction:2);
env4=EnvGen.ar(Env.perc(4,6,pr4*(2/(n4*8*m)),[-4,-4]),doneAction:2);
env5=EnvGen.ar(Env.perc(4,6,pr5*(2/(n5*9*m)),[-4,-4]),doneAction:2);
env6=EnvGen.ar(Env.perc(4,6,pr6*(2/(n6*10.125*m)),[-4,-4]),doneAction:2);
env7=EnvGen.ar(Env.perc(4,6,pr7*(2/(n7*10.125*(9/8)*m)),[-4,-4]),doneAction:2);
env8=EnvGen.ar(Env.perc(4,6,pr8*(2/(n8*12*m)),[-4,-4]),doneAction:2);
sum=PanAz.ar(2,FSinOsc.ar(n1*6*10,mul:env1),LFSaw.ar(1/6),env1,2);
sig1=PanAz.ar(2,FSinOsc.ar(n2*m*6.75*10,mul:env2),LFSaw.ar(1/(6.75)),env2,2);
sig2=PanAz.ar(2,FSinOsc.ar(n3*m*6.75*(9/8)*10,mul:env3),LFSaw.ar(1/(6.75*(9/8))),env3,2);
sig3=PanAz.ar(2,FSinOsc.ar(n4*m*8*10,mul:env4),LFSaw.ar(1/(8)),env4,2);
sig4=PanAz.ar(2,FSinOsc.ar(n5*m*9*10,mul:env5),LFSaw.ar(1/(9)),env5,2);
sig5=PanAz.ar(2,FSinOsc.ar(n6*m*10.125*10,mul:env6),LFSaw.ar(1/(10.125)),env6,2);
sig6=PanAz.ar(2,FSinOsc.ar(n7*m*10.125*(9/8)*10,mul:env7),LFSaw.ar(1/(10.125*(9/8))),env7,2);
sig7=PanAz.ar(2,FSinOsc.ar(n8*m*12*10,mul:env8),LFSaw.ar(1/(12)),env8,2);
sum=sum+sig1+sig2+sig3+sig4+sig5+sig6+sig7;
};
Out.ar(0,sum);
}).add;
);
(
SynthDef.new(\idb, {
arg dur=1,pr1=1,pr2=1,pr3=1,pr4=1,pr5=1,pr6=1,pr7=1,pr8=1,par=1,n1=1,n2=1,n3=1,n4=1,n5=1,n6=1,n7=1,n8=1;
var sig1,sig2,sig3,sig4,sig5,sig6,sig7,sum;
var env1,env2,env3,env4,env5,env6,env7,env8;
var m=0;
par.do{
m=m+1;
env1=EnvGen.ar(Env.perc(0.05,6,pr1*(2/(n1*6)),[-4,-4]),doneAction:2);
env2=EnvGen.ar(Env.perc(0.05,6,pr2*(2/(n2*6.75*m)),[-4,-4]),doneAction:2);
env3=EnvGen.ar(Env.perc(0.05,6,pr3*(2/(n3*6.75*(9/8)*m)),[-4,-4]),doneAction:2);
env4=EnvGen.ar(Env.perc(0.05,6,pr4*(2/(n4*8*m)),[-4,-4]),doneAction:2);
env5=EnvGen.ar(Env.perc(0.05,6,pr5*(2/(n5*9*m)),[-4,-4]),doneAction:2);
env6=EnvGen.ar(Env.perc(0.05,6,pr6*(2/(n6*10.125*m)),[-4,-4]),doneAction:2);
env7=EnvGen.ar(Env.perc(0.05,6,pr7*(2/(n7*10.125*(9/8)*m)),[-4,-4]),doneAction:2);
env8=EnvGen.ar(Env.perc(0.05,6,pr8*(2/(n8*12*m)),[-4,-4]),doneAction:2);
sum=PanAz.ar(2,FSinOsc.ar(n1*6*20,mul:env1),LFSaw.ar(1/6),env1,2);
sig1=PanAz.ar(2,FSinOsc.ar(n2*m*6.75*20,mul:env2),LFSaw.ar(1/(6.75)),env2,2);
sig2=PanAz.ar(2,FSinOsc.ar(n3*m*6.75*(9/8)*20,mul:env3),LFSaw.ar(1/(6.75*(9/8))),env3,2);
sig3=PanAz.ar(2,FSinOsc.ar(n4*m*8*20,mul:env4),LFSaw.ar(1/(8)),env4,2);
sig4=PanAz.ar(2,FSinOsc.ar(n5*m*9*20,mul:env5),LFSaw.ar(1/(9)),env5,2);
sig5=PanAz.ar(2,FSinOsc.ar(n6*m*10.125*20,mul:env6),LFSaw.ar(1/(10.125)),env6,2);
sig6=PanAz.ar(2,FSinOsc.ar(n7*m*10.125*(9/8)*20,mul:env7),LFSaw.ar(1/(10.125*(9/8))),env7,2);
sig7=PanAz.ar(2,FSinOsc.ar(n8*m*12*20,mul:env8),LFSaw.ar(1/(12)),env8,2);
sum=sum+sig1+sig2+sig3+sig4+sig5+sig6+sig7;
};
Out.ar(0,sum);
}).add;
)
)
(
(
( Pdef(\1, Pbind(\instrument, \id,
\dur,Pbrown(1,8,2,inf),
\par,Pbrown(1,4,1,inf),
\pr1,Pexprand(0.1,1,inf),
\pr2,Pexprand(0.1,1,inf),
\pr3,Pexprand(0.1,1,inf),
\pr4,Pexprand(0.1,1,inf),
\pr5,Pexprand(0.1,1,inf),
\pr6,Pexprand(0.1,1,inf),
\pr7,Pexprand(0.1,1,inf),
\pr8,Pexprand(0.1,1,inf),
\n1,Pbrown(1,8,1,inf),
\n2,Pbrown(1,8,1,inf),
\n3,Pbrown(1,8,1,inf),
\n4,Pbrown(1,8,1,inf),
\n5,Pbrown(1,8,1,inf),
\n6,Pbrown(1,8,1,inf),
\n7,Pbrown(1,8,1,inf),
\n8,Pbrown(1,8,1,inf);
)).play(quant:1));
( Pdef(\2, Pbind(\instrument, \id,
\dur,Pbrown(1,8,2,inf),
\par,Pbrown(1,4,1,inf),
\pr1,Pexprand(0.1,1,inf),
\pr2,Pexprand(0.1,1,inf),
\pr3,Pexprand(0.1,1,inf),
\pr4,Pexprand(0.1,1,inf),
\pr5,Pexprand(0.1,1,inf),
\pr6,Pexprand(0.1,1,inf),
\pr7,Pexprand(0.1,1,inf),
\pr8,Pexprand(0.1,1,inf),
\n1,Pbrown(1,8,1,inf),
\n2,Pbrown(1,8,1,inf),
\n3,Pbrown(1,8,1,inf),
\n4,Pbrown(1,8,1,inf),
\n5,Pbrown(1,8,1,inf),
\n6,Pbrown(1,8,1,inf),
\n7,Pbrown(1,8,1,inf),
\n8,Pbrown(1,8,1,inf);
)).play(quant:1));
( Pdef(\3, Pbind(\instrument, \id,
\dur,Pbrown(1,8,2,inf),
\par,Pbrown(1,4,1,inf),
\pr1,Pexprand(0.1,1,inf),
\pr2,Pexprand(0.1,1,inf),
\pr3,Pexprand(0.1,1,inf),
\pr4,Pexprand(0.1,1,inf),
\pr5,Pexprand(0.1,1,inf),
\pr6,Pexprand(0.1,1,inf),
\pr7,Pexprand(0.1,1,inf),
\pr8,Pexprand(0.1,1,inf),
\n1,Pbrown(1,8,1,inf),
\n2,Pbrown(1,8,1,inf),
\n3,Pbrown(1,8,1,inf),
\n4,Pbrown(1,8,1,inf),
\n5,Pbrown(1,8,1,inf),
\n6,Pbrown(1,8,1,inf),
\n7,Pbrown(1,8,1,inf),
\n8,Pbrown(1,8,1,inf);
)).play(quant:1));
( Pdef(\4, Pbind(\instrument, \id,
\dur,Pbrown(1,8,2,inf),
\par,Pbrown(1,4,1,inf),
\pr1,Pexprand(0.1,1,inf),
\pr2,Pexprand(0.1,1,inf),
\pr3,Pexprand(0.1,1,inf),
\pr4,Pexprand(0.1,1,inf),
\pr5,Pexprand(0.1,1,inf),
\pr6,Pexprand(0.1,1,inf),
\pr7,Pexprand(0.1,1,inf),
\pr8,Pexprand(0.1,1,inf),
\n1,Pbrown(1,8,1,inf),
\n2,Pbrown(1,8,1,inf),
\n3,Pbrown(1,8,1,inf),
\n4,Pbrown(1,8,1,inf),
\n5,Pbrown(1,8,1,inf),
\n6,Pbrown(1,8,1,inf),
\n7,Pbrown(1,8,1,inf),
\n8,Pbrown(1,8,1,inf);
)).play(quant:1));
);
(
( Pdef(\5, Pbind(\instrument, \idb,
\dur,Pbrown(1,8,2,inf),
\par,Pbrown(1,4,1,inf),
\pr1,Pexprand(0.1,1,inf),
\pr2,Pexprand(0.1,1,inf),
\pr3,Pexprand(0.1,1,inf),
\pr4,Pexprand(0.1,1,inf),
\pr5,Pexprand(0.1,1,inf),
\pr6,Pexprand(0.1,1,inf),
\pr7,Pexprand(0.1,1,inf),
\pr8,Pexprand(0.1,1,inf),
\n1,Pbrown(1,8,1,inf),
\n2,Pbrown(1,8,1,inf),
\n3,Pbrown(1,8,1,inf),
\n4,Pbrown(1,8,1,inf),
\n5,Pbrown(1,8,1,inf),
\n6,Pbrown(1,8,1,inf),
\n7,Pbrown(1,8,1,inf),
\n8,Pbrown(1,8,1,inf);
)).play(quant:1));
( Pdef(\6, Pbind(\instrument, \idb,
\dur,Pbrown(1,8,2,inf),
\par,Pbrown(1,4,1,inf),
\pr1,Pexprand(0.1,1,inf),
\pr2,Pexprand(0.1,1,inf),
\pr3,Pexprand(0.1,1,inf),
\pr4,Pexprand(0.1,1,inf),
\pr5,Pexprand(0.1,1,inf),
\pr6,Pexprand(0.1,1,inf),
\pr7,Pexprand(0.1,1,inf),
\pr8,Pexprand(0.1,1,inf),
\n1,Pbrown(1,8,1,inf),
\n2,Pbrown(1,8,1,inf),
\n3,Pbrown(1,8,1,inf),
\n4,Pbrown(1,8,1,inf),
\n5,Pbrown(1,8,1,inf),
\n6,Pbrown(1,8,1,inf),
\n7,Pbrown(1,8,1,inf),
\n8,Pbrown(1,8,1,inf);
)).play(quant:1));
( Pdef(\7, Pbind(\instrument, \idb,
\dur,Pbrown(1,8,2,inf),
\par,Pbrown(1,4,1,inf),
\pr1,Pexprand(0.1,1,inf),
\pr2,Pexprand(0.1,1,inf),
\pr3,Pexprand(0.1,1,inf),
\pr4,Pexprand(0.1,1,inf),
\pr5,Pexprand(0.1,1,inf),
\pr6,Pexprand(0.1,1,inf),
\pr7,Pexprand(0.1,1,inf),
\pr8,Pexprand(0.1,1,inf),
\n1,Pbrown(1,8,1,inf),
\n2,Pbrown(1,8,1,inf),
\n3,Pbrown(1,8,1,inf),
\n4,Pbrown(1,8,1,inf),
\n5,Pbrown(1,8,1,inf),
\n6,Pbrown(1,8,1,inf),
\n7,Pbrown(1,8,1,inf),
\n8,Pbrown(1,8,1,inf);
)).play(quant:1));
( Pdef(\8, Pbind(\instrument, \idb,
\dur,Pbrown(1,8,2,inf),
\par,Pbrown(1,4,1,inf),
\pr1,Pexprand(0.1,1,inf),
\pr2,Pexprand(0.1,1,inf),
\pr3,Pexprand(0.1,1,inf),
\pr4,Pexprand(0.1,1,inf),
\pr5,Pexprand(0.1,1,inf),
\pr6,Pexprand(0.1,1,inf),
\pr7,Pexprand(0.1,1,inf),
\pr8,Pexprand(0.1,1,inf),
\n1,Pbrown(1,8,1,inf),
\n2,Pbrown(1,8,1,inf),
\n3,Pbrown(1,8,1,inf),
\n4,Pbrown(1,8,1,inf),
\n5,Pbrown(1,8,1,inf),
\n6,Pbrown(1,8,1,inf),
\n7,Pbrown(1,8,1,inf),
\n8,Pbrown(1,8,1,inf);
)).play(quant:1));
)
)