«Final 115» by Margo Gentile

on 06 Dec'16 09:41 in
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
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
//samples

a= Buffer.read(s,"/Users/alg31/Desktop/project sounds/SwagX3.wav" );


t= Buffer.read(s, "/Users/alg31/Desktop/project sounds/Taylor Gang1.wav");

t.play;
a.play;
//SynthDefs

(

SynthDef("plucking", {arg amp = 0.1, freq = 440, decay = 5, dampen = 0.1;

var env, snd;
env = Env.linen(0, decay, 0).kr(doneAction: 2);
snd = Pluck.ar(
        in: WhiteNoise.ar(amp),
        trig: Impulse.kr(0),
        delaytime: freq.reciprocal,
        decaytime: decay,
        coef: dampen);
    Out.ar(0, [snd, snd]);
}).add;


SynthDef("granny1", {arg rate = 1, amp = 1, buffer, startPos = 0, attack = 0.02, release = 0.5, panning = 0;
    var snd, env;
    env = Env.perc(attackTime: attack, releaseTime: release, level: amp).kr(doneAction: 2);
    snd = PlayBuf.ar(
        numChannels: 2,
        bufnum: buffer,
        rate: rate,
        startPos: startPos.linlin(0, 1, 0, BufFrames.kr(buffer))
    );
    snd = snd * env;
	snd = Pan2.ar(snd, panning);
    Out.ar(0, snd);
}).add;


SynthDef("hihat", {arg out = 0, amp = 0.5, att = 0.01, rel = 0.2, ffreq = 6000, pan = 0;
	var env, snd;
	env = Env.perc(att, rel, amp).kr(doneAction: 2);
	snd = WhiteNoise.ar;
	snd = HPF.ar(in: snd, freq: ffreq, mul: env);
	Out.ar(out, Pan2.ar(snd, pan));
}).add;

SynthDef("am3", {arg freq = 440, modfreq = 2, amp = 0.2, att = 0.01, sus = 0.2, rel = 3, gate = 1, pos = 0;
    var carrier, modulator, env;
    env = Env.asr(
        attackTime: att,
		sustainLevel: sus,
        releaseTime: rel
	).kr(doneAction: 2, gate: gate, mul: amp);
    modulator = SinOsc.ar(modfreq).range(0, 1);
	freq = freq * LFNoise2.kr([2, 1/2, 1/3, 1/4, 1]).range(0.98, 1.02);
    carrier = Pulse.ar(freq: freq, mul: env * modulator);
	carrier = Mix.ar(carrier);
	carrier = LPF.ar(carrier, Line.kr(10000, 1000, att));
	Out.ar(0, Pan2.ar(carrier, pos));
}).add;

SynthDef("fm2", {arg freq = 440, modindex = 10, amp = 0.1, pos = 0, gate = 1, att = 0.01, rel = 0.3;
	var carrier, modulator, freqdev, env, modfreq;
	modindex = Line.kr(modindex, 1, att);
	modfreq = freq / 2;
	freqdev = modfreq * modindex;
	modulator = SinOsc.ar(freq: modfreq, mul: freqdev);
	carrier = SinOsc.ar(freq: freq + modulator);
	env = Env.asr(
		attackTime: att,
		sustainLevel: amp,
		releaseTime: rel
	).kr(doneAction: 2, gate: gate);
	carrier = Pan2.ar(in: carrier, pos: pos, level: env);
	Out.ar(0, carrier * 0.5);
}).add;

SynthDef("kick", {arg out = 0, amp = 0.3, sinfreq = 60, glissf = 0.9, att = 0.01, rel = 0.45, pan = 0;
	var env, snd, ramp;
	env = Env.perc(att, rel, amp).kr(doneAction: 2);
	ramp = XLine.kr(
		start: sinfreq,
		end: sinfreq * glissf,
		dur: rel
	);
	snd = SinOsc.ar(freq: ramp, mul: env);
	snd = Pan2.ar(snd, pan);
	Out.ar(out, snd);
}).add;

SynthDef("snare", {arg out = 0, amp = 0.1, sinfreq = 180, att = 0.01, rel = 0.2, ffreq = 2000, pan = 0;
	var env, snd1, snd2, sum;
	env = Env.perc(att, rel, amp).kr(doneAction: 2);
	snd1 = HPF.ar(
		in: WhiteNoise.ar,
		freq: ffreq,
		mul: env
	);
	snd2 = SinOsc.ar(freq: sinfreq, mul: env);
	sum = snd1 + snd2;
	Out.ar(out, Pan2.ar(sum, pan));
}).add;
)
)




//Pbinds

(
~intropluck = Pbind(
    \instrument, "plucking",
	\degree, Pseq([15, 8, 8, 15, 8, 8, 16, 12, 16, 12, 12, 16, 12, 12, 15, \rest], inf),
    \mtranspose, 0,
    \amp, Pwhite(0.2, 0.3),
    \decay,  3,
	\dampen, 0.15,
	\dur,  Pseq([Pn(0.5, 15), Rest(0.5)], inf),
);


~swag = Pbind(
    \instrument, "granny1",
	\rate, Pseq([0.9], 1),
    \amp, 1,
	\startPos, 0.4,
    \attack, 1,
    \release, 0.25,
	\buffer, a,
	\dur, 1,
);

~swagfast = Pbind(
    \instrument, "granny1",
	\rate, 1.6,
    \amp, 1,
    \startPos, 0.4,
    \attack, 0.2,
    \release, 1,
	\buffer, a,
	\dur, Pseq([1/2], 1),
);

~buffer = Pbind(
    \instrument, "granny1",
	\rate, -0.4,
	\amp, Pseq([0.3, 0.3, 0.3, 0.3], 1),
    \startPos, 0.5,
    \attack, 0.9,
    \release, 0.3,
	\buffer, t,
	\dur, Pseq([2], 1),
);

~hihat1 = Pbind(
	\instrument, "hihat",
	\dur,  Pseq([1/8, Rest(1/8)], inf),
	\att, 0.05,
	\rel, 0.1,
	\ffreq, Pseq([9000, \rest, 9000, \rest, 9000, \rest, 9000, \rest, 1000, \rest, 9000, \rest, 9000, \rest, 9000, \rest], inf),
	\pan, 0,
	\amp, 0.2,
);

~hihat2 = Pbind(
	\instrument, "hihat",
	\dur, Pseq([1/2, Rest(1/2), Pn(1/4,2),  Rest(1/2), Pn(1/4, 4), Rest(1)], inf),
	\att, 0.05,
	\rel, 0.1,
	\ffreq,  1000,
	\pan, 0,
	\amp, 0.2,
);

~hihat3 = Pbind(
	\instrument, "hihat",
	\dur, Pseq([1/2, Rest(1/2), 1/2,  Rest(1/2)], inf),
	\att, 0.05,
	\rel, 0.1,
	\ffreq,  5000,
	\pan, 0,
	\amp, 0.2,
);


~bass1 = Pbind(
    \instrument, "fm2",
	\dur, 1,
	\note, Pseq([[0, 0.5, 1], 1, [0, 0.2, 0.4], -2], inf),
	\ctranspose, -18,
	\modindex,  1,
	\amp, Pseq([0.3, 0.35, 0.4, 0.45, 0.5, 0.45, 0.4, 0.3, 0.2], inf),
	\att, 0.01,
	\rel, 0.2,
	\pos, 0
);

~bass3 = Pbind(
	\instrument, "kick",
	\dur, Pseq([1, 1, 1, 1, 1/4, 1/4, 1/4, 1/4, 1/4], inf),
	\att, 0.01,
	\rel, 0.22,
	\sinfreq, Pseq([50, 50, 50 , 50, 70, 70, 70, 70, 50],64),
	\glissf, 0.9,
	\amp, 1,
);

~bass11 = Pbind(
    \instrument, "fm2",
	\dur, Pseq([1, 1/4, 1/4, 1/4, 1/4, 1, 1/2, 1/2], inf),
	\note, Pseq([[0, 0.5, 1], 1, 1, 1, 1,  [0, 0.2, 0.4], -2, -2], inf),
	\ctranspose, -18,
	\modindex,  1,
	\amp, Pseq([0.3, 0.35, 0.4, 0.45, 0.5, 0.45, 0.4, 0.3, 0.2], inf),
	\att, 0.01,
	\rel, 0.2,
	\pos, 0
);

~snare = Pbind(
	\instrument, "snare",
	\dur, Pseq([1/4, Rest(1/4)], 4),
	\att, 0.01,
	\rel, 0.1,
	\sinfreq, 180,
	\ffreq, 2000,
	\amp, 0.25

);

~bass1slow = Pbind(          //dur*1.5
    \instrument, "fm2",
	\dur, 1.5,
	\note, Pseq([[0, 0.5, 1], 1, [0, 0.2, 0.4], -2], 2),
	\ctranspose, -18,
	\modindex,  1,
	\amp, Pseq([0.3, 0.35, 0.4, 0.45, 0.5, 0.45, 0.4, 0.3, 0.2], inf),
	\att, 0.01,
	\rel, 0.2,
	\pos, 0
);

~outropluck = Pbind(          //dur*1.5
    \instrument, "plucking",
	\degree, Pseq([15, 8, 8, 15, 8, 8, 16, 12, 16, 12, 12, 16, 12, 12, 15, 15, 15, \rest], 1),
    \mtranspose, 0,
    \amp, Pwhite(0.2, 0.3),
    \decay,  3,
	\dampen, 0.15,
	\dur,  Pseq([Pn(0.75, 15), Rest(0.75)], inf),
);
)
)



