pub struct Track { /* private fields */ }
Implementations§
source§impl Track
impl Track
pub fn is_empty(&self) -> bool
pub fn events_len(&self) -> usize
sourcepub fn events(&self) -> impl Iterator<Item = &TrackEvent>
pub fn events(&self) -> impl Iterator<Item = &TrackEvent>
Iterator over the events in the track.
pub fn push_event(&mut self, delta_time: u32, event: Event) -> Result<()>
pub fn insert_event( &mut self, index: u32, delta_time: u32, event: Event ) -> Result<()>
pub fn replace_event( &mut self, index: u32, delta_time: u32, event: Event ) -> Result<()>
pub fn set_name<S: Into<String>>(&mut self, name: S) -> Result<()>
pub fn set_instrument_name<S: Into<String>>(&mut self, name: S) -> Result<()>
pub fn set_general_midi( &mut self, channel: Channel, value: GeneralMidi ) -> Result<()>
pub fn push_time_signature( &mut self, delta_time: u32, numerator: u8, denominator: DurationName, click: Clocks ) -> Result<()>
pub fn push_tempo( &mut self, delta_time: u32, quarters_per_minute: QuartersPerMinute ) -> Result<()>
pub fn push_note_on( &mut self, delta_time: u32, channel: Channel, note_number: NoteNumber, velocity: Velocity ) -> Result<()>
pub fn push_note_off( &mut self, delta_time: u32, channel: Channel, note_number: NoteNumber, velocity: Velocity ) -> Result<()>
pub fn push_lyric<S: Into<String>>( &mut self, delta_time: u32, lyric: S ) -> Result<()>
pub fn push_pitch_bend( &mut self, delta_time: u32, channel: Channel, pitch_bend: PitchBendValue ) -> Result<()>
Trait Implementations§
source§impl Ord for Track
impl Ord for Track
source§impl PartialEq for Track
impl PartialEq for Track
source§impl PartialOrd for Track
impl PartialOrd for Track
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for
self
and other
) and is used by the <=
operator. Read moreimpl Eq for Track
impl StructuralEq for Track
impl StructuralPartialEq for Track
Auto Trait Implementations§
impl RefUnwindSafe for Track
impl Send for Track
impl Sync for Track
impl Unpin for Track
impl UnwindSafe for Track
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more