Tap Tempo tremolo again
Posted: Mon Jul 31, 2017 4:38 pm
I referenced this older thread:
http://www.spinsemi.com/forum/viewtopic ... =tap+tempo
I have some tap tempo code that can measure up to 1 second. The resulting value is 32767 *256 or "really close to 1.0". This maps to LFO freq or 1.0 Hz, or Kf = 26, and at the low end I'm going down to 1/20th of a second (which is probably faster than you can tap) at which point the LFO is at 20 Hz, where Kf = 502.
Now one approach is to interpolate linearly between these endpoints, but this does not really give the desired result at anywhere other than the endpoints. The real equation I am trying to implement is Kf = (8 * pi)/x, where x is the delay time in seconds, or essentially the number of samples counted between taps at 32768 Hz.
I've read the 1/X section at the knowledge base more than a few times and it is breaking my brain as I have not used the log/exp functions much and they are a little tough to understand.
http://spinsemi.com/knowledge_base/pgm_ ... n_limiters
The input X will go from 0.05 to 1.0.
The output should go from 502 to 26 over this same range, of course that is scaled to the number representation used by the LFO.
Anyone want to help an old geezer out? Thanks! DL
http://www.spinsemi.com/forum/viewtopic ... =tap+tempo
I have some tap tempo code that can measure up to 1 second. The resulting value is 32767 *256 or "really close to 1.0". This maps to LFO freq or 1.0 Hz, or Kf = 26, and at the low end I'm going down to 1/20th of a second (which is probably faster than you can tap) at which point the LFO is at 20 Hz, where Kf = 502.
Now one approach is to interpolate linearly between these endpoints, but this does not really give the desired result at anywhere other than the endpoints. The real equation I am trying to implement is Kf = (8 * pi)/x, where x is the delay time in seconds, or essentially the number of samples counted between taps at 32768 Hz.
I've read the 1/X section at the knowledge base more than a few times and it is breaking my brain as I have not used the log/exp functions much and they are a little tough to understand.
http://spinsemi.com/knowledge_base/pgm_ ... n_limiters
The input X will go from 0.05 to 1.0.
The output should go from 502 to 26 over this same range, of course that is scaled to the number representation used by the LFO.
Anyone want to help an old geezer out? Thanks! DL