pub struct Sample<'a> { /* private fields */ }
Expand description
Mapping information for a sample file
Implementations§
Source§impl<'a> Sample<'a>
impl<'a> Sample<'a>
Sourcepub fn with_sample_start(self, sample_start: impl Into<Option<f64>>) -> Self
pub fn with_sample_start(self, sample_start: impl Into<Option<f64>>) -> Self
Set the start point for the sample (in frames)
Sourcepub fn with_sample_stop(self, sample_stop: impl Into<Option<f64>>) -> Self
pub fn with_sample_stop(self, sample_stop: impl Into<Option<f64>>) -> Self
Set the end point for the sample (in frames)
Sourcepub fn with_group(self, group: impl Into<Option<isize>>) -> Self
pub fn with_group(self, group: impl Into<Option<isize>>) -> Self
Put the sample in a group
Sourcepub fn with_parameter_1(self, parameter_1: impl Into<Option<f64>>) -> Self
pub fn with_parameter_1(self, parameter_1: impl Into<Option<f64>>) -> Self
Set the first parameter
Sourcepub fn with_parameter_2(self, parameter_2: impl Into<Option<f64>>) -> Self
pub fn with_parameter_2(self, parameter_2: impl Into<Option<f64>>) -> Self
Set the second parameter
Sourcepub fn with_parameter_3(self, parameter_3: impl Into<Option<f64>>) -> Self
pub fn with_parameter_3(self, parameter_3: impl Into<Option<f64>>) -> Self
Set the third parameter
Sourcepub fn with_reverse(self, reverse: impl Into<Option<bool>>) -> Self
pub fn with_reverse(self, reverse: impl Into<Option<bool>>) -> Self
Set whether the sample should be played in reverse
Sourcepub fn with_zone_logic(self, zone_logic: impl Into<Option<ZoneLogic>>) -> Self
pub fn with_zone_logic(self, zone_logic: impl Into<Option<ZoneLogic>>) -> Self
Choose an algorithm for sample selection when zones overlap
Sourcepub fn with_velocity(self, velocity: impl Into<Option<ZoneInfo>>) -> Self
pub fn with_velocity(self, velocity: impl Into<Option<ZoneInfo>>) -> Self
Set the velocity range for the sample
Sourcepub fn with_select(self, select: impl Into<Option<ZoneInfo>>) -> Self
pub fn with_select(self, select: impl Into<Option<ZoneInfo>>) -> Self
Set the “select” range for the sample
Sourcepub fn with_loop(self, loop: impl Into<Option<Loop>>) -> Self
pub fn with_loop(self, loop: impl Into<Option<Loop>>) -> Self
Set the loop behavior of the sample
Sourcepub fn sample_start(&self) -> Option<f64>
pub fn sample_start(&self) -> Option<f64>
Get the sample’s start point (in frames)
Sourcepub fn sample_stop(&self) -> Option<f64>
pub fn sample_stop(&self) -> Option<f64>
Get the sample’s end point (in frames)
Sourcepub fn parameter_1(&self) -> Option<f64>
pub fn parameter_1(&self) -> Option<f64>
Get the value of the first parameter
Sourcepub fn parameter_2(&self) -> Option<f64>
pub fn parameter_2(&self) -> Option<f64>
Get the value of the second parameter
Sourcepub fn parameter_3(&self) -> Option<f64>
pub fn parameter_3(&self) -> Option<f64>
Get the value of the third parameter
Sourcepub fn zone_logic(&self) -> Option<ZoneLogic>
pub fn zone_logic(&self) -> Option<ZoneLogic>
Get the overlap behavior for the sample
Trait Implementations§
Source§impl<'de: 'a, 'a> Deserialize<'de> for Sample<'a>
impl<'de: 'a, 'a> Deserialize<'de> for Sample<'a>
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
impl<'a> StructuralPartialEq for Sample<'a>
Auto Trait Implementations§
impl<'a> Freeze for Sample<'a>
impl<'a> RefUnwindSafe for Sample<'a>
impl<'a> Send for Sample<'a>
impl<'a> Sync for Sample<'a>
impl<'a> Unpin for Sample<'a>
impl<'a> UnwindSafe for Sample<'a>
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