pub(crate) struct BiquadFilterNode {
channel_info: ChannelInfo,
filter: FilterType,
frequency: Param,
detune: Param,
q: Param,
gain: Param,
b0: f64,
b1: f64,
b2: f64,
a1: f64,
a2: f64,
state: SmallVec<[BiquadState; 2]>,
}
Expand description
https://webaudio.github.io/web-audio-api/#biquadfilternode
Fields§
§channel_info: ChannelInfo
§filter: FilterType
§frequency: Param
§detune: Param
§q: Param
§gain: Param
§b0: f64
The computed filter parameter b0 This is actually b0 / a0, we pre-divide for efficiency
b1: f64
The computed filter parameter b1 This is actually b1 / a0, we pre-divide for efficiency
b2: f64
The computed filter parameter b2 This is actually b2 / a0, we pre-divide for efficiency
a1: f64
The computed filter parameter a1 This is actually a1 / a0, we pre-divide for efficiency
a2: f64
The computed filter parameter a2 This is actually a2 / a0, we pre-divide for efficiency
state: SmallVec<[BiquadState; 2]>
Stored filter state, this contains the last two frames of input and output values for every channel
Implementations§
source§impl BiquadFilterNode
impl BiquadFilterNode
pub fn new( options: BiquadFilterNodeOptions, channel_info: ChannelInfo, sample_rate: f32, ) -> Self
pub fn update_parameters(&mut self, info: &BlockInfo, tick: Tick) -> bool
sourcefn constant_z_transform(&mut self, b0: f64)
fn constant_z_transform(&mut self, b0: f64)
Set to the constant z-transform y[n] = b0 * x[n]
sourcefn update_coefficients(&mut self, fs: f32)
fn update_coefficients(&mut self, fs: f32)
Update the coefficients a1, a2, b0, b1, b2, given the sample_rate
See https://webaudio.github.io/web-audio-api/#filters-characteristics