Function note_events
pub fn note_events(notes: &[RenderNote], rate: SampleRate) -> Vec<NoteEvent>Expand description
Turns notes into events sorted by frame, a note-off before a note-on on the same frame.
A frame is the note time times the rate, rounded to the nearest sample. A note shorter than half a frame still lasts one frame, so its note-off never comes before its own note-on.