pub struct Pattern {
pub number: u8,
pub audio_tracks: [[Option<Track<Step>>; 16]; 8],
pub midi_tracks: [[Option<Track<MidiStep>>; 16]; 8],
pub rest: Vec<u8>,
}Fields§
§number: u8§audio_tracks: [[Option<Track<Step>>; 16]; 8]§midi_tracks: [[Option<Track<MidiStep>>; 16]; 8]§rest: Vec<u8>Implementations§
Source§impl Pattern
impl Pattern
Sourcepub fn read_patterns(path: &Path) -> Result<Vec<Self>, ParseError>
pub fn read_patterns(path: &Path) -> Result<Vec<Self>, ParseError>
Read a pattern directory
Sourcepub fn read(path: &Path, number: u8) -> Result<Self, ParseError>
pub fn read(path: &Path, number: u8) -> Result<Self, ParseError>
Read a particular pattern file. Will also read any track files that match the pattern number
Sourcepub fn audio_track(&self, n: usize) -> &Track<Step>
pub fn audio_track(&self, n: usize) -> &Track<Step>
Get the first variation of a track
Sourcepub fn midi_track(&self, n: usize) -> &Track<MidiStep>
pub fn midi_track(&self, n: usize) -> &Track<MidiStep>
Get the first variation of a track
Trait Implementations§
impl StructuralPartialEq 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