pub struct Kit { /* private fields */ }
Expand description
Represents a kit in the analog rytm.
It does not map identically to the structure in the firmware.
Implementations§
source§impl Kit
impl Kit
sourcepub fn try_default(kit_index: usize) -> Result<Self, RytmError>
pub fn try_default(kit_index: usize) -> Result<Self, RytmError>
Makes a new kit with the given index complying to project defaults.
Range: 0..=127
sourcepub fn work_buffer_default() -> Self
pub fn work_buffer_default() -> Self
Makes a new kit in the work buffer complying to project defaults as if it comes from the work buffer.
sourcepub fn set_name(&mut self, name: &str) -> Result<(), RytmError>
pub fn set_name(&mut self, name: &str) -> Result<(), RytmError>
Sets the name of the kit.
Errors
The name must be ASCII and have a length of 15 characters or less. Other cases will result in an error.
sourcepub const fn sounds(&self) -> &[Sound; 12]
pub const fn sounds(&self) -> &[Sound; 12]
Returns the sounds assigned to the kit in the order of the tracks.
sourcepub fn sounds_mut(&mut self) -> &mut [Sound; 12]
pub fn sounds_mut(&mut self) -> &mut [Sound; 12]
Returns the sounds assigned to the kit in the order of the tracks mutably.
sourcepub fn set_track_level(
&mut self,
track_index: usize,
level: usize
) -> Result<(), RytmError>
pub fn set_track_level( &mut self, track_index: usize, level: usize ) -> Result<(), RytmError>
Sets the level of a track.
Range 0..=12
12th track is the fx track.
sourcepub fn set_all_track_levels(&mut self, level: usize) -> Result<(), RytmError>
pub fn set_all_track_levels(&mut self, level: usize) -> Result<(), RytmError>
Sets the level of all tracks including the Fx track.
Range 0..=127
sourcepub fn set_a_range_of_track_levels(
&mut self,
range: Range<usize>,
level: usize
) -> Result<(), RytmError>
pub fn set_a_range_of_track_levels( &mut self, range: Range<usize>, level: usize ) -> Result<(), RytmError>
Sets the level of a range of tracks.
12th track is the fx track.
Maximum range 0..=12
Level range 0..=127
sourcepub fn track_level(&self, track_index: usize) -> Result<usize, RytmError>
pub fn track_level(&self, track_index: usize) -> Result<usize, RytmError>
Gets the level of a track.
Range 0..=12
sourcepub fn track_levels(&self) -> Vec<usize>
pub fn track_levels(&self) -> Vec<usize>
Gets the level of all tracks including the Fx track.
Range 0..=127
sourcepub fn range_of_track_levels(
&self,
range: Range<usize>
) -> Result<Vec<usize>, RytmError>
pub fn range_of_track_levels( &self, range: Range<usize> ) -> Result<Vec<usize>, RytmError>
Gets the level of a range of tracks.
12th track is the fx track.
Maximum range 0..=12
Level range 0..=127
Errors
Returns an error if the range is out of bounds.
sourcepub const fn structure_version(&self) -> u32
pub const fn structure_version(&self) -> u32
Returns the version of the kit structure.
sourcepub fn track_retrig_settings(
&self,
track_index: usize
) -> Result<&TrackRetrigMenu, RytmError>
pub fn track_retrig_settings( &self, track_index: usize ) -> Result<&TrackRetrigMenu, RytmError>
Gets the retrig menu of a track
12th track is the fx track.
Range 0..=12
sourcepub fn track_retrig_settings_mut(
&mut self,
track_index: usize
) -> Result<&mut TrackRetrigMenu, RytmError>
pub fn track_retrig_settings_mut( &mut self, track_index: usize ) -> Result<&mut TrackRetrigMenu, RytmError>
Gets the retrig menu of a track mutably
12th track is the fx track.
Range 0..=12
sourcepub fn fx_delay_mut(&mut self) -> &mut FxDelay
pub fn fx_delay_mut(&mut self) -> &mut FxDelay
Gets the fx delay parameters mutably.
sourcepub const fn fx_distortion(&self) -> &FxDistortion
pub const fn fx_distortion(&self) -> &FxDistortion
Gets the fx distortion parameters.
sourcepub fn fx_distortion_mut(&mut self) -> &mut FxDistortion
pub fn fx_distortion_mut(&mut self) -> &mut FxDistortion
Gets the fx distortion parameters mutably.
sourcepub fn fx_reverb_mut(&mut self) -> &mut FxReverb
pub fn fx_reverb_mut(&mut self) -> &mut FxReverb
Gets the fx reverb parameters mutably.
sourcepub const fn fx_compressor(&self) -> &FxCompressor
pub const fn fx_compressor(&self) -> &FxCompressor
Gets the fx compressor parameters.
sourcepub fn fx_compressor_mut(&mut self) -> &mut FxCompressor
pub fn fx_compressor_mut(&mut self) -> &mut FxCompressor
Gets the fx compressor parameters mutably.
sourcepub fn fx_lfo_mut(&mut self) -> &mut FxLfo
pub fn fx_lfo_mut(&mut self) -> &mut FxLfo
Gets the fx lfo parameters mutably.
sourcepub fn set_control_in_1_mod_target_1(
&mut self,
control_in_1_mod_target_1: ControlInModTarget
)
pub fn set_control_in_1_mod_target_1( &mut self, control_in_1_mod_target_1: ControlInModTarget )
Sets the control in 1 mod target 1
sourcepub fn set_control_in_1_mod_target_2(
&mut self,
control_in_1_mod_target_2: ControlInModTarget
)
pub fn set_control_in_1_mod_target_2( &mut self, control_in_1_mod_target_2: ControlInModTarget )
Sets the control in 1 mod target 2
sourcepub fn set_control_in_1_mod_target_3(
&mut self,
control_in_1_mod_target_3: ControlInModTarget
)
pub fn set_control_in_1_mod_target_3( &mut self, control_in_1_mod_target_3: ControlInModTarget )
Sets the control in 1 mod target 3
sourcepub fn set_control_in_1_mod_target_4(
&mut self,
control_in_1_mod_target_4: ControlInModTarget
)
pub fn set_control_in_1_mod_target_4( &mut self, control_in_1_mod_target_4: ControlInModTarget )
Sets the control in 1 mod target 4
sourcepub fn set_control_in_2_mod_target_1(
&mut self,
control_in_2_mod_target_1: ControlInModTarget
)
pub fn set_control_in_2_mod_target_1( &mut self, control_in_2_mod_target_1: ControlInModTarget )
Sets the control in 2 mod target 1
sourcepub fn set_control_in_2_mod_target_2(
&mut self,
control_in_2_mod_target_2: ControlInModTarget
)
pub fn set_control_in_2_mod_target_2( &mut self, control_in_2_mod_target_2: ControlInModTarget )
Sets the control in 2 mod target 2
sourcepub fn set_control_in_2_mod_target_3(
&mut self,
control_in_2_mod_target_3: ControlInModTarget
)
pub fn set_control_in_2_mod_target_3( &mut self, control_in_2_mod_target_3: ControlInModTarget )
Sets the control in 2 mod target 3
sourcepub fn set_control_in_2_mod_target_4(
&mut self,
control_in_2_mod_target_4: ControlInModTarget
)
pub fn set_control_in_2_mod_target_4( &mut self, control_in_2_mod_target_4: ControlInModTarget )
Sets the control in 2 mod target 4
sourcepub fn set_control_in_1_mod_amt_1(
&mut self,
control_in_1_mod_amt_1: isize
) -> Result<(), RytmError>
pub fn set_control_in_1_mod_amt_1( &mut self, control_in_1_mod_amt_1: isize ) -> Result<(), RytmError>
Sets the control in 1 mod amt 1
Range: -128..=127
sourcepub fn set_control_in_1_mod_amt_2(
&mut self,
control_in_1_mod_amt_2: isize
) -> Result<(), RytmError>
pub fn set_control_in_1_mod_amt_2( &mut self, control_in_1_mod_amt_2: isize ) -> Result<(), RytmError>
Sets the control in 1 mod amt 2
Range: -128..=127
sourcepub fn set_control_in_1_mod_amt_3(
&mut self,
control_in_1_mod_amt_3: isize
) -> Result<(), RytmError>
pub fn set_control_in_1_mod_amt_3( &mut self, control_in_1_mod_amt_3: isize ) -> Result<(), RytmError>
Sets the control in 1 mod amt 3
Range: -128..=127
sourcepub fn set_control_in_1_mod_amt_4(
&mut self,
control_in_1_mod_amt_4: isize
) -> Result<(), RytmError>
pub fn set_control_in_1_mod_amt_4( &mut self, control_in_1_mod_amt_4: isize ) -> Result<(), RytmError>
Sets the control in 1 mod amt 4
Range: -128..=127
sourcepub fn set_control_in_2_mod_amt_1(
&mut self,
control_in_2_mod_amt_1: isize
) -> Result<(), RytmError>
pub fn set_control_in_2_mod_amt_1( &mut self, control_in_2_mod_amt_1: isize ) -> Result<(), RytmError>
Sets the control in 2 mod amt 1
Range: -128..=127
sourcepub fn set_control_in_2_mod_amt_2(
&mut self,
control_in_2_mod_amt_2: isize
) -> Result<(), RytmError>
pub fn set_control_in_2_mod_amt_2( &mut self, control_in_2_mod_amt_2: isize ) -> Result<(), RytmError>
Sets the control in 2 mod amt 2
Range: -128..=127
sourcepub fn set_control_in_2_mod_amt_3(
&mut self,
control_in_2_mod_amt_3: isize
) -> Result<(), RytmError>
pub fn set_control_in_2_mod_amt_3( &mut self, control_in_2_mod_amt_3: isize ) -> Result<(), RytmError>
Sets the control in 2 mod amt 3
Range: -128..=127
sourcepub fn set_control_in_2_mod_amt_4(
&mut self,
control_in_2_mod_amt_4: isize
) -> Result<(), RytmError>
pub fn set_control_in_2_mod_amt_4( &mut self, control_in_2_mod_amt_4: isize ) -> Result<(), RytmError>
Sets the control in 2 mod amt 4
Range: -128..=127
sourcepub const fn control_in_1_mod_target_1(&self) -> ControlInModTarget
pub const fn control_in_1_mod_target_1(&self) -> ControlInModTarget
Gets the control in 1 mod target 1
sourcepub const fn control_in_1_mod_target_2(&self) -> ControlInModTarget
pub const fn control_in_1_mod_target_2(&self) -> ControlInModTarget
Gets the control in 1 mod target 2
sourcepub const fn control_in_1_mod_target_3(&self) -> ControlInModTarget
pub const fn control_in_1_mod_target_3(&self) -> ControlInModTarget
Gets the control in 1 mod target 3
sourcepub const fn control_in_1_mod_target_4(&self) -> ControlInModTarget
pub const fn control_in_1_mod_target_4(&self) -> ControlInModTarget
Gets the control in 1 mod target 4
sourcepub const fn control_in_2_mod_target_1(&self) -> ControlInModTarget
pub const fn control_in_2_mod_target_1(&self) -> ControlInModTarget
Gets the control in 2 mod target 1
sourcepub const fn control_in_2_mod_target_2(&self) -> ControlInModTarget
pub const fn control_in_2_mod_target_2(&self) -> ControlInModTarget
Gets the control in 2 mod target 2
sourcepub const fn control_in_2_mod_target_3(&self) -> ControlInModTarget
pub const fn control_in_2_mod_target_3(&self) -> ControlInModTarget
Gets the control in 2 mod target 3
sourcepub const fn control_in_2_mod_target_4(&self) -> ControlInModTarget
pub const fn control_in_2_mod_target_4(&self) -> ControlInModTarget
Gets the control in 2 mod target 4
sourcepub const fn control_in_1_mod_amt_1(&self) -> isize
pub const fn control_in_1_mod_amt_1(&self) -> isize
Gets the control in 1 mod amt 1
Range: -128..=127
sourcepub const fn control_in_1_mod_amt_2(&self) -> isize
pub const fn control_in_1_mod_amt_2(&self) -> isize
Gets the control in 1 mod amt 2
Range: -128..=127
sourcepub const fn control_in_1_mod_amt_3(&self) -> isize
pub const fn control_in_1_mod_amt_3(&self) -> isize
Gets the control in 1 mod amt 3
Range: -128..=127
sourcepub const fn control_in_1_mod_amt_4(&self) -> isize
pub const fn control_in_1_mod_amt_4(&self) -> isize
Gets the control in 1 mod amt 4
Range: -128..=127
sourcepub const fn control_in_2_mod_amt_1(&self) -> isize
pub const fn control_in_2_mod_amt_1(&self) -> isize
Gets the control in 2 mod amt 1
Range: -128..=127
sourcepub const fn control_in_2_mod_amt_2(&self) -> isize
pub const fn control_in_2_mod_amt_2(&self) -> isize
Gets the control in 2 mod amt 2
Range: -128..=127
sourcepub const fn control_in_2_mod_amt_3(&self) -> isize
pub const fn control_in_2_mod_amt_3(&self) -> isize
Gets the control in 2 mod amt 3
Range: -128..=127
sourcepub const fn control_in_2_mod_amt_4(&self) -> isize
pub const fn control_in_2_mod_amt_4(&self) -> isize
Gets the control in 2 mod amt 4
Range: -128..=127