Skip to content

Instantly share code, notes, and snippets.

@patrickt
Created October 5, 2025 16:10
Show Gist options
  • Save patrickt/ecf61c2902d0a4b5a09f87f203be19af to your computer and use it in GitHub Desktop.
Save patrickt/ecf61c2902d0a4b5a09f87f203be19af to your computer and use it in GitHub Desktop.
(
SynthDef(\rev6, {
var sig, wet;
var in = \in.kr(0);
var delay = \rev_delay.kr(0.04);
var delete = \rev_delete.kr(0.07);
sig = In.ar(in, 2);
// start the reverb with a delay line
wet = DelayN.ar(sig, delay, delay);
wet = 4.collect({
var del, coef, dec;
del = { Rand(0.03, delete) } ! 2;
coef = Rand(0.75, 0.85);
dec = del / (log10(coef) / 3.neg);
// four comb filters to stretch it out
// low-pass filter reduces brightness a little, sounds realistic
LPF.ar(CombN.ar(wet, 0.1, del, dec), { ExpRand(1000, 1500) } !2);
}).sum;
3.do({ |n|
var del, coef, dec;
del = { Rand(0.002, 0.01) } ! 2;
coef = Rand(0.8, 0.95);
dec = (del / (log10(coef) / 3.neg));
// delete a few frequencies to simulate a real room
wet = AllpassN.ar(wet, 0.1, del, dec);
});
// and a couple more with hardcoded params
[0.0017, 0.005].do({ |del|
var dec = del / (log10(0.7) / 3.neg);
wet = AllpassN.ar(wet, 0.1, del, dec);
});
sig = sig + (wet * \mix.ar(0.25));
Out.ar(\out.kr(0), sig)
}).add;
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment