// title: It's more fun to compute this snare // author: 38nonprivate // description: // An attempt to replicate the snare from "It's More Fun To Compute" by, err... somebody please remind me. // As usual, it's close but no cigar. // Nano changes in the envelope times produce wildly different end results. // // Room for improvement: all Rands should be TRands, doneAction should be an argument, then it could be retriggered. // Levels and timings of elements could be arguments. // code: ( s = Server.default; s.boot; ) ( x = SynthDef("more_fun_snare", { arg audioOutBus = 0; var env_amp, env_pitch; var envGen_amp; var noise, pulse_cluster, envGen_hihat, out_hihat; var sine_noise; var flick, envGen_flickPitch, envGen_flickAmp; var trig_flick, gapTime_flick; var lastFlick, envGen_lastFlickPitch, envGen_lastFlickAmp, lastFlickDelayTime; var output; env_amp = Env([1.0, 1.0, 0.0], [0.0, 0.8]); envGen_amp = EnvGen.ar(env_amp, doneAction: 2); noise = BPF.ar(WhiteNoise.ar, 214, 0.1, 0.5); noise = noise + BPF.ar(WhiteNoise.ar, 1157, 0.1, 0.5); noise = noise + RHPF.ar(WhiteNoise.ar, 3000, 0.1, 0.2) * 0.2; pulse_cluster = Mix.fill(6, { LFPulse.ar(ExpRand(250, 360), Rand(0, 0.99), Rand(0.3, 0.7)); }); pulse_cluster = RHPF.ar(pulse_cluster, 8000, 0.1, 0.2); pulse_cluster = LPF.ar(pulse_cluster, 8000); envGen_hihat = EnvGen.ar(Env.perc(0.001, 0.85, 0.5, -7)); sine_noise = SinOsc.ar(1131 + BrownNoise.ar.range(-90, 90)) * 0.025; out_hihat = (pulse_cluster + noise + sine_noise) * envGen_hihat * 0.7; gapTime_flick = 0.019 * TRand.kr(0.999, 1.001, 1.0); trig_flick = Impulse.ar(gapTime_flick.reciprocal) * EnvGen.ar(Env([1, 1, 0], [gapTime_flick * 2, 0])); envGen_flickPitch = EnvGen.ar(Env.perc(0.003, 0.024, 1.0, -4.2), 1.0, levelScale: 5300, levelBias: 50); envGen_flickAmp = EnvGen.ar(Env.perc(0.0, 0.04, 1.0, 5)); flick = SinOsc.ar(envGen_flickPitch * Rand(0.999, 1.001), Rand(0, 6.2)) * envGen_flickAmp * 0.15; flick = flick + HPF.ar( SinOsc.ar(envGen_flickPitch * 4.9 * Rand(0.999, 1.001), Rand(0, 6.2)) * envGen_flickAmp * 0.1, 2000 ); flick = flick + CombC.ar(flick, 0.2, gapTime_flick, 0.1, 0.55); flick = LPF.ar(flick, 3000); flick = HPF.ar(flick, 140); envGen_lastFlickPitch = EnvGen.ar(Env.perc(0.0026, 0.022, 1.0, -7), 1.0, levelScale: 3300, levelBias: 90); envGen_lastFlickAmp = EnvGen.ar(Env.perc(0.0, 0.035, 1.0, 2)); lastFlick = SinOsc.ar(envGen_lastFlickPitch * Rand(0.999, 1.001)) * envGen_lastFlickAmp * 0.8; lastFlickDelayTime = 0.054 * TRand.kr(0.99, 1.01, 1.0); lastFlick = CombC.ar(lastFlick, 0.2, lastFlickDelayTime, 0.02) * 0.09; lastFlick = HPF.ar(lastFlick, 200); output = (flick + lastFlick + out_hihat) * envGen_amp; output = LPF.ar(output, 6000); output = output + BPF.ar(output, 6000, 0.1, 0.6); output = output + (trig_flick * 0.4); Out.ar(audioOutBus, output ! 2); }).send(s); ) ( { 100.do { Synth("more_fun_snare", [\audioOutBus, 0], s); (60 / 120 / 0.5).wait; }; }.fork; )