//Pspawner


(
Pspawner({ arg maestro;

	~player1=maestro.par(~intropluck);               //intro pluck
	8.wait;
	~player6=maestro.par(~swagfast);                //swag
	8.wait;                                                           //intro pluck
	~player6=maestro.par(~swagfast);                //swag
	maestro.suspend(~player1);
	1.wait;
	~player9=maestro.par(~buffer);                //tgang buffer
	0.5.wait;
	~player6=maestro.par(~swagfast);                 //swag
	0.5.wait;
	~player3=maestro.par(~hihat1);                    //hihat & DIRTYBASS start together
	~player4=maestro.par(~bass1);
	4.wait;
	~player9=maestro.par(~swag);                      //slow swag
	8.wait;                                                          //continue hihat & bass for 8..
  ~player1=maestro.par(~intropluck);                  //resume pluck!!
	16.wait;
	maestro.suspend(~player1);           //suspend pluck
	maestro.suspend(~player3);          //suspend OG hihat
	maestro.suspend(~player4);                                       //suspend DIRTYBASS
	1.wait;
	~player11=maestro.par(~snare);    //add a little count up!
	1.wait;
	~player4=maestro.par(~bass1);        //resume DIRTYBASS
	~player5=maestro.par(~hihat2);               //start new hihat
	16.wait;
	~player7=maestro.par(~bass3);               //add new bass to DIRTYBASS
	maestro.suspend(~player5);                    //end new hihat, start LESS hihat
	~player8=maestro.par(~hihat3);
	16.wait;
	maestro.suspend(~player7);                    //stop new bass
	4.wait;
	maestro.suspend(~player8);                    //end LESS hihat
	~player1=maestro.par(~intropluck);        //intropluck comes back.
	16.wait;
	maestro.suspend(~player4);                   //end dirtybass1
	~player10=maestro.par(~bass11);           //start dirtybass2
	~player3=maestro.par(~hihat1);             //resume OG hihat
	16.wait;
	maestro.suspend(~player3);                   //suspend OG hihat
	maestro.suspend(~player10);
	maestro.suspend(~player1);
	1.wait;
	~player9=maestro.par(~buffer);                //tgang buffer
	1.wait;
	~player12=maestro.par(~bass1slow);           //end on SLOWER dirtybass & slower pluck
	~player13=maestro.par(~outropluck);
	13.wait;
	maestro.suspendAll;

}).play;
)
raw 8503 chars (focus & ctrl+a+c to copy)
reception
comments