pub struct GridPosition {
pub beat_in_bar: u32,
pub bar_index: u32,
pub bar_phase: f32,
pub beat_phase: f32,
pub running: bool,
}Expand description
Where the grid stands this hop.
Fields§
§beat_in_bar: u32Which beat of the bar this is, 0..BEATS_PER_BAR. Which one is beat 1
is not decided here — downbeat folds over this and
finds that.
bar_index: u32Monotone bar counter since the grid started running.
bar_phase: f32Position across the bar in [0, 1), including the fraction through the
current beat.
beat_phase: f32Position across the current beat in [0, 1).
running: boolWhether the grid is advancing. False until the tempo tracker warms up, and the position is held rather than reset while it is false.
Trait Implementations§
Source§impl Clone for GridPosition
impl Clone for GridPosition
Source§fn clone(&self) -> GridPosition
fn clone(&self) -> GridPosition
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 Debug for GridPosition
impl Debug for GridPosition
Source§impl Default for GridPosition
impl Default for GridPosition
Source§fn default() -> GridPosition
fn default() -> GridPosition
Returns the “default value” for a type. Read more
Source§impl PartialEq for GridPosition
impl PartialEq for GridPosition
Source§fn eq(&self, other: &GridPosition) -> bool
fn eq(&self, other: &GridPosition) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for GridPosition
impl StructuralPartialEq for GridPosition
Auto Trait Implementations§
impl Freeze for GridPosition
impl RefUnwindSafe for GridPosition
impl Send for GridPosition
impl Sync for GridPosition
impl Unpin for GridPosition
impl UnsafeUnpin for GridPosition
impl UnwindSafe for GridPosition
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