1
0
Fork 0

Move Q constant to the biquad module

This commit is contained in:
Robbert van der Helm 2022-06-05 23:48:41 +02:00
parent 06f5048b0b
commit 78caa0f78d
2 changed files with 3 additions and 3 deletions

View file

@ -20,6 +20,8 @@ use std::f32::consts;
use std::ops::{Add, Mul, Sub};
use std::simd::f32x2;
pub const NEUTRAL_Q: f32 = std::f32::consts::FRAC_1_SQRT_2;
/// A simple biquad filter with functions for generating coefficients for second order low-pass and
/// high-pass filters. Since these filters have 3 dB of attenuation at the center frequency, we'll
/// two of them in series to get 6 dB of attenutation at the crossover point for the LR24

View file

@ -18,11 +18,9 @@ use nih_plug::buffer::ChannelSamples;
use nih_plug::debug::*;
use std::simd::f32x2;
use crate::biquad::{Biquad, BiquadCoefficients};
use crate::biquad::{Biquad, BiquadCoefficients, NEUTRAL_Q};
use crate::NUM_BANDS;
const NEUTRAL_Q: f32 = std::f32::consts::FRAC_1_SQRT_2;
#[derive(Debug)]
pub struct IirCrossover {
/// The kind of crossover to use. `.update_filters()` must be called after changing this.