Skip to content

Instantly share code, notes, and snippets.

@ekozhura
Last active August 29, 2015 14:01
Show Gist options
  • Save ekozhura/b8c593bc6ac96b7eb0a5 to your computer and use it in GitHub Desktop.
Save ekozhura/b8c593bc6ac96b7eb0a5 to your computer and use it in GitHub Desktop.
#overtone #supercollider #clojure
(defsynth hansa []
(let [sig (* (lf-noise0 (x-line:kr 100 1000 0.5))
(env-gen:ar (env-perc 0.001 0.05 1 -4) :action FREE :gate (impulse:ar (/ 1 0.04))))
delayed (comb-c:ar sig 1 (* 0.005 (+ (* (sin-osc 20 0) 0.5 ) 1)) 1)
env (env-gen:ar (env-perc 0.4 1.5 0.6 -4) :action FREE)
sig (free-verb (+ sig delayed) (x-line:kr 0.01 0.6 1) 0.1 0.1)]
(out [0 1] (* sig env))))
(hansa)
SynthDef(\hansa,
{
var out, outDelayed, env;
out = LFNoise0.ar(XLine.kr(100, 1000, 0.5), 1, 0) * EnvGen.ar(
Env.perc(0.001, 0.05, 1, -4), doneAction: 2, gate: Impulse.ar(1/0.04)
);
outDelayed = CombC.ar(out, 1, 0.005 * SinOsc.kr(20, 0, 0.5, 1), 1, 1, 0);
env = EnvGen.ar(Env.perc(0.4, 1.5, 0.6, -4), doneAction: 2);
Out.ar(0, FreeVerb.ar(
(out + outDelayed),
XLine.kr(0.01, 0.6, 1), 0.1, 0.1, 1, 0
) * env ! 2)
}).play;
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment