Struct synfx_dsp::TriggerPhaseClock
source · [−]pub struct TriggerPhaseClock { /* private fields */ }
Expand description
Generates a phase signal from a trigger/gate input signal.
This helper allows you to measure the distance between trigger or gate pulses and generates a phase signal for you that increases from 0.0 to 1.0.
Implementations
sourceimpl TriggerPhaseClock
impl TriggerPhaseClock
sourcepub fn sync(&mut self)
pub fn sync(&mut self)
Restart the phase clock. It will count up from 0.0 again on TriggerPhaseClock::next_phase.
sourcepub fn next_phase(&mut self, clock_limit: f64, trigger_in: f32) -> f64
pub fn next_phase(&mut self, clock_limit: f64, trigger_in: f32) -> f64
Generate the phase signal of this clock.
clock_limit
- The maximum number of samples to detect two trigger signals in.trigger_in
- Trigger signal input.
Trait Implementations
sourceimpl Clone for TriggerPhaseClock
impl Clone for TriggerPhaseClock
sourcefn clone(&self) -> TriggerPhaseClock
fn clone(&self) -> TriggerPhaseClock
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for TriggerPhaseClock
impl Debug for TriggerPhaseClock
impl Copy for TriggerPhaseClock
Auto Trait Implementations
impl RefUnwindSafe for TriggerPhaseClock
impl Send for TriggerPhaseClock
impl Sync for TriggerPhaseClock
impl Unpin for TriggerPhaseClock
impl UnwindSafe for TriggerPhaseClock
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more