pub enum StepPlayMode {
OneShot,
Loop,
PingPong,
Random,
Brownian,
}Expand description
Playback mode for a pattern.
Variants§
OneShot
Play through once then stop.
Loop
Loop the pattern indefinitely.
PingPong
Forward then backward (ping-pong).
Random
Pick steps at random.
Brownian
Brownian motion — drift to neighbouring steps.
Implementations§
Source§impl StepPlayMode
impl StepPlayMode
Sourcepub fn next_index(&self, current: usize, len: usize) -> usize
pub fn next_index(&self, current: usize, len: usize) -> usize
Pick the next step index given the current one and the pattern length.
Trait Implementations§
Source§impl Clone for StepPlayMode
impl Clone for StepPlayMode
Source§fn clone(&self) -> StepPlayMode
fn clone(&self) -> StepPlayMode
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 StepPlayMode
impl Debug for StepPlayMode
Source§impl PartialEq for StepPlayMode
impl PartialEq for StepPlayMode
impl Copy for StepPlayMode
impl StructuralPartialEq for StepPlayMode
Auto Trait Implementations§
impl Freeze for StepPlayMode
impl RefUnwindSafe for StepPlayMode
impl Send for StepPlayMode
impl Sync for StepPlayMode
impl Unpin for StepPlayMode
impl UnsafeUnpin for StepPlayMode
impl UnwindSafe for StepPlayMode
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