Reverb Algorithms and LocalIn/Out

42 views
Skip to first unread message

James Surgenor

unread,
Apr 2, 2013, 11:30:25 AM4/2/13
to belfast...@googlegroups.com
Hi all,

I've been spending a while trying to implement some reverb algorithms, thought it might be an idea to start discussions?

Below is my current attempt (couldn't attach), implementing Schroeder-esque, for your perusal/critique.

But I want to try out Griesinger's Lexicon algorithm, an outline of which is at the site below:

If anyone has any algorithms they wouldn't mind sharing, or any advice on making the Lexicon (or reverbs in general) it'd be greatly appreciated.

It'd also be great to get some advice on LocalIn/Out pairing so I can try and create a reverb tank, I just end up with ridiculous feedback at the minute.

Thanks,
J

-----------------------------------------

// ******************************
// Reverb Tests - James Surgenor
// ******************************

// Reverb Synth
(
SynthDef(\reverb, {|decayTime=5,inChan=7,outChan=0, outGain=1,lpFreq=10000|
var in,out,lowPass,allpass,combs;

// Get send from channel (defaults to In 7)
in = In.ar(inChan,1);

// Parallel Combs (6)
combs = Mix.ar(CombC.ar(in,0.04,[0.0271,0.0341,0.0373,0.0411,0.0437,0.0479],[decayTime.rand,decayTime.rand,decayTime.rand,decayTime.rand,decayTime.rand,decayTime.rand,],0.633));

// Series Allpass (4)
4.do({allpass = AllpassC.ar(combs,0.05,0.05.rand,decayTime.rand,0.25)});

// LPF (defaults to 10kHz)
out = LPF.ar(allpass,lpFreq,1);

Out.ar(outChan, ((out*0.5)*outGain)!2); // Make 'pseudo-stereo'
}).add;
)


// Test synth
(
// Randomly triggered synth to test reverb
SynthDef(\testSynth,{|freq=440,sendAmp=0.5,sendChan=7,dur=1|
var env,out;

// Perc Env
env = EnvGen.kr(Env.perc(0.01,0.98,1,-4),LFNoise0.kr(1,1),1,0,dur,0);

out = Saw.ar(freq);
out = out * env;

// Send to effect
Out.ar(sendChan,out*sendAmp);

// Send to main out
Out.ar(0,(out*0.5)!2); // Make 'pseudo-stereo'
}).add;
)


// Test everything - synth is randomly triggered, so wait
(
a = Synth(\testSynth);
b = Synth(\reverb,addAction:'addToTail');

r = Routine({
inf.do({
a.set(\freq,rrand(880,1000));
2.wait;
})
}).play;
)


// Stop everything
(
r.stop;
a.free;
b.free;
)

James Surgenor

unread,
Apr 2, 2013, 12:01:14 PM4/2/13
to belfast...@googlegroups.com
Hi all,

Just for anyone interested in this, Miguel has pointed out a bug (thanks), and I've also moved the LPF to the right place. Reverb synthdef fix below:

(
SynthDef(\reverb, {|decayTime=5,inChan=7,outChan=0, outGain=1,lpFreq=10000|
var in,out,lowPass,allpass,combs;

// Get send from channel (defaults to In 7)
in = In.ar(inChan,1);
// LPF (defaults to 10kHz)
in = LPF.ar(in,lpFreq,1);

// Parallel Combs (6)
combs = Mix.ar(CombC.ar(in,0.04,[0.0271,0.0341,0.0373,0.0411,0.0437,0.0479],[decayTime.rand,decayTime.rand,decayTime.rand,decayTime.rand,decayTime.rand,decayTime.rand,],0.633));

// Series Allpass (4)
4.do({combs = AllpassC.ar(combs,0.05,0.05.rand,decayTime.rand,0.75)});
out = combs;
Out.ar(outChan, ((out*0.5)*outGain)!2); // Make 'pseudo-stereo'
}).add;
)


Regards,
J
Reply all
Reply to author
Forward
0 new messages