pub struct StringModel<T: Transcendental> { /* private fields */ }Expand description
Physical string model — digital waveguide with damping and dispersion.
Uses a pre-allocated delay line (Vec<T>) sized to the maximum supported
delay. The process() method is RT-safe — no allocation, no locking.
Implementations§
Source§impl<T: Transcendental> StringModel<T>
impl<T: Transcendental> StringModel<T>
Sourcepub fn new(params: StringParams<T>, sample_rate: f32, capacity: usize) -> Self
pub fn new(params: StringParams<T>, sample_rate: f32, capacity: usize) -> Self
Create a string model with the given parameters and delay-line capacity.
capacity samples should exceed sample_rate / min_frequency.
Trait Implementations§
Source§impl<T: Transcendental> Algorithm<T> for StringModel<T>
impl<T: Transcendental> Algorithm<T> for StringModel<T>
Source§fn process(
&mut self,
input: Option<&[T]>,
output: &mut [T],
) -> ProcessResult<()>
fn process( &mut self, input: Option<&[T]>, output: &mut [T], ) -> ProcessResult<()>
Process one block of signal. Read more
Source§fn metadata(&self) -> AlgorithmMetadata
fn metadata(&self) -> AlgorithmMetadata
Descriptive metadata (defaults to empty).
Source§fn apply_command(&mut self, _value: T)
fn apply_command(&mut self, _value: T)
Receive a real-time command value from the control path. Read more
Source§impl<T: Clone + Transcendental> Clone for StringModel<T>
impl<T: Clone + Transcendental> Clone for StringModel<T>
Source§fn clone(&self) -> StringModel<T>
fn clone(&self) -> StringModel<T>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<T: Debug + Transcendental> Debug for StringModel<T>
impl<T: Debug + Transcendental> Debug for StringModel<T>
Source§impl<T: Transcendental> ParameterizedAlgorithm<T> for StringModel<T>
impl<T: Transcendental> ParameterizedAlgorithm<T> for StringModel<T>
Source§type Params = StringParams<T>
type Params = StringParams<T>
The concrete parameter type for this algorithm.
Source§fn set_params(&mut self, params: Self::Params)
fn set_params(&mut self, params: Self::Params)
Replace all parameters atomically. Read more
Source§fn set_parameter(
&mut self,
name: &str,
value: ParamValue,
) -> Result<(), &'static str>
fn set_parameter( &mut self, name: &str, value: ParamValue, ) -> Result<(), &'static str>
Set a single parameter by name (for automation / scripting). Read more
Auto Trait Implementations§
impl<T> Freeze for StringModel<T>where
T: Freeze,
impl<T> RefUnwindSafe for StringModel<T>where
T: RefUnwindSafe,
impl<T> Send for StringModel<T>
impl<T> Sync for StringModel<T>
impl<T> Unpin for StringModel<T>where
T: Unpin,
impl<T> UnsafeUnpin for StringModel<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for StringModel<T>where
T: UnwindSafe,
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