2022-01-29 23:43:31 +01:00
|
|
|
o = ServerOptions.new;
|
|
|
|
o.protocol_(\tcp);
|
|
|
|
|
|
|
|
s = Server.local.boot;
|
|
|
|
|
|
|
|
s = Server.remote(\localhost, NetAddr("127.0.0.1", 55556), o);
|
|
|
|
s.addr.connect;
|
|
|
|
s.startAliveThread( 0 );
|
|
|
|
|
|
|
|
s.doWhenBooted({ "remote tcp server started".postln; s.notify; s.initTree });
|
|
|
|
|
|
|
|
(
|
|
|
|
SynthDef('kickdrum', {
|
|
|
|
|
2022-01-30 23:34:32 +01:00
|
|
|
var osc, env, output;
|
2022-01-29 23:43:31 +01:00
|
|
|
|
2022-01-30 23:34:32 +01:00
|
|
|
osc = {Decay.ar(Impulse.ar(XLine.kr(1,50,20), 0.25), 0.2, PinkNoise.ar, 0)};
|
2022-01-29 23:43:31 +01:00
|
|
|
env = {Line.ar(1, 0, 1, doneAction: 2)};
|
|
|
|
|
|
|
|
output = osc * env;
|
|
|
|
|
|
|
|
Out.ar(0,
|
|
|
|
Pan2.ar(output, 0)
|
|
|
|
)
|
|
|
|
|
|
|
|
}).add;
|
|
|
|
)
|
|
|
|
|
|
|
|
(
|
|
|
|
SynthDef(\gabberkick, {
|
|
|
|
var snd, freq, high, lfo;
|
|
|
|
freq = \freq.kr(110) * (Env.perc(0.001, 0.08, curve: -1).ar * 48 * \bend.kr(1)).midiratio;
|
|
|
|
snd = Saw.ar(freq);
|
|
|
|
snd = (snd * 100).tanh + ((snd.sign - snd) * -8.dbamp);
|
|
|
|
high = HPF.ar(snd, 300);
|
|
|
|
lfo = SinOsc.ar(8, [0, 0.5pi]).range(0, 0.01);
|
|
|
|
high = high.dup(2) + (DelayC.ar(high, 0.01, lfo) * -2.dbamp);
|
|
|
|
snd = LPF.ar(snd, 100).dup(2) + high;
|
|
|
|
snd = RLPF.ar(snd, 7000, 2);
|
|
|
|
snd = BPeakEQ.ar(snd, \ffreq.kr(3000) * XLine.kr(1, 0.8, 0.3), 0.5, 15);
|
|
|
|
snd = snd * Env.asr(0.001, 1, 0.05).ar(2, \gate.kr(1));
|
|
|
|
Out.ar(\out.kr(0), snd * \amp.kr(0.1));
|
|
|
|
}).add;
|
|
|
|
|
|
|
|
SynthDef(\hoover, {
|
|
|
|
var snd, freq, bw, delay, decay;
|
|
|
|
freq = \freq.kr(880);
|
|
|
|
freq = freq * Env([-5, 6, 0], [0.1, 1.7], [\lin, -4]).kr.midiratio;
|
|
|
|
bw = 1.035;
|
|
|
|
snd = { DelayN.ar(Saw.ar(freq * ExpRand(bw, 1 / bw)) + Saw.ar(freq * 0.5 * ExpRand(bw, 1 / bw)), 0.01, Rand(0, 0.01)) }.dup
|
|
|
|
(20);
|
|
|
|
snd = (Splay.ar(snd) * 3).atan;
|
|
|
|
snd = snd * Env.asr(0.01, 1.0, 1.0).kr(0, \gate.kr(1));
|
|
|
|
snd = FreeVerb2.ar(snd[0], snd[1], 0.3, 0.9);
|
|
|
|
snd = snd * Env.asr(0, 1.0, 4, 6).kr(2, \gate.kr(1));
|
|
|
|
Out.ar(\out.kr(0), snd * \amp.kr(0.1));
|
|
|
|
}).add;
|
|
|
|
)
|
|
|
|
|
|
|
|
(
|
|
|
|
var durations;
|
|
|
|
durations = [1, 1, 1, 1, 3/4, 1/4, 1/2, 3/4, 1/4, 1/2];
|
|
|
|
Ppar([
|
|
|
|
Pbind(*[
|
|
|
|
instrument: \kickdrum,
|
|
|
|
amp: -23.dbamp,
|
|
|
|
freq: 60,
|
|
|
|
legato: 0.8,
|
|
|
|
ffreq: Pseq((0..(durations.size * 4 - 1)).normalize, inf).linexp(0, 1, 100, 4000),
|
|
|
|
dur: Pseq(durations, inf),
|
|
|
|
bend: Pfuncn({ |x| if(x < (1/2), 0.4, 1) }, inf) <> Pkey(\dur),
|
|
|
|
]),
|
2022-01-30 23:34:32 +01:00
|
|
|
Pbind(*[
|
2022-01-29 23:43:31 +01:00
|
|
|
instrument: \hoover,
|
|
|
|
amp: -20.dbamp,
|
|
|
|
midinote: 74,
|
|
|
|
dur: durations.sum * 2,
|
|
|
|
sustain: 7,
|
2022-01-30 23:34:32 +01:00
|
|
|
])
|
2022-01-29 23:43:31 +01:00
|
|
|
]).play(TempoClock(260 / 60));
|
|
|
|
)
|
|
|
|
|
|
|
|
{ Decay2.ar(Impulse.ar(XLine.kr(1,50,20), 0.25), 0.01, 0.2, FSinOsc.ar(60)) }.play;
|
|
|
|
|
|
|
|
(
|
|
|
|
{ Out.ar(0, Impulse.ar(12, 0.0, 1, 0)) }.play
|
|
|
|
{ Out.ar(1, Impulse.ar(3, 0.0, 1, 0)) }.play
|
|
|
|
{ Out.ar(1, Impulse.ar(4, 0.0, 1, 0)) }.play
|
|
|
|
{ Out.ar(0, SinOsc.ar(50, 0.0, 1, 0)) }.play
|
|
|
|
{ Out.ar(1, SinOsc.ar(600, 0.0, 1, 0)) }.play
|
|
|
|
{ Out.ar(1, BLowPass.ar(
|
|
|
|
BrownNoise.ar(0.1),
|
|
|
|
60.0, // cutoff freq.
|
|
|
|
1.0, // rq
|
|
|
|
0.5) // mul
|
|
|
|
) }.play
|
|
|
|
)
|
|
|
|
|
|
|
|
// Stop it all
|
|
|
|
CmdPeriod.run
|