[][src]Struct wildmidi::Midi

pub struct Midi { /* fields omitted */ }

An actual Midi file, capable of producing a PCM output.

Methods

impl Midi
[src]

pub fn play(&mut self, len: usize) -> Vec<u8>
[src]

Returns a Vec containing 'len' bytes of PCM data.

pub fn seek(&mut self, pos: u32)
[src]

Resets all note specific midi states and active notes before scanning to sample_pos samples from the beginning taking note of any changes to midi channel states.

pub fn copyright(&self) -> Option<String>
[src]

Returns a string containing any copyright MIDI events, if any were found.

pub fn current_sample(&self) -> usize
[src]

The number of stereo samples the player has processed so far. Dividing this value by the player's 'rate' determines the current playing time.

pub fn total_samples(&self) -> usize
[src]

The number of stereo samples the player expects to process. Dividing this value by the player's 'rate' determines the MIDI's total length.

pub fn total_time(&self) -> usize
[src]

This is the total time of MIDI events in 1/1000's of a second. It differs from 'total_samples' in that it only states the total time within the MIDI file, and does not take into account the extra bit of time to finish playing sampling smoothly.

Trait Implementations

impl Drop for Midi
[src]

Auto Trait Implementations

impl !Send for Midi

impl !Sync for Midi

Blanket Implementations

impl<T> From for T
[src]

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

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

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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

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

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

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

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

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