pub struct CavityArray<T: Transcendental, const MAX_CAVITIES: usize> { /* private fields */ }Expand description
1D array of N coupled Helmholtz cavities.
Each cavity is coupled to its nearest neighbors with strength coupling.
The array supports wave propagation experiments — injecting a signal at
input_index and measuring at output_index reveals acoustic band gaps,
slow-wave propagation, and nonlinear dispersion effects.
Implementations§
Source§impl<T: Transcendental, const MAX_CAVITIES: usize> CavityArray<T, MAX_CAVITIES>
impl<T: Transcendental, const MAX_CAVITIES: usize> CavityArray<T, MAX_CAVITIES>
Sourcepub fn new(params: CavityArrayParams<T>, sample_rate: f32) -> Self
pub fn new(params: CavityArrayParams<T>, sample_rate: f32) -> Self
Create a cavity array with N identical Helmholtz cavities.
Trait Implementations§
Source§impl<T: Transcendental, const MAX_CAVITIES: usize> Algorithm<T> for CavityArray<T, MAX_CAVITIES>
impl<T: Transcendental, const MAX_CAVITIES: usize> Algorithm<T> for CavityArray<T, MAX_CAVITIES>
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, const MAX_CAVITIES: usize> Clone for CavityArray<T, MAX_CAVITIES>
impl<T: Clone + Transcendental, const MAX_CAVITIES: usize> Clone for CavityArray<T, MAX_CAVITIES>
Source§fn clone(&self) -> CavityArray<T, MAX_CAVITIES>
fn clone(&self) -> CavityArray<T, MAX_CAVITIES>
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, const MAX_CAVITIES: usize> Debug for CavityArray<T, MAX_CAVITIES>
impl<T: Debug + Transcendental, const MAX_CAVITIES: usize> Debug for CavityArray<T, MAX_CAVITIES>
Source§impl<T: Transcendental, const MAX_CAVITIES: usize> ParameterizedAlgorithm<T> for CavityArray<T, MAX_CAVITIES>
impl<T: Transcendental, const MAX_CAVITIES: usize> ParameterizedAlgorithm<T> for CavityArray<T, MAX_CAVITIES>
Source§type Params = CavityArrayParams<T>
type Params = CavityArrayParams<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, const MAX_CAVITIES: usize> Freeze for CavityArray<T, MAX_CAVITIES>where
T: Freeze,
impl<T, const MAX_CAVITIES: usize> RefUnwindSafe for CavityArray<T, MAX_CAVITIES>where
T: RefUnwindSafe,
impl<T, const MAX_CAVITIES: usize> Send for CavityArray<T, MAX_CAVITIES>
impl<T, const MAX_CAVITIES: usize> Sync for CavityArray<T, MAX_CAVITIES>
impl<T, const MAX_CAVITIES: usize> Unpin for CavityArray<T, MAX_CAVITIES>where
T: Unpin,
impl<T, const MAX_CAVITIES: usize> UnsafeUnpin for CavityArray<T, MAX_CAVITIES>where
T: UnsafeUnpin,
impl<T, const MAX_CAVITIES: usize> UnwindSafe for CavityArray<T, MAX_CAVITIES>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