Struct midi_msg::TimeCode[][src]

pub struct TimeCode {
    pub frames: u8,
    pub seconds: u8,
    pub minutes: u8,
    pub hours: u8,
    pub code_type: TimeCodeType,
}

Used to synchronize device positions, by SystemCommonMsg::TimeCodeQuarterFrameX as well as UniversalRealTimeMsg::TimeCodeFull.

Based on the SMTPE time code standard.

As defined in the MIDI Time Code spec (MMA0001 / RP004 / RP008)

Fields

frames: u8

The position in frames, 0-29

seconds: u8

The position in seconds, 0-59

minutes: u8

The position in minutes, 0-59

hours: u8

The position in hours, 0-23

code_type: TimeCodeType

Implementations

impl TimeCode[src]

pub fn to_bytes(self) -> [u8; 4][src]

Return the four byte representation of the frame: [frame, seconds, minutes, timecode + hours]

pub fn to_nibbles(self) -> [u8; 8][src]

Return an 8 byte, Quarter Frame representation of the Frame

Trait Implementations

impl Clone for TimeCode[src]

impl Copy for TimeCode[src]

impl Debug for TimeCode[src]

impl Default for TimeCode[src]

impl From<StandardUserBits> for TimeCode[src]

impl From<TimeCode> for StandardTimeCode[src]

impl From<TimeCode> for StandardUserBits[src]

impl PartialEq<TimeCode> for TimeCode[src]

impl StructuralPartialEq for TimeCode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.