pub struct TrackRetrigMenu { /* private fields */ }
Expand description
Represents the retrig settings for a track.
Implementations§
source§impl TrackRetrigMenu
impl TrackRetrigMenu
pub fn try_default_for_track(track_index: usize) -> Result<Self, RytmError>
sourcepub fn set_rate(&mut self, rate: RetrigRate)
pub fn set_rate(&mut self, rate: RetrigRate)
Sets the retrig rate.
sourcepub fn set_length(&mut self, length: Length)
pub fn set_length(&mut self, length: Length)
Sets the retrig length.
sourcepub fn set_velocity_curve(
&mut self,
velocity_curve: isize
) -> Result<(), RytmError>
pub fn set_velocity_curve( &mut self, velocity_curve: isize ) -> Result<(), RytmError>
Sets the velocity curve.
Range: -128..=127
sourcepub fn set_always_on(&mut self, always_on: bool)
pub fn set_always_on(&mut self, always_on: bool)
Sets whether the retrig is always on.
If true
, the retrig is always on.
sourcepub const fn track_index(&self) -> usize
pub const fn track_index(&self) -> usize
Returns the track index. The track which this setting belongs to.
Range: 0..=12
sourcepub const fn rate(&self) -> RetrigRate
pub const fn rate(&self) -> RetrigRate
Returns the retrig rate.
sourcepub const fn velocity_curve(&self) -> i8
pub const fn velocity_curve(&self) -> i8
Returns the velocity curve.
Range: -128..=127
Trait Implementations§
source§impl Clone for TrackRetrigMenu
impl Clone for TrackRetrigMenu
source§fn clone(&self) -> TrackRetrigMenu
fn clone(&self) -> TrackRetrigMenu
Returns a copy 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 TrackRetrigMenu
impl Debug for TrackRetrigMenu
source§impl<'de> Deserialize<'de> for TrackRetrigMenu
impl<'de> Deserialize<'de> for TrackRetrigMenu
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
source§impl Hash for TrackRetrigMenu
impl Hash for TrackRetrigMenu
source§impl Ord for TrackRetrigMenu
impl Ord for TrackRetrigMenu
source§fn cmp(&self, other: &TrackRetrigMenu) -> Ordering
fn cmp(&self, other: &TrackRetrigMenu) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
source§impl PartialEq for TrackRetrigMenu
impl PartialEq for TrackRetrigMenu
source§fn eq(&self, other: &TrackRetrigMenu) -> bool
fn eq(&self, other: &TrackRetrigMenu) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for TrackRetrigMenu
impl PartialOrd for TrackRetrigMenu
source§fn partial_cmp(&self, other: &TrackRetrigMenu) -> Option<Ordering>
fn partial_cmp(&self, other: &TrackRetrigMenu) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl Serialize for TrackRetrigMenu
impl Serialize for TrackRetrigMenu
impl Copy for TrackRetrigMenu
impl Eq for TrackRetrigMenu
impl StructuralEq for TrackRetrigMenu
impl StructuralPartialEq for TrackRetrigMenu
Auto Trait Implementations§
impl RefUnwindSafe for TrackRetrigMenu
impl Send for TrackRetrigMenu
impl Sync for TrackRetrigMenu
impl Unpin for TrackRetrigMenu
impl UnwindSafe for TrackRetrigMenu
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