Enum midi_msg::ExtendedSampleDumpMsg

source ·
pub enum ExtendedSampleDumpMsg {
    Header {
        sample_num: u16,
        format: u8,
        sample_rate: f64,
        length: u64,
        sustain_loop_start: u64,
        sustain_loop_end: u64,
        loop_type: ExtendedLoopType,
        num_channels: u8,
    },
    SampleNameRequest {
        sample_num: u16,
    },
    SampleName {
        sample_num: u16,
        name: BString,
    },
    LoopPointsRequest {
        sample_num: u16,
        loop_num: LoopNumber,
    },
    LoopPointTransmission {
        sample_num: u16,
        loop_num: LoopNumber,
        loop_type: ExtendedLoopType,
        start_addr: u64,
        end_addr: u64,
    },
}
Expand description

The extended sample dump messages described in CA-019, used to allow for longer, named samples. Used by UniversalNonRealTimeMsg::SampleDump.

Variants§

§

Header

Fields

§sample_num: u16

The ID of the sample, between 0-16383.

§format: u8
§of significant bits from 8-28
§sample_rate: f64

Sample rate in Hz. The f64 is used to approximate the two 28bit fixed point sent over the wire.

§length: u64

Sample length in words, 0-34359738368

§sustain_loop_start: u64

Sustain loop start point word number, 0-34359738367

§sustain_loop_end: u64

Sustain loop end point word number, 0-34359738367

§num_channels: u8

Number of audio channels, 0-127

§

SampleNameRequest

Request the given sample’s name.

Fields

§sample_num: u16

The ID of the sample, between 0-16383.

§

SampleName

Describe the name of a given sample.

Fields

§sample_num: u16

The ID of the sample, between 0-16383.

§name: BString

An up to 127 character name.

§

LoopPointsRequest

Request that the receiver return data about the loop points for a given sample.

Fields

§sample_num: u16

The ID of the sample, between 0-16383.

§loop_num: LoopNumber
§

LoopPointTransmission

Used to send additional loop points for a given sample.

Fields

§sample_num: u16

The ID of the sample, between 0-16383.

§loop_num: LoopNumber
§start_addr: u64

Loop start address (in samples)

§end_addr: u64

Loop end address (in samples)

Trait Implementations§

source§

impl Clone for ExtendedSampleDumpMsg

source§

fn clone(&self) -> ExtendedSampleDumpMsg

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 ExtendedSampleDumpMsg

source§

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

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

impl PartialEq for ExtendedSampleDumpMsg

source§

fn eq(&self, other: &ExtendedSampleDumpMsg) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for ExtendedSampleDumpMsg

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.