pub struct AudioTrackTrigMasks {
pub trigger: [u8; 8],
pub trigless: [u8; 8],
pub plock: [u8; 8],
pub oneshot: [u8; 8],
pub recorder: [u8; 32],
pub swing: [u8; 8],
pub slide: [u8; 8],
}Expand description
Trig bitmasks array for Audio Tracks.
Can be converted into an array of booleans using the get_track_trigs_from_bitmasks function.
Trig bitmask arrays have bitmasks stored in this order, which is slightly confusing (pay attention to the difference with 7 + 8!):
- 1st half of the 4th page
- 2nd half of the 4th page
- 1st half of the 3rd page
- 2nd half of the 3rd page
- 1st half of the 2nd page
- 2nd half of the 2nd page
- 2nd half of the 1st page
- 1st half of the 1st page
§Bitmask values for trig positions
With single trigs in a half-page
positions
1 2 3 4 5 6 7 8 | mask value
----------------|-----------
- - - - - - - - | 0
x - - - - - - - | 1
- x - - - - - - | 2
- - x - - - - - | 4
- - - x - - - - | 8
- - - - x - - - | 16
- - - - - x - - | 32
- - - - - - x - | 64
- - - - - - - x | 128When there are multiple trigs in a half-page, the individual position values are summed together:
1 2 3 4 5 6 7 8 | mask value
----------------|-----------
x x - - - - - - | 1 + 2 = 3
x x x x - - - - | 1 + 2 + 4 + 8 = 15§Fuller diagram of mask values
positions
1 2 3 4 5 6 7 8 | mask value
----------------|-----------
x - - - - - - - | 1
- x - - - - - - | 2
x x - - - - - - | 3
- - x - - - - - | 4
x - x - - - - - | 5
- x x - - - - - | 6
x x x - - - - - | 7
- - - x - - - - | 8
x - - x - - - - | 9
- x - x - - - - | 10
x x - x - - - - | 11
- - x x - - - - | 12
x - x x - - - - | 13
- x x x - - - - | 14
x x x x - - - - | 15
................|....
x x x x x x - - | 63
................|....
- - - - - - - x | 128
................|....
- x - x - x - x | 170
................|....
- - - - x x x x | 240
................|....
x x x x x x x x | 255Fields§
§trigger: [u8; 8]Trigger Trig masks – indicate which Trigger Trigs are active. Base track Trig masks are stored backwards, meaning the first 8 Trig positions are the last bytes in this section.
trigless: [u8; 8]Envelope Trig masks – indicate which Envelope Trigs are active.
See the description of the trig_trig_masks field for an
explanation of how the masking works.
plock: [u8; 8]Parameter-Lock Trig masks – indicate which Parameter-Lock Trigs are active.
See the description of the trig_trig_masks field for an
explanation of how the masking works.
oneshot: [u8; 8]Hold Trig masks – indicate which Hold Trigs are active.
See the description of the trig_trig_masks field for an
explanation of how the masking works.
recorder: [u8; 32]Recorder Trig masks – indicate which Recorder Trigs are active. These seem to function differently to the main Track Trig masks. Filling up Recorder Trigs on a Pattern results in a 32 length array instead of 8 length. Possible that the Trig type is stored in this array as well.
swing: [u8; 8]Swing trigs Trig masks.
slide: [u8; 8]Parameter Slide trigs Trig masks.
Trait Implementations§
Source§impl Clone for AudioTrackTrigMasks
impl Clone for AudioTrackTrigMasks
Source§fn clone(&self) -> AudioTrackTrigMasks
fn clone(&self) -> AudioTrackTrigMasks
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AudioTrackTrigMasks
impl Debug for AudioTrackTrigMasks
Source§impl Default for AudioTrackTrigMasks
impl Default for AudioTrackTrigMasks
Source§impl<'de> Deserialize<'de> for AudioTrackTrigMasks
impl<'de> Deserialize<'de> for AudioTrackTrigMasks
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 PartialEq for AudioTrackTrigMasks
impl PartialEq for AudioTrackTrigMasks
Source§impl Serialize for AudioTrackTrigMasks
impl Serialize for AudioTrackTrigMasks
impl StructuralPartialEq for AudioTrackTrigMasks
Auto Trait Implementations§
impl Freeze for AudioTrackTrigMasks
impl RefUnwindSafe for AudioTrackTrigMasks
impl Send for AudioTrackTrigMasks
impl Sync for AudioTrackTrigMasks
impl Unpin for AudioTrackTrigMasks
impl UnwindSafe for AudioTrackTrigMasks
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