MCPcopy Create free account
hub / github.com/Signalsmith-Audio/reverb-example-code / BasicReverb

Method BasicReverb

reverb-example-code.h:216–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

214 double dry, wet;
215
216 BasicReverb(double roomSizeMs, double rt60, double dry=0, double wet=1) : diffuser(roomSizeMs), dry(dry), wet(wet) {
217 feedback.delayMs = roomSizeMs;
218
219 // How long does our signal take to go around the feedback loop?
220 double typicalLoopMs = roomSizeMs*1.5;
221 // How many times will it do that during our RT60 period?
222 double loopsPerRt60 = rt60/(typicalLoopMs*0.001);
223 // This tells us how many dB to reduce per loop
224 double dbPerCycle = -60/loopsPerRt60;
225
226 feedback.decayGain = std::pow(10, dbPerCycle*0.05);
227 }
228
229 void configure(double sampleRate) {
230 feedback.configure(sampleRate);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected