(freq: f64, center_freq: f64, gain: f64, q: f64)
| 518 | } |
| 519 | |
| 520 | fn calculate_peaking_eq_response(freq: f64, center_freq: f64, gain: f64, q: f64) -> f64 { |
| 521 | let bandwidth = center_freq / q; |
| 522 | let diff = (freq - center_freq).abs(); |
| 523 | let falloff = 1.0 / (1.0 + (diff / (bandwidth * 0.5)).powf(2.0)); |
| 524 | gain * falloff |
| 525 | } |