pub struct Pattern {
pub header: [u8; 8],
pub audio_track_trigs: AudioTrackTrigsArray,
pub midi_track_trigs: MidiTrackTrigsArray,
pub scale: PatternScaleSettings,
pub chain_behaviour: PatternChainBehavior,
pub unknown: u8,
pub part_assignment: u8,
pub tempo_1: u8,
pub tempo_2: u8,
}Expand description
A pattern of trigs stored in the bank.
Fields§
§header: [u8; 8]Header indicating start of pattern section
example data:
PTRN....
50 54 52 4e 00 00 00 00audio_track_trigs: AudioTrackTrigsArrayAudio Track data
midi_track_trigs: MidiTrackTrigsArrayMIDI Track data
scale: PatternScaleSettingsPattern scaling controls and settings
chain_behaviour: PatternChainBehaviorPattern chaining behaviour and settings
unknown: u8Unknown data.
part_assignment: u8The Part of a Bank assigned to a Pattern. Part 1 = 0; Part 2 = 1; Part 3 = 2; Part 4 = 3. Credit to @sezare56 on elektronauts for catching this one
tempo_1: u8Pattern setting for Tempo.
The Tempo value is split across both tempo_1 and tempo_2.
Yet to figure out how they relate to each other.
Value of 120 BPM is 11 for this field. Value of 30 BPM is 2 for this field.
tempo_2: u8Pattern setting for Tempo.
The Tempo value is split across both tempo_1 and tempo_2.
Tet to figure out how they relate to each other.
Value of 120 BPM is 64 for this field.
Value of 30 BPM is 208 for this field.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Pattern
impl<'de> Deserialize<'de> for Pattern
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl HasHeaderField for Pattern
impl HasHeaderField for Pattern
Source§fn check_header(&self) -> Result<bool, OtToolsIoError>
fn check_header(&self) -> Result<bool, OtToolsIoError>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more