pub struct Filter { /* private fields */ }
Expand description
Represents parameters in the filter page of a sound.
Implementations§
source§impl Filter
impl Filter
sourcepub fn set_attack(&mut self, attack: usize) -> Result<(), RytmError>
pub fn set_attack(&mut self, attack: usize) -> Result<(), RytmError>
Sets the attack of the filter envelope.
Range: 0..=127
sourcepub fn set_sustain(&mut self, sustain: usize) -> Result<(), RytmError>
pub fn set_sustain(&mut self, sustain: usize) -> Result<(), RytmError>
Sets the sustain of the filter envelope.
Range: 0..=127
sourcepub fn set_decay(&mut self, decay: usize) -> Result<(), RytmError>
pub fn set_decay(&mut self, decay: usize) -> Result<(), RytmError>
Sets the decay of the filter envelope.
Range: 0..=127
sourcepub fn set_release(&mut self, release: usize) -> Result<(), RytmError>
pub fn set_release(&mut self, release: usize) -> Result<(), RytmError>
Sets the release of the filter envelope.
Range: 0..=127
sourcepub fn set_cutoff(&mut self, cutoff: usize) -> Result<(), RytmError>
pub fn set_cutoff(&mut self, cutoff: usize) -> Result<(), RytmError>
Sets the cutoff of the filter.
Range: 0..=127
sourcepub fn set_resonance(&mut self, resonance: usize) -> Result<(), RytmError>
pub fn set_resonance(&mut self, resonance: usize) -> Result<(), RytmError>
Sets the resonance of the filter.
Range: 0..=127
sourcepub fn set_filter_type(&mut self, filter_type: FilterType)
pub fn set_filter_type(&mut self, filter_type: FilterType)
Sets the filter type.
sourcepub fn set_envelope_amount(
&mut self,
envelope_amount: isize
) -> Result<(), RytmError>
pub fn set_envelope_amount( &mut self, envelope_amount: isize ) -> Result<(), RytmError>
Sets the envelope amount of the filter.
Range: -64..=63
sourcepub const fn sustain(&self) -> usize
pub const fn sustain(&self) -> usize
Returns the sustain of the filter envelope.
Range: 0..=127
sourcepub const fn release(&self) -> usize
pub const fn release(&self) -> usize
Returns the release of the filter envelope.
Range: 0..=127
sourcepub const fn filter_type(&self) -> FilterType
pub const fn filter_type(&self) -> FilterType
Returns the filter type.
sourcepub const fn envelope_amount(&self) -> isize
pub const fn envelope_amount(&self) -> isize
Returns the envelope amount of the filter.
Range: -64..=63
Trait Implementations§
source§impl<'de> Deserialize<'de> for Filter
impl<'de> Deserialize<'de> for Filter
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Ord for Filter
impl Ord for Filter
source§impl PartialEq for Filter
impl PartialEq for Filter
source§impl PartialOrd for Filter
impl PartialOrd for Filter
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moresource§impl TryFrom<&ar_sound_t> for Filter
impl TryFrom<&ar_sound_t> for Filter
§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
impl Copy for Filter
impl Eq for Filter
impl StructuralEq for Filter
impl StructuralPartialEq for Filter
Auto Trait Implementations§
impl RefUnwindSafe for Filter
impl Send for Filter
impl Sync for Filter
impl Unpin for Filter
impl UnwindSafe for Filter
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more