rytm_rs::object::kit

Struct Kit

Source
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

Source

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

Source

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.

Source

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.

Source

pub fn name(&self) -> &str

Returns the name of the kit.

Source

pub const fn sounds(&self) -> &[Sound; 12]

Returns the sounds assigned to the kit in the order of the tracks.

Source

pub fn sounds_mut(&mut self) -> &mut [Sound; 12]

Returns the sounds assigned to the kit in the order of the tracks mutably.

Source

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.

Source

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

Source

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

Source

pub fn track_level(&self, track_index: usize) -> Result<usize, RytmError>

Gets the level of a track.

Range 0..=12

Source

pub fn track_levels(&self) -> Vec<usize>

Gets the level of all tracks including the Fx track.

Range 0..=127

Source

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.

Source

pub const fn structure_version(&self) -> u32

Returns the version of the kit structure.

Source

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

Source

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

Source

pub const fn fx_delay(&self) -> &FxDelay

Gets the fx delay parameters.

Source

pub fn fx_delay_mut(&mut self) -> &mut FxDelay

Gets the fx delay parameters mutably.

Source

pub const fn fx_distortion(&self) -> &FxDistortion

Gets the fx distortion parameters.

Source

pub fn fx_distortion_mut(&mut self) -> &mut FxDistortion

Gets the fx distortion parameters mutably.

Source

pub const fn fx_reverb(&self) -> &FxReverb

Gets the fx reverb parameters.

Source

pub fn fx_reverb_mut(&mut self) -> &mut FxReverb

Gets the fx reverb parameters mutably.

Source

pub const fn fx_compressor(&self) -> &FxCompressor

Gets the fx compressor parameters.

Source

pub fn fx_compressor_mut(&mut self) -> &mut FxCompressor

Gets the fx compressor parameters mutably.

Source

pub const fn fx_lfo(&self) -> &FxLfo

Gets the fx lfo parameters.

Source

pub fn fx_lfo_mut(&mut self) -> &mut FxLfo

Gets the fx lfo parameters mutably.

Source

pub const fn index(&self) -> usize

Returns the index of the kit.

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

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

Source

pub const fn control_in_1_mod_target_1(&self) -> ControlInModTarget

Gets the control in 1 mod target 1

Source

pub const fn control_in_1_mod_target_2(&self) -> ControlInModTarget

Gets the control in 1 mod target 2

Source

pub const fn control_in_1_mod_target_3(&self) -> ControlInModTarget

Gets the control in 1 mod target 3

Source

pub const fn control_in_1_mod_target_4(&self) -> ControlInModTarget

Gets the control in 1 mod target 4

Source

pub const fn control_in_2_mod_target_1(&self) -> ControlInModTarget

Gets the control in 2 mod target 1

Source

pub const fn control_in_2_mod_target_2(&self) -> ControlInModTarget

Gets the control in 2 mod target 2

Source

pub const fn control_in_2_mod_target_3(&self) -> ControlInModTarget

Gets the control in 2 mod target 3

Source

pub const fn control_in_2_mod_target_4(&self) -> ControlInModTarget

Gets the control in 2 mod target 4

Source

pub const fn control_in_1_mod_amt_1(&self) -> isize

Gets the control in 1 mod amt 1

Range: -128..=127

Source

pub const fn control_in_1_mod_amt_2(&self) -> isize

Gets the control in 1 mod amt 2

Range: -128..=127

Source

pub const fn control_in_1_mod_amt_3(&self) -> isize

Gets the control in 1 mod amt 3

Range: -128..=127

Source

pub const fn control_in_1_mod_amt_4(&self) -> isize

Gets the control in 1 mod amt 4

Range: -128..=127

Source

pub const fn control_in_2_mod_amt_1(&self) -> isize

Gets the control in 2 mod amt 1

Range: -128..=127

Source

pub const fn control_in_2_mod_amt_2(&self) -> isize

Gets the control in 2 mod amt 2

Range: -128..=127

Source

pub const fn control_in_2_mod_amt_3(&self) -> isize

Gets the control in 2 mod amt 3

Range: -128..=127

Source

pub const fn control_in_2_mod_amt_4(&self) -> isize

Gets the control in 2 mod amt 4

Range: -128..=127

Calls the kit sounds’ link_parameter_lock_pool method.

Please check link_parameter_lock_pool for more information.

§Errors

Returns an error if the sound is a pool sound which does not support parameter locks.

Trait Implementations§

Source§

impl Clone for Kit

Source§

fn clone(&self) -> Kit

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Kit

Source§

fn fmt(&self, __f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Kit

Source§

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 From<&Kit> for ar_kit_t

Source§

fn from(kit: &Kit) -> Self

Converts to this type from the input type.
Source§

impl Serialize for Kit

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl SysexCompatible for Kit

Source§

fn as_sysex(&self) -> Result<Vec<u8>, RytmError>

Serializes the object to a sysex message. Read more
Source§

fn sysex_type(&self) -> AnySysexType

Returns the sysex type of the object.

Auto Trait Implementations§

§

impl Freeze for Kit

§

impl !RefUnwindSafe for Kit

§

impl Send for Kit

§

impl Sync for Kit

§

impl Unpin for Kit

§

impl !UnwindSafe for Kit

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dst: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,