pub struct Pattern { /* private fields */ }Implementations§
Source§impl Pattern
impl Pattern
pub const MAX_ROWS: u16 = 200u16
pub const DEFAULT_ROWS: u16 = 64u16
Sourcepub fn set_length(&mut self, new_len: u16)
pub fn set_length(&mut self, new_len: u16)
panics it the new len is larger than ‘Self::MAX_LEN’ deletes the data on higher rows
Sourcepub fn set_event(&mut self, position: InPatternPosition, event: NoteEvent)
pub fn set_event(&mut self, position: InPatternPosition, event: NoteEvent)
overwrites the event if the row already has an event for that channel panics if the row position is larger than current amount of rows
pub fn get_event(&self, index: InPatternPosition) -> Option<&NoteEvent>
pub fn get_event_mut( &mut self, index: InPatternPosition, ) -> Option<&mut NoteEvent>
Sourcepub fn remove_event(&mut self, position: InPatternPosition)
pub fn remove_event(&mut self, position: InPatternPosition)
if there is no event, does nothing
pub const fn row_count(&self) -> u16
Sourcepub fn apply_operation(&mut self, op: PatternOperation)
pub fn apply_operation(&mut self, op: PatternOperation)
Panics if the Operation is invalid
pub const fn operation_is_valid(&self, op: &PatternOperation) -> bool
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Index<InPatternPosition> for Pattern
impl Index<InPatternPosition> for Pattern
Auto Trait Implementations§
impl Freeze for Pattern
impl RefUnwindSafe for Pattern
impl Send for Pattern
impl Sync for Pattern
impl Unpin 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