pub struct NoteSnapshot {
pub note: u8,
pub velocity: u8,
pub start_frac: f64,
pub duration_frac: f64,
}Expand description
A note for display in the piano roll.
Fields§
§note: u8§velocity: u8§start_frac: f64Start position as fraction of clip length (0.0..1.0).
duration_frac: f64Duration as fraction of clip length.
Implementations§
Source§impl NoteSnapshot
impl NoteSnapshot
Sourcepub fn to_clip_events(
notes: &[NoteSnapshot],
length_ticks: i64,
) -> Vec<ClipEvent>
pub fn to_clip_events( notes: &[NoteSnapshot], length_ticks: i64, ) -> Vec<ClipEvent>
Convert edited NoteSnapshots back to ClipEvents for the audio thread. Each note produces a note-on and note-off event.
Trait Implementations§
Source§impl Clone for NoteSnapshot
impl Clone for NoteSnapshot
Source§fn clone(&self) -> NoteSnapshot
fn clone(&self) -> NoteSnapshot
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for NoteSnapshot
impl Debug for NoteSnapshot
impl Copy for NoteSnapshot
Auto Trait Implementations§
impl Freeze for NoteSnapshot
impl RefUnwindSafe for NoteSnapshot
impl Send for NoteSnapshot
impl Sync for NoteSnapshot
impl Unpin for NoteSnapshot
impl UnsafeUnpin for NoteSnapshot
impl UnwindSafe for NoteSnapshot
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