pub struct ParametricEqProcessor<T: Transcendental, const BUF_SIZE: usize> {
pub output_gain: f32,
/* private fields */
}Expand description
Parametric equalizer processor node for signal graphs.
Fields§
§output_gain: f32Output gain (linear)
Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> ParametricEqProcessor<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> ParametricEqProcessor<T, BUF_SIZE>
Sourcepub fn new(sample_rate: f32, num_bands: usize) -> Self
pub fn new(sample_rate: f32, num_bands: usize) -> Self
Creates a new parametric equalizer processor with default parameters.
Sourcepub fn set_band(
&mut self,
index: usize,
frequency: f32,
q: f32,
gain_db: f32,
) -> Result<(), Error>
pub fn set_band( &mut self, index: usize, frequency: f32, q: f32, gain_db: f32, ) -> Result<(), Error>
Set parameters for a specific band.
Sourcepub fn set_band_type(
&mut self,
index: usize,
band_type: BandType,
) -> Result<(), Error>
pub fn set_band_type( &mut self, index: usize, band_type: BandType, ) -> Result<(), Error>
Set band type.
Sourcepub fn set_band_enabled(
&mut self,
index: usize,
enabled: bool,
) -> Result<(), Error>
pub fn set_band_enabled( &mut self, index: usize, enabled: bool, ) -> Result<(), Error>
Enable/disable band.
Sourcepub fn set_output_gain(&mut self, gain: f32)
pub fn set_output_gain(&mut self, gain: f32)
Set output gain (linear).
Sourcepub fn eq(&self) -> &ParametricEq<Biquad<f32>, BiquadFactory>
pub fn eq(&self) -> &ParametricEq<Biquad<f32>, BiquadFactory>
Get reference to inner equalizer.
Sourcepub fn eq_mut(&mut self) -> &mut ParametricEq<Biquad<f32>, BiquadFactory>
pub fn eq_mut(&mut self) -> &mut ParametricEq<Biquad<f32>, BiquadFactory>
Get mutable reference to inner equalizer.
Trait Implementations§
Source§impl<T: Transcendental, const BUF_SIZE: usize> Node<T, BUF_SIZE> for ParametricEqProcessor<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> Node<T, BUF_SIZE> for ParametricEqProcessor<T, BUF_SIZE>
Source§fn node_type_id(&self) -> NodeTypeIdwhere
Self: 'static + Sized,
fn node_type_id(&self) -> NodeTypeIdwhere
Self: 'static + Sized,
Get the node’s type ID
Source§fn metadata(&self) -> NodeMetadata
fn metadata(&self) -> NodeMetadata
Get node metadata
Source§fn get_parameter(&self, id: &ParameterId) -> Option<ParamValue>
fn get_parameter(&self, id: &ParameterId) -> Option<ParamValue>
Get the value of a parameter
Source§fn set_parameter(
&mut self,
id: &ParameterId,
value: ParamValue,
) -> ProcessResult<()>
fn set_parameter( &mut self, id: &ParameterId, value: ParamValue, ) -> ProcessResult<()>
Set the value of a parameter
Source§fn input_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
fn input_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
Get mutable input port by index
Source§fn output_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
fn output_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
Get mutable output port by index
Source§fn control_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
fn control_port_mut(&mut self, index: usize) -> Option<&mut Port<T, BUF_SIZE>>
Get mutable control port by index
Source§fn num_inputs(&self) -> usize
fn num_inputs(&self) -> usize
Total number of input ports
Source§fn num_outputs(&self) -> usize
fn num_outputs(&self) -> usize
Total number of output ports
Source§fn num_signal_inputs(&self) -> usize
fn num_signal_inputs(&self) -> usize
Number of signal input ports
Source§fn num_signal_outputs(&self) -> usize
fn num_signal_outputs(&self) -> usize
Number of signal output ports
Source§fn apply_set_parameter(
&mut self,
cmd: &SetParameter,
) -> Result<(), ProcessError>
fn apply_set_parameter( &mut self, cmd: &SetParameter, ) -> Result<(), ProcessError>
Apply a
SetParameter command to this node. Read moreSource§fn resolve_resources(&mut self, _resources: &mut ResourceRegistry<T>)
fn resolve_resources(&mut self, _resources: &mut ResourceRegistry<T>)
Resolve named shared resources (tape loops, etc.) from the registry,
acquiring the capability handle matching this node’s role.
Source§fn num_control_inputs(&self) -> usize
fn num_control_inputs(&self) -> usize
Number of control input ports
Source§fn num_control_outputs(&self) -> usize
fn num_control_outputs(&self) -> usize
Number of control output ports
Source§fn num_clock_inputs(&self) -> usize
fn num_clock_inputs(&self) -> usize
Number of clock input ports
Source§fn num_clock_outputs(&self) -> usize
fn num_clock_outputs(&self) -> usize
Number of clock output ports
Source§fn num_feedback_ports(&self) -> usize
fn num_feedback_ports(&self) -> usize
Number of feedback ports
Source§impl<T: Transcendental, const BUF_SIZE: usize> Processor<T, BUF_SIZE> for ParametricEqProcessor<T, BUF_SIZE>
impl<T: Transcendental, const BUF_SIZE: usize> Processor<T, BUF_SIZE> for ParametricEqProcessor<T, BUF_SIZE>
Source§fn process(
&mut self,
_ctx: &RenderContext,
_signal_inputs: &[&[T; BUF_SIZE]],
_control_inputs: &[T],
_clock_inputs: &[RenderContext],
_feedback_inputs: &[&[T; BUF_SIZE]],
) -> ProcessResult<()>
fn process( &mut self, _ctx: &RenderContext, _signal_inputs: &[&[T; BUF_SIZE]], _control_inputs: &[T], _clock_inputs: &[RenderContext], _feedback_inputs: &[&[T; BUF_SIZE]], ) -> ProcessResult<()>
Process a block of signal Read more
Auto Trait Implementations§
impl<T, const BUF_SIZE: usize> !RefUnwindSafe for ParametricEqProcessor<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> !UnwindSafe for ParametricEqProcessor<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Freeze for ParametricEqProcessor<T, BUF_SIZE>where
T: Freeze,
impl<T, const BUF_SIZE: usize> Send for ParametricEqProcessor<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Sync for ParametricEqProcessor<T, BUF_SIZE>
impl<T, const BUF_SIZE: usize> Unpin for ParametricEqProcessor<T, BUF_SIZE>where
T: Unpin,
impl<T, const BUF_SIZE: usize> UnsafeUnpin for ParametricEqProcessor<T, BUF_SIZE>where
T: UnsafeUnpin,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more