pub struct HhLabParameters { /* private fields */ }
Expand description

Parameters for the HhLab machine.

Implementations§

source§

impl HhLabParameters

source

pub fn set_lev(&mut self, lev: usize) -> Result<(), RytmError>

Sets the lev parameter.

Range: 0..=127

source

pub fn set_osc1(&mut self, osc1: usize) -> Result<(), RytmError>

Sets the osc1 parameter.

Range: 0..=16256

source

pub fn set_dec(&mut self, dec: usize) -> Result<(), RytmError>

Sets the dec parameter.

Range: 0..=127

source

pub fn set_osc2(&mut self, osc2: usize) -> Result<(), RytmError>

Sets the osc2 parameter.

Range: 0..=16256

source

pub fn set_osc3(&mut self, osc3: usize) -> Result<(), RytmError>

Sets the osc3 parameter.

Range: 0..=16256

source

pub fn set_osc4(&mut self, osc4: usize) -> Result<(), RytmError>

Sets the osc4 parameter.

Range: 0..=16256

source

pub fn set_osc5(&mut self, osc5: usize) -> Result<(), RytmError>

Sets the osc5 parameter.

Range: 0..=16256

source

pub fn set_osc6(&mut self, osc6: usize) -> Result<(), RytmError>

Sets the osc6 parameter.

Range: 0..=16256

source

pub const fn get_lev(&self) -> usize

Returns the lev parameter.

Range: 0..=127

source

pub const fn get_osc1(&self) -> usize

Returns the osc1 parameter.

Range: 0..=16256

source

pub const fn get_dec(&self) -> usize

Returns the dec parameter.

Range: 0..=127

source

pub const fn get_osc2(&self) -> usize

Returns the osc2 parameter.

Range: 0..=16256

source

pub const fn get_osc3(&self) -> usize

Returns the osc3 parameter.

Range: 0..=16256

source

pub const fn get_osc4(&self) -> usize

Returns the osc4 parameter.

Range: 0..=16256

source

pub const fn get_osc5(&self) -> usize

Returns the osc5 parameter.

Range: 0..=16256

source

pub const fn get_osc6(&self) -> usize

Returns the osc6 parameter.

Range: 0..=16256

source§

impl HhLabParameters

source

pub fn plock_set_lev( &self, lev: usize, trig_index: usize ) -> Result<(), RytmError>

Sets the parameter lock for the lev parameter.

Range: 0..=127

source

pub fn plock_get_lev( &self, trig_index: usize ) -> Result<Option<usize>, RytmError>

Gets the parameter lock for the lev parameter.

Range: 0..=127

source

pub fn plock_clear_lev(&self, trig_index: usize) -> Result<(), RytmError>

Clears the parameter lock for the lev parameter if set.

source

pub fn plock_set_osc1( &self, osc1: usize, trig_index: usize ) -> Result<(), RytmError>

Sets the parameter lock for the osc1 parameter.

Range: 0..=16256

source

pub fn plock_get_osc1( &self, trig_index: usize ) -> Result<Option<usize>, RytmError>

Gets the parameter lock for the osc1 parameter.

Range: 0..=16256

source

pub fn plock_clear_osc1(&self, trig_index: usize) -> Result<(), RytmError>

Clears the parameter lock for the osc1 parameter if set.

source

pub fn plock_set_dec( &self, dec: usize, trig_index: usize ) -> Result<(), RytmError>

Sets the parameter lock for the dec parameter.

Range: 0..=127

source

pub fn plock_get_dec( &self, trig_index: usize ) -> Result<Option<usize>, RytmError>

Gets the parameter lock for the dec parameter.

Range: 0..=127

source

pub fn plock_clear_dec(&self, trig_index: usize) -> Result<(), RytmError>

Clears the parameter lock for the dec parameter if set.

source

pub fn plock_set_osc2( &self, osc2: usize, trig_index: usize ) -> Result<(), RytmError>

Sets the parameter lock for the osc2 parameter.

Range: 0..=16256

source

pub fn plock_get_osc2( &self, trig_index: usize ) -> Result<Option<usize>, RytmError>

Gets the parameter lock for the osc2 parameter.

Range: 0..=16256

source

pub fn plock_clear_osc2(&self, trig_index: usize) -> Result<(), RytmError>

Clears the parameter lock for the osc2 parameter if set.

source

pub fn plock_set_osc3( &self, osc3: usize, trig_index: usize ) -> Result<(), RytmError>

Sets the parameter lock for the osc3 parameter.

Range: 0..=16256

source

pub fn plock_get_osc3( &self, trig_index: usize ) -> Result<Option<usize>, RytmError>

Gets the parameter lock for the osc3 parameter.

Range: 0..=16256

source

pub fn plock_clear_osc3(&self, trig_index: usize) -> Result<(), RytmError>

Clears the parameter lock for the osc3 parameter if set.

source

pub fn plock_set_osc4( &self, osc4: usize, trig_index: usize ) -> Result<(), RytmError>

Sets the parameter lock for the osc4 parameter.

Range: 0..=16256

source

pub fn plock_get_osc4( &self, trig_index: usize ) -> Result<Option<usize>, RytmError>

Gets the parameter lock for the osc4 parameter.

Range: 0..=16256

source

pub fn plock_clear_osc4(&self, trig_index: usize) -> Result<(), RytmError>

Clears the parameter lock for the osc4 parameter if set.

source

pub fn plock_set_osc5( &self, osc5: usize, trig_index: usize ) -> Result<(), RytmError>

Sets the parameter lock for the osc5 parameter.

Range: 0..=16256

source

pub fn plock_get_osc5( &self, trig_index: usize ) -> Result<Option<usize>, RytmError>

Gets the parameter lock for the osc5 parameter.

Range: 0..=16256

source

pub fn plock_clear_osc5(&self, trig_index: usize) -> Result<(), RytmError>

Clears the parameter lock for the osc5 parameter if set.

source

pub fn plock_set_osc6( &self, osc6: usize, trig_index: usize ) -> Result<(), RytmError>

Sets the parameter lock for the osc6 parameter.

Range: 0..=16256

source

pub fn plock_get_osc6( &self, trig_index: usize ) -> Result<Option<usize>, RytmError>

Gets the parameter lock for the osc6 parameter.

Range: 0..=16256

source

pub fn plock_clear_osc6(&self, trig_index: usize) -> Result<(), RytmError>

Clears the parameter lock for the osc6 parameter if set.

Trait Implementations§

source§

impl Clone for HhLabParameters

source§

fn clone(&self) -> HhLabParameters

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 HhLabParameters

source§

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

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

impl Default for HhLabParameters

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for HhLabParameters

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 Serialize for HhLabParameters

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

Auto Trait Implementations§

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> 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,

§

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>,

§

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>,

§

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>,