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§
Source§impl 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§
Source§impl Clone for TriggerPhaseClock
impl Clone for TriggerPhaseClock
Source§fn clone(&self) -> TriggerPhaseClock
fn clone(&self) -> TriggerPhaseClock
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 moreSource§impl Debug for TriggerPhaseClock
impl Debug for TriggerPhaseClock
impl Copy for TriggerPhaseClock
Auto Trait Implementations§
impl Freeze for TriggerPhaseClock
impl RefUnwindSafe for TriggerPhaseClock
impl Send for TriggerPhaseClock
impl Sync for TriggerPhaseClock
impl Unpin for TriggerPhaseClock
impl UnwindSafe for TriggerPhaseClock
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