Skip to main content

ParameterizedAlgorithm

Trait ParameterizedAlgorithm 

Source
pub trait ParameterizedAlgorithm<T>: Algorithm<T>
where T: Transcendental,
{ type Params: Clone + Send + Sync; // Required methods fn params(&self) -> &Self::Params; fn set_params(&mut self, params: Self::Params); // Provided method fn set_parameter( &mut self, name: &str, value: ParamValue, ) -> Result<(), &'static str> { ... } }
Expand description

An Algorithm with typed, settable parameters.

Extends the base Algorithm trait with the ability to get and set a typed parameter struct (Params) and to update individual parameters by name (for automation integration).

Required Associated Types§

Source

type Params: Clone + Send + Sync

The concrete parameter type for this algorithm.

Required Methods§

Source

fn params(&self) -> &Self::Params

Get a reference to the current parameters.

Source

fn set_params(&mut self, params: Self::Params)

Replace all parameters atomically.

The implementation should recompute any derived coefficients.

Provided Methods§

Source

fn set_parameter( &mut self, name: &str, value: ParamValue, ) -> Result<(), &'static str>

Set a single parameter by name (for automation / scripting).

Default: returns an error for any unrecognised name.

Implementors§

Source§

impl<T> ParameterizedAlgorithm<T> for Biquad<T>
where T: Transcendental,

Source§

impl<T> ParameterizedAlgorithm<T> for OnePole<T>
where T: Transcendental,

Source§

impl<T> ParameterizedAlgorithm<T> for StateVariableFilter<T>
where T: Transcendental,

Source§

impl<T, const MAX_DELAY: usize> ParameterizedAlgorithm<T> for CombFilter<T, MAX_DELAY>
where T: Transcendental,

Source§

impl<T, const MAX_SECTIONS: usize> ParameterizedAlgorithm<T> for Butterworth<T, MAX_SECTIONS>
where T: Transcendental,

Source§

impl<T, const MAX_SECTIONS: usize> ParameterizedAlgorithm<T> for ChebyshevI<T, MAX_SECTIONS>
where T: Transcendental,

Source§

impl<T, const MAX_SECTIONS: usize> ParameterizedAlgorithm<T> for ChebyshevII<T, MAX_SECTIONS>
where T: Transcendental,