pub struct LfoAutomaton { /* private fields */ }Expand description
An LFO automaton that generates periodic modulation signals.
Supports multiple waveform shapes, configurable frequency, amplitude, offset, pulse width, and random-walk rate.
Implementations§
Source§impl LfoAutomaton
impl LfoAutomaton
Sourcepub fn new(
name: &str,
frequency: f64,
amplitude: f64,
offset: f64,
waveform: LfoWaveform,
) -> Self
pub fn new( name: &str, frequency: f64, amplitude: f64, offset: f64, waveform: LfoWaveform, ) -> Self
Create a new LFO automaton.
Sourcepub fn with_range(self, range: Range) -> Self
pub fn with_range(self, range: Range) -> Self
Set the output range.
Sourcepub fn with_pulse_width(self, width: f64) -> Self
pub fn with_pulse_width(self, width: f64) -> Self
Set the pulse width for the Pulse waveform (0.01 – 0.99).
Sourcepub fn with_walk_rate(self, rate: f64) -> Self
pub fn with_walk_rate(self, rate: f64) -> Self
Set the random-walk step rate.
Trait Implementations§
Source§impl Automaton for LfoAutomaton
impl Automaton for LfoAutomaton
Source§fn step(
&self,
time: Time,
action: &Self::Action,
state: &Self::State,
) -> (Self::State, Option<f64>)
fn step( &self, time: Time, action: &Self::Action, state: &Self::State, ) -> (Self::State, Option<f64>)
Advance the automaton by one time step. Read more
Source§fn initial_state(&self) -> Self::State
fn initial_state(&self) -> Self::State
Return the initial state.
Source§fn extract_value(&self, state: &Self::State) -> f64
fn extract_value(&self, state: &Self::State) -> f64
Extract the output value from the state.
Source§impl Clone for LfoAutomaton
impl Clone for LfoAutomaton
Source§fn clone(&self) -> LfoAutomaton
fn clone(&self) -> LfoAutomaton
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LfoAutomaton
impl RefUnwindSafe for LfoAutomaton
impl Send for LfoAutomaton
impl Sync for LfoAutomaton
impl Unpin for LfoAutomaton
impl UnsafeUnpin for LfoAutomaton
impl UnwindSafe for LfoAutomaton
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