[][src]Struct apres::MIDI

pub struct MIDI { /* fields omitted */ }

Structural representation of MIDI.

Can represent a file or a real-time performance.

Examples

use apres::MIDI;
// Create a MIDI from a file
let midi = MIDI::from_path("/path/to/file.mid");
use apres::MIDI;
// Create an empty MIDI file.
let midi = MIDI::new();

Implementations

impl MIDI[src]

pub fn new() -> MIDI[src]

pub fn from_path(file_path: &str) -> MIDI[src]

pub fn process_mtrk_event(
    &mut self,
    leadbyte: u8,
    bytes: &mut Vec<u8>,
    current_deltatime: &mut usize,
    track: usize,
    fallback_cmd: &mut u8
) -> Option<u64>
[src]

pub fn save(&self, path: String)[src]

pub fn get_event_position(&self, event_id: u64) -> Option<&(usize, usize)>[src]

pub fn get_tracks(&self) -> Vec<Vec<(usize, u64)>>[src]

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

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

pub fn get_track_length(&self, track: usize) -> usize[src]

pub fn set_ppqn(&mut self, new_ppqn: u16)[src]

pub fn get_ppqn(&self) -> u16[src]

pub fn set_format(&mut self, new_format: u16)[src]

pub fn get_format(&self) -> u16[src]

pub fn move_event(&mut self, new_track: usize, new_tick: usize, event_id: u64)[src]

pub fn insert_event(
    &mut self,
    track: usize,
    tick: usize,
    event: Box<dyn MIDIEvent>
) -> u64
[src]

pub fn push_event(
    &mut self,
    track: usize,
    wait: usize,
    event: Box<dyn MIDIEvent>
) -> u64
[src]

pub fn get_event_mut(
    &mut self,
    event_id: u64
) -> Option<&mut Box<dyn MIDIEvent>>
[src]

pub fn get_event(&self, event_id: u64) -> Option<&Box<dyn MIDIEvent>>[src]

pub fn get_event_property(&self, event_id: u64, arg: u8) -> Vec<u8>[src]

Auto Trait Implementations

impl !RefUnwindSafe for MIDI

impl !Send for MIDI

impl !Sync for MIDI

impl Unpin for MIDI

impl !UnwindSafe for MIDI

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, 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.