Struct InstrumentRegion

Source
#[non_exhaustive]
pub struct InstrumentRegion { /* private fields */ }
Expand description

Represents an instrument region. An instrument region contains all the parameters necessary to synthesize a note.

Implementations§

Source§

impl InstrumentRegion

Source

pub fn contains(&self, key: i32, velocity: i32) -> bool

Checks if the region covers the given key and velocity. Returns true if the region covers the given key and velocity.

§Arguments
  • key - The key of a note.
  • velocity - The velocity of a note.
Source

pub fn get_sample_start(&self) -> i32

Source

pub fn get_sample_end(&self) -> i32

Source

pub fn get_sample_start_loop(&self) -> i32

Source

pub fn get_sample_end_loop(&self) -> i32

Source

pub fn get_start_address_offset(&self) -> i32

Source

pub fn get_end_address_offset(&self) -> i32

Source

pub fn get_start_loop_address_offset(&self) -> i32

Source

pub fn get_end_loop_address_offset(&self) -> i32

Source

pub fn get_modulation_lfo_to_pitch(&self) -> i32

Source

pub fn get_vibrato_lfo_to_pitch(&self) -> i32

Source

pub fn get_modulation_envelope_to_pitch(&self) -> i32

Source

pub fn get_initial_filter_cutoff_frequency(&self) -> f32

Source

pub fn get_initial_filter_q(&self) -> f32

Source

pub fn get_modulation_lfo_to_filter_cutoff_frequency(&self) -> i32

Source

pub fn get_modulation_envelope_to_filter_cutoff_frequency(&self) -> i32

Source

pub fn get_modulation_lfo_to_volume(&self) -> f32

Source

pub fn get_chorus_effects_send(&self) -> f32

Source

pub fn get_reverb_effects_send(&self) -> f32

Source

pub fn get_pan(&self) -> f32

Source

pub fn get_delay_modulation_lfo(&self) -> f32

Source

pub fn get_frequency_modulation_lfo(&self) -> f32

Source

pub fn get_delay_vibrato_lfo(&self) -> f32

Source

pub fn get_frequency_vibrato_lfo(&self) -> f32

Source

pub fn get_delay_modulation_envelope(&self) -> f32

Source

pub fn get_attack_modulation_envelope(&self) -> f32

Source

pub fn get_hold_modulation_envelope(&self) -> f32

Source

pub fn get_decay_modulation_envelope(&self) -> f32

Source

pub fn get_sustain_modulation_envelope(&self) -> f32

Source

pub fn get_release_modulation_envelope(&self) -> f32

Source

pub fn get_key_number_to_modulation_envelope_hold(&self) -> i32

Source

pub fn get_key_number_to_modulation_envelope_decay(&self) -> i32

Source

pub fn get_delay_volume_envelope(&self) -> f32

Source

pub fn get_attack_volume_envelope(&self) -> f32

Source

pub fn get_hold_volume_envelope(&self) -> f32

Source

pub fn get_decay_volume_envelope(&self) -> f32

Source

pub fn get_sustain_volume_envelope(&self) -> f32

Source

pub fn get_release_volume_envelope(&self) -> f32

Source

pub fn get_key_number_to_volume_envelope_hold(&self) -> i32

Source

pub fn get_key_number_to_volume_envelope_decay(&self) -> i32

Source

pub fn get_key_range_start(&self) -> i32

Source

pub fn get_key_range_end(&self) -> i32

Source

pub fn get_velocity_range_start(&self) -> i32

Source

pub fn get_velocity_range_end(&self) -> i32

Source

pub fn get_initial_attenuation(&self) -> f32

Source

pub fn get_coarse_tune(&self) -> i32

Source

pub fn get_fine_tune(&self) -> i32

Source

pub fn get_sample_modes(&self) -> LoopMode

Source

pub fn get_scale_tuning(&self) -> i32

Source

pub fn get_exclusive_class(&self) -> i32

Source

pub fn get_root_key(&self) -> i32

Source

pub fn get_sample_id(&self) -> usize

Trait Implementations§

Source§

impl Debug for InstrumentRegion

Source§

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

Formats the value using the given formatter. 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, 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.