pub struct Track { /* private fields */ }
Expand description
Represents a single track in a pattern.
If the track index is 12 then this is the FX track.
Implementations§
source§impl Track
impl Track
sourcepub fn trigs_mut(&mut self) -> &mut [Trig; 64]
pub fn trigs_mut(&mut self) -> &mut [Trig; 64]
Returns a mutable reference to the trigs in this track.
64 trigs in total.
sourcepub fn set_default_trig_note(
&mut self,
default_trig_note: usize
) -> Result<(), RytmError>
pub fn set_default_trig_note( &mut self, default_trig_note: usize ) -> Result<(), RytmError>
Sets the default note for any trig in this track.
Range 0..=127
Follows the midi note convention. C-4 is 0x3C
.
sourcepub fn set_default_trig_velocity(
&mut self,
default_trig_velocity: usize
) -> Result<(), RytmError>
pub fn set_default_trig_velocity( &mut self, default_trig_velocity: usize ) -> Result<(), RytmError>
Sets the default velocity for any trig in this track.
Range 0..=127
sourcepub fn set_default_trig_note_length(&mut self, default_trig_note_length: Length)
pub fn set_default_trig_note_length(&mut self, default_trig_note_length: Length)
Sets the default note length for any trig in this track.
Range 0..=127
sourcepub fn set_default_trig_flags<F: Into<TrigFlags>>(
&mut self,
default_trig_flags: F
)
pub fn set_default_trig_flags<F: Into<TrigFlags>>( &mut self, default_trig_flags: F )
Sets the default trig flags for any trig in this track.
sourcepub fn set_default_trig_probability(
&mut self,
default_trig_probability: usize
) -> Result<(), RytmError>
pub fn set_default_trig_probability( &mut self, default_trig_probability: usize ) -> Result<(), RytmError>
Sets the default trig probability for any trig in this track.
Range 0..=100
sourcepub fn set_number_of_steps(
&mut self,
number_of_steps: usize
) -> Result<(), RytmError>
pub fn set_number_of_steps( &mut self, number_of_steps: usize ) -> Result<(), RytmError>
Sets the number of steps in this track.
Range 1..=64
sourcepub fn set_quantize_amount(
&mut self,
quantize_amount: usize
) -> Result<(), RytmError>
pub fn set_quantize_amount( &mut self, quantize_amount: usize ) -> Result<(), RytmError>
Sets the quantize amount for this track.
Range 0..=127
sourcepub fn set_sends_midi(&mut self, sends_midi: bool)
pub fn set_sends_midi(&mut self, sends_midi: bool)
Sets whether this track sends MIDI.
sourcepub fn set_euclidean_mode(&mut self, euclidean_mode: bool)
pub fn set_euclidean_mode(&mut self, euclidean_mode: bool)
Sets whether this track is in euclidean mode.
sourcepub fn set_euclidean_pl1(
&mut self,
euclidean_pl1: usize
) -> Result<(), RytmError>
pub fn set_euclidean_pl1( &mut self, euclidean_pl1: usize ) -> Result<(), RytmError>
Sets the euclidean pulse length 1 for this track.
Number of pulses.
Range 0..=64
sourcepub fn set_euclidean_pl2(
&mut self,
euclidean_pl2: usize
) -> Result<(), RytmError>
pub fn set_euclidean_pl2( &mut self, euclidean_pl2: usize ) -> Result<(), RytmError>
Sets the euclidean pulse length 2 for this track.
Number of pulses.
Range 0..=64
sourcepub fn set_euclidean_ro1(
&mut self,
euclidean_ro1: usize
) -> Result<(), RytmError>
pub fn set_euclidean_ro1( &mut self, euclidean_ro1: usize ) -> Result<(), RytmError>
Sets the euclidean rotation 1 for this track.
Range 0..=126
Middle point 63
sourcepub fn set_euclidean_ro2(
&mut self,
euclidean_ro2: usize
) -> Result<(), RytmError>
pub fn set_euclidean_ro2( &mut self, euclidean_ro2: usize ) -> Result<(), RytmError>
Sets the euclidean rotation 2 for this track.
Range 0..=126
Middle point 63
sourcepub fn set_euclidean_tro(
&mut self,
euclidean_tro: usize
) -> Result<(), RytmError>
pub fn set_euclidean_tro( &mut self, euclidean_tro: usize ) -> Result<(), RytmError>
Sets the euclidean track rotation for this track.
Range 0..=126
Middle point 63
sourcepub fn set_pad_scale(&mut self, pad_scale: PadScale)
pub fn set_pad_scale(&mut self, pad_scale: PadScale)
Sets the pad scale for this track.
sourcepub fn set_root_note(&mut self, root_note: RootNote)
pub fn set_root_note(&mut self, root_note: RootNote)
Sets the root note for this track.
sourcepub const fn trigs(&self) -> &[Trig; 64]
pub const fn trigs(&self) -> &[Trig; 64]
Returns a reference to the trigs in this track.
64 trigs in total.
sourcepub const fn default_trig_note(&self) -> usize
pub const fn default_trig_note(&self) -> usize
Returns the default note for any trig in this track.
Range 0..=127
Follows the midi note convention. C-4 is 0x3C
.
sourcepub const fn default_trig_velocity(&self) -> usize
pub const fn default_trig_velocity(&self) -> usize
Returns the default velocity for any trig in this track.
Range 0..=127
sourcepub const fn default_trig_note_length(&self) -> Length
pub const fn default_trig_note_length(&self) -> Length
Returns the default note length for any trig in this track.
sourcepub const fn default_trig_flags(&self) -> TrigFlags
pub const fn default_trig_flags(&self) -> TrigFlags
Returns the default trig flags for any trig in this track.
sourcepub const fn default_trig_probability(&self) -> usize
pub const fn default_trig_probability(&self) -> usize
Returns the default trig probability for any trig in this track.
Range 0..=100
sourcepub const fn number_of_steps(&self) -> usize
pub const fn number_of_steps(&self) -> usize
Returns the number of steps in this track.
Range 1..=64
sourcepub const fn quantize_amount(&self) -> usize
pub const fn quantize_amount(&self) -> usize
Returns the quantize amount for this track.
Range 0..=127
sourcepub const fn sends_midi(&self) -> bool
pub const fn sends_midi(&self) -> bool
Returns whether this track sends MIDI.
sourcepub const fn euclidean_mode(&self) -> bool
pub const fn euclidean_mode(&self) -> bool
Returns whether this track is in euclidean mode.
sourcepub const fn euclidean_pl1(&self) -> usize
pub const fn euclidean_pl1(&self) -> usize
Returns the euclidean pulse length 1 for this track.
Number of pulses.
Range 0..=64
sourcepub const fn euclidean_pl2(&self) -> usize
pub const fn euclidean_pl2(&self) -> usize
Returns the euclidean pulse length 2 for this track.
Number of pulses.
Range 0..=64
sourcepub const fn euclidean_ro1(&self) -> usize
pub const fn euclidean_ro1(&self) -> usize
Returns the euclidean rotation 1 for this track.
Range 0..=126
Middle point 63
sourcepub const fn euclidean_ro2(&self) -> usize
pub const fn euclidean_ro2(&self) -> usize
Returns the euclidean rotation 2 for this track.
Range 0..=126
Middle point 63
sourcepub const fn euclidean_tro(&self) -> usize
pub const fn euclidean_tro(&self) -> usize
Returns the euclidean track rotation for this track.
Range 0..=126
Middle point 63
sourcepub fn clear_all_plocks(&self)
pub fn clear_all_plocks(&self)
Clears all the parameter locks for this track.
sourcepub const fn owner_pattern_index(&self) -> usize
pub const fn owner_pattern_index(&self) -> usize
Returns the index of the pattern that owns this track.