# Re: [sc-users] Re: Resonz x Ringz (gain issues)

At 01:10 PM 12/21/2014, Alexandre Torres Porres wrote:
...
There's still one thing that still intrigues me and that I'd like to ask the list here. Now that the math is worked out, the issue is more about understanding the concept of the "60 dB decay time".

We normally call it t60, and it depends only on R, not resonance-frequency or gain.

In my first message, I've showed how to convert to "decay time" from rq and vice-versa (given some frequency). In the code we see how this parameter along with frequency define "R".

R does not depend on frequency.

But in the context of Ringz, a so called "decay time" depends a lot on the gain parameter, as I see it.

Gain is often set to compensate the total energy.  A longer t60 means more energy in the impulse response, unless gain is changed to compensate.

And "R" doesn't really define the gain parameter in Ringz. It is fixed to 0.5.

Yes, the gain compensation is optional.

On the other hand, R defines the gain parameter in Resonz,

I would rather say gain is chosen as a function of R.

which always shifts according to both frequency & rq.

R does not depend on frequency.

And of course, this gain parameter is a lot smaller than 0.5 (so Ringz is much louder as I pointed here in the first message).

Right

So now I can calculate exactly how much louder Ringz is. But I still do not get how "dt" (decay time) actually defines an exact time the filter takes to decay 60dB. You see? I mean, if "dt" is relates to both rq and "freq", shouldn't "dt" also affect the gain parameter like "rq" and "freq"?

I tried to state this conversion formula in my first reply (but didn't test it, or even write down the exact version, because I was trying to do everything in my head).  If you can derive the approximate formula I gave involving 6.91, then you are there.

I wonder it there's the case where saying this is a "60 dB decay time" parameter is not really accurate. In which case I hope this is corrected in the help file soon.

Right - Ringz defines R based on t60, so "60 dB decay time" is right for it.  Resonz defines R as 1 - B/2, where B is bandwidh in some units, so R is NOT defined to set t60.  By the way, I see a bug in my first email: pi * BandwidthInHz * SamplingRateInHz makes no sense (wrong units).  It is most likely pi * BandwidthInHz / SamplingRateInHz, so then "radians per sample" would really mean "pi times seconds per sample", which is pretty strange, but pi * B / samplingRateInHz is commonly used for this situation.  It comes from mapping 3dB bandwidth from the s plane to the z plane (not from t60 considerations).

Obviously I can also be just completely blind and ingnorant on what the "60 dB decay time" parameter is and works. And if so I hope you can help me.

It works (t60 = decay time), and 1/t60 is approximately proportional to any reasonable definition of bandwidth, but to precisely convert Ringz's R to Resonz's R, you need to use the conversion formula I outlined (the approximate version may be good enough to sound the same).  If you have trouble deriving it, let me know and I'll go find a pen and piece of paper. :-)

- Julius

Julius O. Smith III <jos@xxxxxxxxxxxxxxxxxx>
Professor of Music and, by courtesy, Electrical Engineering
CCRMA, Stanford University
http://ccrma.stanford.edu/~jos/