Skip to main content

ArpPattern

Struct ArpPattern 

Source
pub struct ArpPattern { /* private fields */ }
Expand description

Sixteen pattern steps, two bits each — the Stage 4 arpeggiator’s accent, gate and pan rows.

The panel edits these as a grid: the manual’s Pattern Edit page moves a cursor with a Position dial and sets the step under it, and the Pattern Pan page moves a step “between Left, Center and Right”. Three values per step is exactly two bits, and a pattern runs to sixteen steps, which is exactly the 32-bit slot.

⚠️ Step order is inferred, not established. Read low-bits-first the corpus values fall out as music — 0x01010101 is an accent every fourth step, 0x55aa5500 is four left then four right then four left — but correlating the highest non-zero step against the sibling arp_pattern_length fails in both directions, so either the word keeps all sixteen steps regardless of the active length or that field is not a step count. Inferred from specimens; not confirmed on hardware.

The slot is wider than crate::fields::ENUMERABLE_BITS, so --set spells it by its stored bits — 0x55aa5500 is the readable form for a pattern anyway.

Implementations§

Source§

impl ArpPattern

Source

pub const STEPS: usize = 16

Steps a pattern can hold.

Source

pub fn raw(&self) -> u32

The stored word.

Source

pub fn steps(&self) -> [u8; 16]

The sixteen steps, 0..=3 each, lowest bits first.

Source

pub fn is_empty(&self) -> bool

Whether every step is zero — an unset row.

Trait Implementations§

Source§

impl Clone for ArpPattern

Source§

fn clone(&self) -> ArpPattern

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for ArpPattern

Source§

impl Debug for ArpPattern

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

The stored word in hex, which is what --set takes back.

Source§

impl Default for ArpPattern

Source§

fn default() -> ArpPattern

Returns the “default value” for a type. Read more
Source§

impl Display for ArpPattern

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

The steps as a row: 1010 1010 .... — a dot for a zero step.

Source§

impl Eq for ArpPattern

Source§

impl Hash for ArpPattern

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Packed for ArpPattern

Source§

const MAX_BITS: u32 = 32

Bits the widest value of this type occupies. Used to check statically that it fits its slot.
Source§

const DECODE_BITS: u32 = u32::BITS

Widest slot this type can decode without losing bits on re-encoding. Read more
Source§

const CONTROL: ControlKind

Which panel control this value is, for a caller building an interface over the field registry. Read more
Source§

type Error = !

Why a bit pattern is not a valid value. Infallible when every pattern is.
Source§

fn from_bits(bits: u64) -> Result<Self, Self::Error>

Decode from the field’s bits, already shifted down to bit 0 and masked.
Source§

fn to_bits(&self) -> u64

Encode to the field’s bits, in the same shifted-down form.
Source§

impl PartialEq for ArpPattern

Source§

fn eq(&self, other: &ArpPattern) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl PartialEq<u32> for ArpPattern

Source§

fn eq(&self, other: &u32) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for ArpPattern

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.