mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 16:24:57 +01:00
NO-OP: clarify maths
This commit is contained in:
parent
827be736ae
commit
b142fc4410
1 changed files with 7 additions and 3 deletions
|
|
@ -168,10 +168,14 @@ Amp::apply_gain (BufferSet& bufs, samplecnt_t sample_rate, samplecnt_t nframes,
|
||||||
return target;
|
return target;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Apply Audio Gain first, calculate target LFP'ed gain coefficient
|
/* Apply Audio Gain first, calculate 1 pole IIR time constant
|
||||||
*
|
*
|
||||||
* Low pass filter coefficient: 1.0 - e^(-2.0 * π * f / 48000) f in Hz.
|
* H(z) = a / (1 - (1 - a) z^-1)
|
||||||
* for f << SR, approx a ~= 6.2 * f / SR;
|
* a = -y + sqrt (y^2 + 2y); y = 1 - cos (w) ; w = 2 * π f/SR
|
||||||
|
* a ~= 1.0 - e^(-2.0 * π * f / SR)
|
||||||
|
*
|
||||||
|
* and for very small w (f << SR)
|
||||||
|
* a ~= 6.2 * f / SR;
|
||||||
*/
|
*/
|
||||||
const gain_t a = 156.825f / (gain_t)sample_rate; // 25 Hz LPF
|
const gain_t a = 156.825f / (gain_t)sample_rate; // 25 Hz LPF
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue