pub struct ProjectSampleSlot {
pub sample_type: ProjectSampleSlotType,
pub slot_id: u8,
pub path: PathBuf,
pub trim_bars_x100: u16,
pub timestrech_mode: SampleAttributeTimestrechMode,
pub loop_mode: SampleAttributeLoopMode,
pub trig_quantization_mode: SampleAttributeTrigQuantizationMode,
pub gain: i8,
pub bpm: u16,
}Fields§
§sample_type: ProjectSampleSlotTypeType of sample: STATIC or FLEX
slot_id: u8String ID Number of the slot the sample is assigned to e.g. 001, 002, 003… Maximum of 128 entries for STATIC sample slots, but can be up to 136 for flex slots as there are 8 recorders + 128 flex slots.
path: PathBufRelative path to the file on the card from the project directory.
trim_bars_x100: u16Current bar trim (float). This is multiplied by 100 on the machine. This is not used for recording buffer ‘flex’ tracks.
timestrech_mode: SampleAttributeTimestrechModeCurrent SampleTimestrechModes setting for the specific slot. Example: TSMODE=2
loop_mode: SampleAttributeLoopModeCurrent SampleLoopModes setting for the specific slot.
trig_quantization_mode: SampleAttributeTrigQuantizationModeCurrent SampleTrigQuantizationModes setting for this specific slot.
This is not used for recording buffer ‘flex’ tracks.
gain: i8Sample gain. 48 is default as per sample attributes file. maximum 96, minimum 0.
bpm: u16BPM of the sample in this slot.
Implementations§
Source§impl ProjectSampleSlot
impl ProjectSampleSlot
pub fn new( sample_type: ProjectSampleSlotType, slot_id: u8, path: PathBuf, trim_bars_x100: Option<u16>, timestretch_mode: Option<SampleAttributeTimestrechMode>, loop_mode: Option<SampleAttributeLoopMode>, trig_quantization_mode: Option<SampleAttributeTrigQuantizationMode>, gain: Option<i8>, bpm: Option<u16>, ) -> Result<Self, Box<dyn Error>>
Trait Implementations§
Source§impl Clone for ProjectSampleSlot
impl Clone for ProjectSampleSlot
Source§fn clone(&self) -> ProjectSampleSlot
fn clone(&self) -> ProjectSampleSlot
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProjectSampleSlot
impl Debug for ProjectSampleSlot
Source§impl<'de> Deserialize<'de> for ProjectSampleSlot
impl<'de> Deserialize<'de> for ProjectSampleSlot
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>,
Source§impl Hash for ProjectSampleSlot
impl Hash for ProjectSampleSlot
Source§impl PartialEq for ProjectSampleSlot
impl PartialEq for ProjectSampleSlot
Source§impl Serialize for ProjectSampleSlot
impl Serialize for ProjectSampleSlot
impl Eq for ProjectSampleSlot
impl StructuralPartialEq for ProjectSampleSlot
Auto Trait Implementations§
impl Freeze for ProjectSampleSlot
impl RefUnwindSafe for ProjectSampleSlot
impl Send for ProjectSampleSlot
impl Sync for ProjectSampleSlot
impl Unpin for ProjectSampleSlot
impl UnwindSafe for ProjectSampleSlot
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more