|
SynthDef(\kickDeep, {|amp=0.5, out=0| |
|
|
|
var daNoise,daOsc,env1,env2,env3; |
|
|
|
env1=Env.perc(0.001,1,80,-20); |
|
env2=Env.perc(0.001,1,1,-8); |
|
env3=Env.perc(0.001,1,80,-8); |
|
|
|
daNoise=LPF.ar(WhiteNoise.ar(1),EnvGen.kr(env1)+20); |
|
|
|
daOsc=LPF.ar(SinOsc.ar(EnvGen.kr(env3)+20),200); |
|
|
|
Out.ar(out,Pan2.ar(Mix.ar([daNoise,daOsc]) * amp, 0, EnvGen.kr(env2,doneAction: 2))) / 2; |
|
|
|
}).store; |
|
|
|
|
|
SynthDef(\i8t_drum_kickElectro, {|pan = 0, amp = 1, out=0| |
|
|
|
var body, bodyFreq, bodyAmp; |
|
var pop, popFreq, popAmp; |
|
var click, clickAmp; |
|
var snd; |
|
|
|
// body starts midrange, quickly drops down to low freqs, and trails off |
|
bodyFreq = EnvGen.ar(Env([261, 120, 51], [0.035, 0.08], curve: \exp)); |
|
bodyAmp = EnvGen.ar(Env.linen(0.005, 0.1, 0.3), doneAction: 1); |
|
body = SinOsc.ar(bodyFreq) * bodyAmp; |
|
// pop sweeps over the midrange |
|
popFreq = XLine.kr(750, 261, 0.02); |
|
popAmp = EnvGen.ar(Env.linen(0.001, 0.02, 0.001)) * 0.15; |
|
pop = SinOsc.ar(popFreq) * popAmp; |
|
// click is spectrally rich, covering the high-freq range |
|
// you can use Formant, FM, noise, whatever |
|
clickAmp = EnvGen.ar(Env.perc(0.001, 0.01)) * 0.15; |
|
click = LPF.ar(Formant.ar(910, 4760, 2110), 3140) * clickAmp; |
|
|
|
snd = body + pop + click; |
|
snd = snd.tanh; |
|
|
|
Out.ar(out, Pan2.ar(snd * amp, pan, amp) / 2); |
|
|
|
}).store; |
|
|
|
|
|
SynthDef(\kickFull, {|amp=0.5, out=0| |
|
|
|
var subosc, subenv, suboutput, clickosc, clickenv, clickoutput; |
|
|
|
subosc = {SinOsc.ar(60)}; |
|
subenv = {Line.ar(1, 0, 0.3, doneAction: 2)}; |
|
|
|
clickosc = {LPF.ar(WhiteNoise.ar(1),1500)}; |
|
clickenv = {Line.ar(1, 0, 0.02)}; |
|
|
|
suboutput = (subosc * subenv); |
|
clickoutput = (clickosc * clickenv); |
|
|
|
Out.ar(out, Pan2.ar((suboutput + clickoutput) * amp, 0) / 2); |
|
|
|
}).store; |
|
|
|
|
|
|
|
SynthDef(\kickGabber, {|amp=0.5, out=0| |
|
var snd; |
|
snd = SinOsc.ar(Env([1000, 69, 60], [0.015, 0.1], \exp).ar * [-0.1, 0, 0.1].midiratio); |
|
snd = Mix(snd); |
|
snd = (snd * 10).tanh; |
|
snd = (snd * 5.1).atan; |
|
snd = BPeakEQ.ar(snd, XLine.kr(2000, 100, 0.3), 2.0, 8); |
|
snd = snd + DelayC.ar(snd, 0.01, SinOsc.ar(4).range(0.0, 0.001)); |
|
snd = RLPF.ar(snd, 8000, 0.7); |
|
snd = snd * EnvGen.kr(Env([0, 1, 0.7, 0.7, 0], [0.001, 0.01, 0.3, 0.02]),doneAction: 1); |
|
snd = (snd * 0.6).clip(-1, 1); |
|
Out.ar(out, Pan2.ar(snd * amp, \pan.kr(0), amp) / 2); |
|
}).store; |
|
|
|
|
|
SynthDef(\kickHard, { |basefreq = 50, envratio = 3, freqdecay = 0.02, ampdecay = 0.5, amp=0.5, out=0| |
|
var fenv = EnvGen.kr(Env([envratio, 1], [freqdecay], \exp), 1) * basefreq, |
|
aenv = EnvGen.kr(Env.perc(0.005, ampdecay), 1, doneAction: 2); |
|
Out.ar(out, (SinOsc.ar(fenv, 0.5pi, aenv) * amp*1.4).distort); |
|
}).store; |
|
|
|
|
|
|
|
SynthDef(\kickHollow, {|amp=0.5, out=0| |
|
|
|
var sig, env; |
|
|
|
sig = SinOsc.ar(60,pi/2) ; |
|
sig = sig+(Saw.ar(Line.kr(12000,40,1/123),pi/2) / 12); |
|
sig = sig * EnvGen.kr( Env.perc(1/20,1/3), doneAction: 2); |
|
|
|
sig = sig+((RLPF.ar((sig)+WhiteNoise.ar(1/8),Array.geom(7,90,43),0.5)).tanh/8 * EnvGen.kr( Env.perc(1/20,1/4) ))/8; |
|
|
|
sig = (sig*1.3).tanh!2; |
|
|
|
|
|
Out.ar( out, Pan2.ar(sig * amp,0)/2 ); |
|
|
|
}).store; |
|
|
|
|
|
SynthDef(\kickSyn1, {|amp=0.5, out=0| |
|
var snd; |
|
snd = DC.ar(0); |
|
snd = snd + (SinOsc.ar(XLine.ar(800, 400, 0.01)) * Env.perc(0.0005, 0.01).ar); |
|
snd = snd + (BPF.ar(Hasher.ar(Sweep.ar), XLine.ar(800, 100, 0.01), 0.6) * Env.perc(0.001, 0.02).delay(0.001).ar); |
|
snd = snd + (SinOsc.ar(XLine.ar(172, 50, 0.01)) * EnvGen.kr(Env.perc(0.0001, 0.3, 1, \lin).delay(0.005),doneAction: 2)); |
|
snd = snd.tanh; |
|
Out.ar(out, Pan2.ar(snd * amp, \pan.kr(0), amp)); |
|
}).store; |
|
|
|
|
|
SynthDef(\kickSyn2, {|amp=0.5, out=0| |
|
var snd; |
|
snd = DC.ar(0); |
|
snd = snd + (HPF.ar(Hasher.ar(Sweep.ar), 1320) * Env.perc(0.003, 0.03).ar); |
|
snd = snd + (SinOsc.ar(XLine.ar(750, 161, 0.02)) * Env.perc(0.0005, 0.02).ar); |
|
snd = snd + (SinOsc.ar(XLine.ar(167, 52, 0.04)) * EnvGen.kr(Env.perc(0.0005, 0.3),doneAction: 2)); |
|
snd = snd.tanh; |
|
Out.ar(out, Pan2.ar(snd * amp, \pan.kr(0), amp/1.5)); |
|
}).store; |
|
|
|
|
|
SynthDef(\kickSyn3, {|amp=0.5, out=0| |
|
var snd; |
|
snd = DC.ar(0); |
|
snd = snd + (SinOsc.ar(XLine.ar(1500, 800, 0.01)) * Env.perc(0.0005, 0.01, curve: \lin).ar); |
|
snd = snd + (BPF.ar(Impulse.ar(0) * SampleRate.ir / 28000, 6100, 1.0) * 3.dbamp); |
|
snd = snd + (BPF.ar(Hasher.ar(Sweep.ar), 300, 0.9) * Env.perc(0.001, 0.02).ar); |
|
snd = snd + (SinOsc.ar(XLine.ar(472, 60, 0.045)) * EnvGen.kr(Env.perc(0.0001, 0.3, curve: \lin).delay(0.005),doneAction: 2)); |
|
snd = snd.tanh; |
|
Out.ar(out, Pan2.ar(snd * amp, \pan.kr(0), amp) / 2); |
|
}).store; |
|
|
|
|
|
|
|
|
|
|
|
|
|
SynthDef(\clap1, { |
|
|out = 0, amp = 0.5, pan = 0, dur = 1| |
|
var env1, env2, snd, noise1, noise2; |
|
|
|
// noise 1 - 4 short repeats |
|
env1 = EnvGen.ar( |
|
Env.new( |
|
[0, 1, 0, 0.9, 0, 0.7, 0, 0.5, 0], |
|
[0.001, 0.009, 0, 0.008, 0, 0.01, 0, 0.03], |
|
[0, -3, 0, -3, 0, -3, 0, -4] |
|
) |
|
); |
|
|
|
noise1 = WhiteNoise.ar(env1); |
|
noise1 = HPF.ar(noise1, 600); |
|
noise1 = LPF.ar(noise1, XLine.kr(7200, 4000, 0.03)); |
|
noise1 = BPF.ar(noise1, 1620, 3); |
|
|
|
// noise 2 - 1 longer single |
|
env2 = EnvGen.ar(Env.new([0, 1, 0], [0.02, 0.18], [0, -4]), doneAction: 2); |
|
|
|
noise2 = WhiteNoise.ar(env2); |
|
noise2 = HPF.ar(noise2, 1000); |
|
noise2 = LPF.ar(noise2, 7600); |
|
noise2 = BPF.ar(noise2, 1230, 0.7, 0.7); |
|
|
|
snd = noise1 + noise2; |
|
snd = snd * 2; |
|
snd = snd.softclip; |
|
|
|
Out.ar(out, Pan2.ar(snd,pan,amp) / 2); |
|
}).store; |
|
|
|
SynthDef(\clap2, {|amp=0.5,out=0| |
|
|
|
var claposc, clapenv, clapnoise, clapoutput; |
|
|
|
clapnoise = {BPF.ar(LPF.ar(WhiteNoise.ar(1),7500),1500)}; |
|
clapenv = {Line.ar(1, 0, 0.6, doneAction: 2)}; |
|
|
|
clapoutput = {Mix.arFill(7, |
|
{arg i; |
|
EnvGen.ar( |
|
Env.new( |
|
[0,0,1,0], |
|
[0.01 * i,0,0.04] |
|
) |
|
) * clapnoise * 0.5 |
|
} |
|
)}; |
|
|
|
Out.ar(out,Pan2.ar((clapoutput*amp) * clapenv, 0) / 2); |
|
|
|
}).store; |
|
|
|
|
|
|
|
SynthDef(\clapBasic, { |
|
|out = 0, amp = 0.5, pan = 0, dur = 1| |
|
var env1, env2, snd, noise1, noise2; |
|
|
|
// noise 1 - 4 short repeats |
|
env1 = EnvGen.ar( |
|
Env.new( |
|
[0, 1, 0, 0.9, 0, 0.7, 0, 0.5, 0], |
|
[0.001, 0.009, 0, 0.008, 0, 0.01, 0, 0.03], |
|
[0, -3, 0, -3, 0, -3, 0, -4] |
|
) |
|
); |
|
|
|
noise1 = WhiteNoise.ar(env1); |
|
noise1 = HPF.ar(noise1, 600); |
|
noise1 = LPF.ar(noise1, XLine.kr(7200, 4000, 0.03)); |
|
noise1 = BPF.ar(noise1, 1620, 3); |
|
|
|
// noise 2 - 1 longer single |
|
env2 = EnvGen.ar(Env.new([0, 1, 0], [0.02, 0.18], [0, -4]), doneAction: 2); |
|
|
|
noise2 = WhiteNoise.ar(env2); |
|
noise2 = HPF.ar(noise2, 1000); |
|
noise2 = LPF.ar(noise2, 7600); |
|
noise2 = BPF.ar(noise2, 1230, 0.7, 0.7); |
|
|
|
snd = noise1 + noise2; |
|
snd = snd * 2; |
|
snd = snd.softclip; |
|
|
|
Out.ar(out, Pan2.ar(snd,pan,amp) / 2); |
|
}).store; |
|
|
|
|
|
SynthDef(\clapNoise, {|amp=0.5,out=0| |
|
|
|
var claposc, clapenv, clapnoise, clapoutput; |
|
|
|
clapnoise = {BPF.ar(LPF.ar(WhiteNoise.ar(1),7500),1500)}; |
|
clapenv = {EnvGen.kr(Env.perc(0.01, 0.6), doneAction: 2)}; |
|
|
|
clapoutput = {Mix.arFill(7, |
|
{arg i; |
|
EnvGen.ar( |
|
Env.new( |
|
[0,0,1,0], |
|
[0.01 * i,0,0.04] |
|
) |
|
) * clapnoise * 0.5 |
|
} |
|
)}; |
|
|
|
Out.ar(out,Pan2.ar((clapoutput*amp) * clapenv, 0) / 2); |
|
|
|
}).store; |
|
|
|
|
|
|
|
|
|
|
|
SynthDef(\hh2, { |
|
|out = 0, pan = 0, amp = 0.5| |
|
var click, clickAmp; |
|
var noise, noiseAmp; |
|
var snd; |
|
|
|
// noise -> resonance -> expodec envelope |
|
noiseAmp = EnvGen.ar(Env.perc(0.001, 0.3, curve: -8), doneAction: 2); |
|
noise = Mix(BPF.ar(ClipNoise.ar, [4010, 4151], [0.15, 0.56], [1.0, 0.6])) * 0.7 * noiseAmp; |
|
|
|
snd = noise; |
|
|
|
Out.ar(out, Pan2.ar(snd, pan, amp) ); |
|
}).store; |
|
|
|
|
|
SynthDef(\hhOpen, {|amp=0.5,out=0| |
|
|
|
var hatosc, hatenv, hatnoise, hatoutput; |
|
|
|
hatnoise = {LPF.ar(WhiteNoise.ar(1),6000)}; |
|
|
|
hatosc = {HPF.ar(hatnoise,2000)}; |
|
hatenv = {Line.ar(1, 0, 0.3,doneAction: 2)}; |
|
|
|
hatoutput = (hatosc * hatenv); |
|
|
|
Out.ar(out, |
|
Pan2.ar(hatoutput*amp, 0) |
|
|
|
) |
|
|
|
}).store; |
|
|
|
SynthDef(\hhClosed, {|amp=0.5,out=0| |
|
|
|
var hatosc, hatenv, hatnoise, hatoutput; |
|
|
|
hatnoise = {LPF.ar(WhiteNoise.ar(1/2),6000)}; |
|
|
|
hatosc = {HPF.ar(hatnoise,2000)}; |
|
hatenv = {Line.ar(1, 0, 0.1,doneAction: 2)}; |
|
|
|
hatoutput = (hatosc * hatenv); |
|
|
|
Out.ar(out, |
|
Pan2.ar(hatoutput*amp, 0) |
|
|
|
) |
|
|
|
}).store; |
|
|
|
|
|
|
|
|
|
SynthDef(\hihatClosed, {|amp=0.5,out=0, rel=0.125| |
|
|
|
var hatosc, hatenv, hatnoise, hatoutput; |
|
|
|
hatnoise = {LPF.ar(WhiteNoise.ar(1),6000)}; |
|
|
|
hatosc = {HPF.ar(hatnoise,2000)}; |
|
hatenv = EnvGen.kr(Env.perc(0.01,rel),doneAction:2); |
|
|
|
hatoutput = (hatosc * hatenv)/2; |
|
|
|
Out.ar(out, |
|
Pan2.ar(hatoutput*amp, 0) |
|
|
|
) |
|
|
|
}).store; |
|
|
|
|
|
|
|
|
|
SynthDef(\hihatOpen, {|amp=0.5,out=0| |
|
|
|
var hatosc, hatenv, hatnoise, hatoutput; |
|
|
|
hatnoise = {LPF.ar(WhiteNoise.ar(1),6000)}; |
|
|
|
hatosc = {HPF.ar(hatnoise,2000)}; |
|
hatenv = {Line.ar(1, 0, 0.3,doneAction: 2)}; |
|
|
|
hatoutput = (hatosc * hatenv); |
|
|
|
Out.ar(out, |
|
Pan2.ar(hatoutput*amp, 0) |
|
|
|
) |
|
|
|
}).store; |
|
|
|
|
|
|
|
|
|
SynthDef(\hihatShort, { |
|
|out = 0, pan = 0, amp = 0.5| |
|
var click, clickAmp; |
|
var noise, noiseAmp; |
|
var snd; |
|
|
|
// noise -> resonance -> expodec envelope |
|
noiseAmp = EnvGen.ar(Env.perc(0.001, 0.3, curve: -8), doneAction: 2); |
|
noise = Mix(BPF.ar(ClipNoise.ar, [4010, 4151], [0.15, 0.56], [1.0, 0.6])) * 0.7 * noiseAmp; |
|
|
|
snd = noise; |
|
|
|
Out.ar(out, Pan2.ar(snd, pan, amp) ); |
|
}).store; |
|
|
|
|
|
|
|
|
|
SynthDef(\snareBass, {|amp=0.5,out=0| |
|
var drumosc, filterenv, volenv, drumoutput, snaposc, snapenv, fulloutput; |
|
|
|
drumosc = {((Pulse.ar(100)+WhiteNoise.ar)*3).tanh}; |
|
filterenv = {Line.ar(1, 0, 0.2, doneAction: 2)}; |
|
volenv = {EnvGen.kr(Env.perc(0.01,0.6), doneAction: 2)}; |
|
drumoutput = {LPF.ar(drumosc,(filterenv *1000) + 30)}; |
|
|
|
snaposc = {BPF.ar(HPF.ar(WhiteNoise.ar(1),500),1500)}; |
|
snapenv = {Line.ar(1, 0, 0.2, doneAction: 2)}; |
|
|
|
fulloutput = (drumoutput * volenv) + (snaposc * snapenv); |
|
//fulloutput = (drumoutput * volenv); |
|
|
|
Out.ar(out,Pan2.ar(fulloutput*(amp/3), 0)); |
|
|
|
}).store; |
|
|
|
|
|
|
|
SynthDef(\snareDry, { |
|
|out = 0, pan = 0, amp = 1| |
|
var pop, popAmp, popFreq; |
|
var noise, noiseAmp; |
|
var snd; |
|
|
|
// pop makes a click coming from very high frequencies |
|
// slowing down a little and stopping in mid-to-low |
|
popFreq = EnvGen.ar(Env([3261, 410, 160], [0.005, 0.01], curve: \exp)); |
|
popAmp = EnvGen.ar(Env.perc(0.001, 0.11)) * 0.7; |
|
pop = SinOsc.ar(popFreq) * popAmp; |
|
// bandpass-filtered white noise |
|
noiseAmp = EnvGen.ar(Env.perc(0.001, 0.15), doneAction: 2); |
|
noise = BPF.ar(WhiteNoise.ar, 810, 1.6) * noiseAmp; |
|
|
|
snd = (pop + noise) * 1.3; |
|
|
|
Out.ar(out, Pan2.ar(snd, pan, (amp/3))); |
|
}).store; |
|
|
|
|
|
SynthDef(\snareHollow, {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)); |
|
}).store; |
|
|
|
|
|
SynthDef(\snareNeuro, { |
|
var snd; |
|
// a percussive click to give it some attack |
|
snd = LPF.ar(HPF.ar(WhiteNoise.ar, 300), 8000) * Env.linen(0.001, 0.01, 0.001).ar; |
|
// sine sweep body. very important! |
|
snd = snd + (SinOsc.ar(Env([400, 196, 160], [0.04, 0.2], \exp).ar) * Env.perc(0.04, 0.2).ar * 6.dbamp).tanh; |
|
// sound of snare coils rattling |
|
snd = snd + (HPF.ar(BPeakEQ.ar(WhiteNoise.ar, 4000, 0.5, 3), 300) * Env.perc(0.05, 0.2).delay(0.01).ar(2) * -3.dbamp); |
|
// another sound sweep to improve the attack, optional |
|
snd = snd + (SinOsc.ar(XLine.kr(3000, 1500, 0.01)) * Env.perc(0.001, 0.02).ar); |
|
// distortion helps glue everything together and acts as a compressor |
|
snd = (snd * 1.4).tanh/3; |
|
snd = Pan2.ar(snd, \pan.kr(0), \amp.kr(0.1)); |
|
Out.ar(\out.kr(0), snd); |
|
}).store; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// adapted from a post by Neil Cosgrove (other three are original) |
|
SynthDef(\clapElectro, { |
|
|out = 0, amp = 0.5, pan = 0, dur = 1| |
|
var env1, env2, snd, noise1, noise2; |
|
|
|
// noise 1 - 4 short repeats |
|
env1 = EnvGen.ar( |
|
Env.new( |
|
[0, 1, 0, 0.9, 0, 0.7, 0, 0.5, 0], |
|
[0.001, 0.009, 0, 0.008, 0, 0.01, 0, 0.03], |
|
[0, -3, 0, -3, 0, -3, 0, -4] |
|
) |
|
); |
|
|
|
noise1 = WhiteNoise.ar(env1); |
|
noise1 = HPF.ar(noise1, 600); |
|
noise1 = LPF.ar(noise1, XLine.kr(7200, 4000, 0.03)); |
|
noise1 = BPF.ar(noise1, 1620, 3); |
|
|
|
// noise 2 - 1 longer single |
|
env2 = EnvGen.ar(Env.new([0, 1, 0], [0.02, 0.18], [0, -4]), doneAction:2); |
|
|
|
noise2 = WhiteNoise.ar(env2); |
|
noise2 = HPF.ar(noise2, 1000); |
|
noise2 = LPF.ar(noise2, 7600); |
|
noise2 = BPF.ar(noise2, 1230, 0.7, 0.7); |
|
|
|
snd = noise1 + noise2; |
|
snd = snd * 2; |
|
snd = snd.softclip; |
|
|
|
Out.ar(out, Pan2.ar(snd,pan,amp)); |
|
}).store; |
|
|
|
|
|
SynthDef(\kickElectro, { |
|
|out = 0, pan = 0, amp = 0.3| |
|
var body, bodyFreq, bodyAmp; |
|
var pop, popFreq, popAmp; |
|
var click, clickAmp; |
|
var snd; |
|
|
|
// body starts midrange, quickly drops down to low freqs, and trails off |
|
bodyFreq = EnvGen.ar(Env([261, 120, 51], [0.035, 0.08], curve: \exp)); |
|
bodyAmp = EnvGen.ar(Env.linen(0.005, 0.1, 0.3), doneAction: 2); |
|
body = SinOsc.ar(bodyFreq) * bodyAmp; |
|
// pop sweeps over the midrange |
|
popFreq = XLine.kr(750, 261, 0.02); |
|
popAmp = EnvGen.ar(Env.linen(0.001, 0.02, 0.001)) * 0.15; |
|
pop = SinOsc.ar(popFreq) * popAmp; |
|
// click is spectrally rich, covering the high-freq range |
|
// you can use Formant, FM, noise, whatever |
|
clickAmp = EnvGen.ar(Env.perc(0.001, 0.01)) * 0.15; |
|
click = LPF.ar(Formant.ar(910, 4760, 2110), 3140) * clickAmp; |
|
|
|
snd = body + pop + click; |
|
snd = snd.tanh; |
|
|
|
Out.ar(out, Pan2.ar(snd, pan, amp)); |
|
|
|
}).store; |
|
|
|
|
|
|
|
SynthDef(\snareElectro, { |
|
|out = 0, pan = 0, amp = 0.3| |
|
var pop, popAmp, popFreq; |
|
var noise, noiseAmp; |
|
var snd; |
|
|
|
// pop makes a click coming from very high frequencies |
|
// slowing down a little and stopping in mid-to-low |
|
popFreq = EnvGen.ar(Env([3261, 410, 160], [0.005, 0.01], curve: \exp)); |
|
popAmp = EnvGen.ar(Env.perc(0.001, 0.11)) * 0.7; |
|
pop = SinOsc.ar(popFreq) * popAmp; |
|
// bandpass-filtered white noise |
|
noiseAmp = EnvGen.ar(Env.perc(0.001, 0.15), doneAction: 2); |
|
noise = BPF.ar(WhiteNoise.ar, 810, 1.6) * noiseAmp; |
|
|
|
snd = (pop + noise) * 1.3; |
|
|
|
Out.ar(out, Pan2.ar(snd, pan, amp)); |
|
}).store; |