Last active
February 16, 2017 00:09
-
-
Save lvm/5498cd6bf95b0f58a646704a1c96cbab to your computer and use it in GitHub Desktop.
FoxDot custom synths
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Quarks.install("https://github.com/Qirky/FoxDotQuark.git") | |
FoxDot.start | |
( | |
SynthDef.new(\kick, {|out=0, freq=0, afreq=180, attack=0.001, sus=0.125, amp=1, pan=0| | |
var osc = SinOsc.ar(freq * XLine.ar(0.5, 0.125, 0.0125)); | |
var env = EnvGen.ar(Env.perc(attack, sus), doneAction:0); | |
osc = osc*env; | |
osc = osc * [min(1, (1-pan)/2), min(1, (pan+1)/2)]; | |
Out.ar(out, osc*amp); | |
}).add; | |
SynthDef.new(\hihat, {|out=0, hctf=7500, amp = 0.5, attack = 0.01, sus = 0.1, rq=1, pan = 1| | |
var pnk = PinkNoise.ar(1); | |
var env = EnvGen.ar(Env.perc(attack, sus), doneAction: 0); | |
pnk= RHPF.ar(pnk, hctf, rq); | |
pnk = pnk * env; | |
pnk = pnk * [min(1, (1-pan)/2), min(1, (pan+1)/2)]; | |
Out.ar(out, pnk*amp); | |
}).add; | |
SynthDef.new(\snare, {|out=0, lctf=3500, hctf=200, amp = 1, attack = 0.01, sus = 0.5, pan = 1| | |
var pnk = BrownNoise.ar(1); | |
var env = EnvGen.ar(Env.perc(attack, sus), doneAction: 0); | |
pnk= RHPF.ar(RLPF.ar(pnk, lctf), hctf, 1); | |
pnk = pnk * env; | |
pnk = pnk * [min(1, (1-pan)/2), min(1, (pan+1)/2)]; | |
Out.ar(out, pnk*amp); | |
}).add; | |
SynthDef(\bassy, {|out=0, freq=90, lctf=1200, rq = 0.5, attack=0.001, sus=1, hctf=5000, amp=0.1, pan=1| | |
var saw = Saw.ar(freq,0.5); | |
var env = EnvGen.ar(Env.perc(attack, sus), doneAction:2); | |
saw = BHiPass.ar(RLPF.ar(saw, lctf*env, rq), hctf, 1); | |
saw = saw * env; | |
saw = saw * [min(1, (1-pan)/2), min(1, (pan+1)/2)]; | |
Out.ar(out, saw*amp); | |
}).add; | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment