pub struct Pattern { /* private fields */ }Implementations§
Source§impl Pattern
impl Pattern
pub fn new(name: &str, bpm: u8, signature: TimeSignature) -> Self
pub fn new_with_events( name: &str, bpm: u8, signature: TimeSignature, events: Vec<PatternEvent>, ) -> Self
pub fn push_event(&mut self, time: MusicTime, notes: Vec<u8>) -> &Self
pub fn len(&self) -> usize
pub fn get_bpm(&self) -> u8
pub fn get_time_signature(&self) -> TimeSignature
pub fn get(&self, index: usize) -> &PatternEvent
pub fn get_events(&self) -> &Vec<PatternEvent> ⓘ
pub fn get_name(&self) -> &str
pub fn find_next_event_index(&self, time: &MusicTime) -> usize
pub fn sort_events(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin for Pattern
impl UnsafeUnpin for Pattern
impl UnwindSafe for Pattern
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