pub struct NoiseGenerator<T: Transcendental> { /* private fields */ }Expand description
Coloured noise generator (white, pink, brown, blue, violet).
Uses a Xorshift RNG for the white noise source and applies filtering / integration for the coloured variants.
Implementations§
Source§impl<T: Transcendental> NoiseGenerator<T>
impl<T: Transcendental> NoiseGenerator<T>
Trait Implementations§
Source§impl<T: Transcendental> Algorithm<T> for NoiseGenerator<T>
impl<T: Transcendental> Algorithm<T> for NoiseGenerator<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: Transcendental> Generator<T> for NoiseGenerator<T>
impl<T: Transcendental> Generator<T> for NoiseGenerator<T>
Source§fn set_frequency(&mut self, _freq: f32)
fn set_frequency(&mut self, _freq: f32)
Set frequency
Source§fn set_amplitude(&mut self, amp: T)
fn set_amplitude(&mut self, amp: T)
Set amplitude
Source§fn reset_phase(&mut self)
fn reset_phase(&mut self)
Reset phase to 0
Auto Trait Implementations§
impl<T> Freeze for NoiseGenerator<T>where
T: Freeze,
impl<T> RefUnwindSafe for NoiseGenerator<T>where
T: RefUnwindSafe,
impl<T> Send for NoiseGenerator<T>
impl<T> Sync for NoiseGenerator<T>
impl<T> Unpin for NoiseGenerator<T>where
T: Unpin,
impl<T> UnsafeUnpin for NoiseGenerator<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for NoiseGenerator<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