pub struct Settings { /* private fields */ }
Expand description
Represents settings in the analog rytm.
It does not map identically to the relevant structure in the firmware.
Settings may not be a familiar structure for all, to understand what kind of settings are available, please check the methods of this struct.
Implementations§
source§impl Settings
impl Settings
sourcepub fn set_bpm(&mut self, bpm: f32) -> Result<(), RytmError>
pub fn set_bpm(&mut self, bpm: f32) -> Result<(), RytmError>
Sets the BPM for the entire project.
Range 30.0..=300.0
This is only effective when project level bpm is enabled.
sourcepub fn set_selected_track(
&mut self,
track_index: usize
) -> Result<(), RytmError>
pub fn set_selected_track( &mut self, track_index: usize ) -> Result<(), RytmError>
Sets the selected track.
Range 0..=11
Sets the selected parameter menu item.
The six sequential square buttons on the right side of the Analog Rytm MKII.
Sets the selected fx menu item.
The six sequential square buttons on the right side of the Analog Rytm MKII.
The fx menu is only available when the FX button is pressed.
sourcepub fn set_selected_page(&mut self, page_index: usize) -> Result<(), RytmError>
pub fn set_selected_page(&mut self, page_index: usize) -> Result<(), RytmError>
Sets the selected page.
The [PAGE]
button on the Analog Rytm MKII.
Range 0..=3
sourcepub fn set_selected_mode(&mut self, sequencer_mode: SequencerMode)
pub fn set_selected_mode(&mut self, sequencer_mode: SequencerMode)
Sets the selected sequencer mode.
sourcepub fn set_selected_pattern_mode(&mut self, pattern_mode: PatternMode)
pub fn set_selected_pattern_mode(&mut self, pattern_mode: PatternMode)
Sets the selected pattern mode.
sourcepub fn set_mute_flags(&mut self, mute_flags: u16) -> Result<(), RytmError>
pub fn set_mute_flags(&mut self, mute_flags: u16) -> Result<(), RytmError>
Sets the mute flags for sounds.
Range 0..=0b1111_1111_1111
sourcepub fn mute_sound(&mut self, sound_index: usize) -> Result<(), RytmError>
pub fn mute_sound(&mut self, sound_index: usize) -> Result<(), RytmError>
Mutes a sound by sound index.
Range 0..=11
sourcepub fn unmute_sound(&mut self, sound_index: usize) -> Result<(), RytmError>
pub fn unmute_sound(&mut self, sound_index: usize) -> Result<(), RytmError>
Unmute a sound by sound index.
Range 0..=11
sourcepub fn toggle_mute_sound(&mut self, sound_index: usize) -> Result<(), RytmError>
pub fn toggle_mute_sound(&mut self, sound_index: usize) -> Result<(), RytmError>
Toggles the mute state of a sound by sound index.
Range 0..=11
sourcepub fn mute_range_of_sounds(
&mut self,
range: Range<usize>
) -> Result<(), RytmError>
pub fn mute_range_of_sounds( &mut self, range: Range<usize> ) -> Result<(), RytmError>
Mutes a range of sounds.
Maximum range 0..=11
Errors
Returns an error if the range is out of bounds.
sourcepub fn unmute_range_of_sounds(
&mut self,
range: Range<usize>
) -> Result<(), RytmError>
pub fn unmute_range_of_sounds( &mut self, range: Range<usize> ) -> Result<(), RytmError>
Unmute a range of sounds.
Maximum range 0..=11
Errors
Returns an error if the range is out of bounds.
sourcepub fn toggle_mute_range_of_sounds(
&mut self,
range: Range<usize>
) -> Result<(), RytmError>
pub fn toggle_mute_range_of_sounds( &mut self, range: Range<usize> ) -> Result<(), RytmError>
Toggles the mute state of a range of sounds.
Maximum range 0..=11
Errors
Returns an error if the range is out of bounds.
sourcepub fn set_fixed_velocity_enable(&mut self, fixed_velocity_enable: bool)
pub fn set_fixed_velocity_enable(&mut self, fixed_velocity_enable: bool)
Sets the fixed velocity enable state.
sourcepub fn set_fixed_velocity_amount(
&mut self,
fixed_velocity_amount: usize
) -> Result<(), RytmError>
pub fn set_fixed_velocity_amount( &mut self, fixed_velocity_amount: usize ) -> Result<(), RytmError>
Sets the fixed velocity amount.
Range 0..=127
sourcepub fn set_sample_recorder_source(
&mut self,
sample_recorder_source: SampleRecorderSource
)
pub fn set_sample_recorder_source( &mut self, sample_recorder_source: SampleRecorderSource )
Sets the sample recorder source.
sourcepub fn set_sample_recorder_threshold(
&mut self,
sample_recorder_threshold: usize
) -> Result<(), RytmError>
pub fn set_sample_recorder_threshold( &mut self, sample_recorder_threshold: usize ) -> Result<(), RytmError>
Sets the sample recorder threshold.
Range 0..=127
sourcepub fn set_sample_recorder_monitor_enable(
&mut self,
set_sample_recorder_monitor_enable: bool
)
pub fn set_sample_recorder_monitor_enable( &mut self, set_sample_recorder_monitor_enable: bool )
Sets the sample recorder monitor state.
sourcepub fn set_sample_recorder_recording_length(
&mut self,
sample_recorder_recording_length: SampleRecorderRecordingLength
)
pub fn set_sample_recorder_recording_length( &mut self, sample_recorder_recording_length: SampleRecorderRecordingLength )
Sets the sample recorder recording length.
sourcepub const fn bpm(&self) -> f32
pub const fn bpm(&self) -> f32
Returns the BPM for the entire project.
Range 30.0..=300.0
This is only effective when project level bpm is enabled.
sourcepub const fn selected_track(&self) -> usize
pub const fn selected_track(&self) -> usize
Returns the selected track.
Range 0..=11
Returns the selected parameter menu item.
Returns the selected fx menu item.
sourcepub const fn selected_page(&self) -> usize
pub const fn selected_page(&self) -> usize
Returns the selected page.
Range 0..=3
sourcepub const fn selected_mode(&self) -> SequencerMode
pub const fn selected_mode(&self) -> SequencerMode
Returns the selected sequencer mode.
sourcepub const fn selected_pattern_mode(&self) -> PatternMode
pub const fn selected_pattern_mode(&self) -> PatternMode
Returns the selected pattern mode.
sourcepub const fn raw_mute_flags(&self) -> u16
pub const fn raw_mute_flags(&self) -> u16
Returns the raw mute flags for sounds.
sourcepub fn muted_sound_indexes(&self) -> Vec<usize>
pub fn muted_sound_indexes(&self) -> Vec<usize>
Returns the collection of muted sound indexes.
sourcepub fn unmuted_sound_indexes(&self) -> Vec<usize>
pub fn unmuted_sound_indexes(&self) -> Vec<usize>
Returns the collection of unmuted sound indexes.
sourcepub fn is_sound_muted(&self, sound_index: usize) -> Result<bool, RytmError>
pub fn is_sound_muted(&self, sound_index: usize) -> Result<bool, RytmError>
Returns if a sound is muted by sound index.
sourcepub const fn fixed_velocity_enabled(&self) -> bool
pub const fn fixed_velocity_enabled(&self) -> bool
Returns the fixed velocity enable state.
sourcepub const fn fixed_velocity_amount(&self) -> usize
pub const fn fixed_velocity_amount(&self) -> usize
Returns the fixed velocity amount.
Range 0..=127
sourcepub const fn sample_recorder_source(&self) -> SampleRecorderSource
pub const fn sample_recorder_source(&self) -> SampleRecorderSource
Returns the sample recorder source.
sourcepub const fn sample_recorder_threshold(&self) -> usize
pub const fn sample_recorder_threshold(&self) -> usize
Returns the sample recorder threshold.
Range 0..=127
sourcepub const fn sample_recorder_monitor_enabled(&self) -> bool
pub const fn sample_recorder_monitor_enabled(&self) -> bool
Returns the sample recorder monitor state.
sourcepub const fn sample_recorder_recording_length(
&self
) -> SampleRecorderRecordingLength
pub const fn sample_recorder_recording_length( &self ) -> SampleRecorderRecordingLength
Returns the sample recorder recording length.
sourcepub const fn structure_version(&self) -> u32
pub const fn structure_version(&self) -> u32
Returns the version of the settings structure.