calculate decay for resonant model

michelez's icon

Hello friends,
I am using Spear to generate sdif files that I want to use with [resonators~] or [decaying-synusoids~]. From the analysis I get the frequency, amplitude and duration values. I am using a formula to calculate the decay rates which are required for those CNMAT objects. This is the formula

decay_rate = -ln( amp(t) / initial_amp ) / t

which is derived from the formula:

amp(t) = initial_amp * e ^ (- decay_rate * t)

to account for the different decay rates of different frequencies I also multiply the above decay rate by (frequency * 0.1).

I got all of these informations from an old thread:
https://cycling74.com/forums/cnmat-resonators-sdif-spear-public-models

I am getting decent results but I was wondering if anyone wants to chime in to share same wisdom on the matter