[][src]Enum nom_midi::Division

pub enum Division {
    Metrical(u16),
    Timecode {
        fps: Fps,
        res: u8,
    },
}

The way time is divided in the midi track

Variants

Metrical(u16)

This means the time is indicated by the number of sub-divisons of a quarter-note (a.k.a. crotchet). For example, 4 would mean the maximum resolution is semi-quavers.

A common choice is 96 = 2^5 * 3 allowing dotted notes down to hemidemisemiquavers

Timecode

The time is absolute, and expresses as a combination of frames per second, and the sub-frame resolution

Fields of Timecode

fps: Fps

The number of frames per second

res: u8

The sub-frame resolution

Typical values are 4 (corresponding to MIDI Time Code), 8, 10, 80 (corresponding to SMPTE bit resolution), or 100.

Trait Implementations

impl PartialEq<Division> for Division[src]

impl Clone for Division[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Copy for Division[src]

impl Debug for Division[src]

Auto Trait Implementations

Blanket Implementations

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

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

type Owned = T

The resulting type after obtaining ownership.

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

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.

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

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

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