Skip to main content

EffectsPanel

Struct EffectsPanel 

Source
pub struct EffectsPanel {
Show 27 fields pub fx1: Routing, pub fx1_type: Fx1Type, pub fx1_rate: Rate, pub fx2: Routing, pub fx2_type: Fx2Type, pub fx2_rate: Rate, pub fx4: Routing, pub fx4_feedback: RangedU8<3>, pub fx4_tempo: Time, pub fx4_moisture: Level, pub fx4_ping_pong: bool, pub equalizer_on: bool, pub equalizer_part: EqualizerPart, pub equalizer_freq: Frequency, pub equalizer_treble: EqBand, pub equalizer_freq_gain: EqBand, pub equalizer_bass: EqBand, pub fx3: Routing, pub fx3_type: Fx3Type, pub fx3_compression: Level, pub fx5: bool, pub fx5_type: Fx5Type, pub fx5_moisture: Level, pub rotary_stop: bool, pub rotary_speed: RotorSpeed, pub fx1_control: bool, pub fx2_deep: bool, /* private fields */
}
Expand description

The effects panel: the four effect slots, the reverb, the rotary and the EQ.

Unclaimed bits, kept verbatim through a re-encode: 46, 100..=114, 119..=143.

The body’s map, in offset order:

bytesbitsfieldtype
0x00 bits 7..60..=1fx1Routing
0x00 bits 5..22..=5fx1_typeFx1Type
0x00 bits 1..0; 0x01 bits 7..36..=12fx1_rateRate
0x01 bits 2..113..=14fx2Routing
0x01 bit 0; 0x02 bits 7..515..=18fx2_typeFx2Type
0x02 bits 4..0; 0x03 bits 7..619..=25fx2_rateRate
0x03 bits 5..426..=27fx4Routing
0x03 bits 3..228..=29fx4_feedbackRangedU8<3>
0x03 bits 1..0; 0x04 bits 7..330..=36fx4_tempoTime
0x04 bits 2..0; 0x05 bits 7..437..=43fx4_moistureLevel
0x05 bit 344..=44fx4_ping_pongbool
0x05 bit 245..=45equalizer_onbool
0x05 bit 146..=46unclaimed
0x05 bit 0; 0x06 bits 7..247..=53equalizer_freqFrequency
0x06 bits 1..0; 0x07 bits 7..354..=60equalizer_trebleEqBand
0x07 bits 2..0; 0x08 bits 7..461..=67equalizer_freq_gainEqBand
0x08 bits 3..0; 0x09 bits 7..568..=74equalizer_bassEqBand
0x09 bits 4..375..=76fx3Routing
0x09 bits 2..077..=79fx3_typeFx3Type
0x0a bits 7..180..=86fx3_compressionLevel
0x0a bit 087..=87fx5bool
0x0b bits 7..588..=90fx5_typeFx5Type
0x0b bits 4..0; 0x0c bits 7..691..=97fx5_moistureLevel
0x0c bit 598..=98rotary_stopbool
0x0c bit 499..=99rotary_speedRotorSpeed
0x0c bits 3..0; 0x0d bits 7..0; 0x0e bits 7..5100..=114unclaimed
0x0e bit 4115..=115fx1_controlbool
0x0e bit 3116..=116fx2_deepbool
0x0e bits 2..1117..=118equalizer_partEqualizerPart
0x0e bit 0; 0x0f bits 7..0; 0x10 bits 7..0; 0x11 bits 7..0119..=143unclaimed

Fields§

§fx1: Routing

Bits 0..=1 (byte 0x00, bits 7..6).

§fx1_type: Fx1Type

Bits 2..=5 (byte 0x00, bits 5..2).

§fx1_rate: Rate

The effect’s rate, in hertz. ⚠️ Not a Level: the panel does not read this on its 0..10 scale, which is why it is a Rate.

Bits 6..=12 (byte 0x00, bits 1..0; byte 0x01, bits 7..3).

§fx2: Routing

Bits 13..=14 (byte 0x01, bits 2..1).

§fx2_type: Fx2Type

Bits 15..=18 (byte 0x01, bit 0; byte 0x02, bits 7..5).

§fx2_rate: Rate

Bits 19..=25 (byte 0x02, bits 4..0; byte 0x03, bits 7..6).

§fx4: Routing

Bits 26..=27 (byte 0x03, bits 5..4).

§fx4_feedback: RangedU8<3>

Bits 28..=29 (byte 0x03, bits 3..2).

§fx4_tempo: Time

Delay time. ⚠️ Runs backwards: the panel reads 750 ms at 0 and 20 ms at 127, so this is not on the 0..10 scale and not monotonic with it either.

Bits 30..=36 (byte 0x03, bits 1..0; byte 0x04, bits 7..3).

§fx4_moisture: Level

Delay wet/dry.

Bits 37..=43 (byte 0x04, bits 2..0; byte 0x05, bits 7..4).

§fx4_ping_pong: bool

Bits 44..=44 (byte 0x05, bit 3).

§equalizer_on: bool

EQ engaged.

Bits 45..=45 (byte 0x05, bit 2).

§equalizer_part: EqualizerPart

Which part the equalizer applies to. Whether it is engaged at all is the separate bit above.

Bits 117..=118 (byte 0x0e, bits 2..1).

§equalizer_freq: Frequency

The sweepable mid frequency, in hertz.

Bits 47..=53 (byte 0x05, bit 0; byte 0x06, bits 7..2).

§equalizer_treble: EqBand

Bits 54..=60 (byte 0x06, bits 1..0; byte 0x07, bits 7..3).

§equalizer_freq_gain: EqBand

The mid band’s boost/cut. ⚠️ Bipolar — its musical zero is the centre of the slot, so the 0..10 reading a Level prints would show a cut as a small boost.

Bits 61..=67 (byte 0x07, bits 2..0; byte 0x08, bits 7..4).

§equalizer_bass: EqBand

Bits 68..=74 (byte 0x08, bits 3..0; byte 0x09, bits 7..5).

§fx3: Routing

Bits 75..=76 (byte 0x09, bits 4..3).

§fx3_type: Fx3Type

Bits 77..=79 (byte 0x09, bits 2..0).

§fx3_compression: Level

Bits 80..=86 (byte 0x0a, bits 7..1).

§fx5: bool

Bits 87..=87 (byte 0x0a, bit 0).

§fx5_type: Fx5Type

Bits 88..=90 (byte 0x0b, bits 7..5).

§fx5_moisture: Level

Bits 91..=97 (byte 0x0b, bits 4..0; byte 0x0c, bits 7..6).

§rotary_stop: bool

Bits 98..=98 (byte 0x0c, bit 5).

§rotary_speed: RotorSpeed

Bits 99..=99 (byte 0x0c, bit 4).

§fx1_control: bool

fx1 control pedal.

Bits 115..=115 (byte 0x0e, bit 4).

§fx2_deep: bool

fx2 deep.

Bits 116..=116 (byte 0x0e, bit 3).

Implementations§

Source§

impl EffectsPanel

Source

pub fn field_values(&self) -> Vec<FieldValue>

Every registered field’s current value, under its full path, in declaration order — nested bodies inline where their field sits. Describes the same fields as Self::field_specs, so callers may zip the two positionally.

Source

pub fn field_specs() -> Vec<FieldSpec>

Source

pub fn fields(&self) -> Vec<Field>

Every settable field, described under its full path.

Source

pub fn set_field(&mut self, path: &str, value: &str) -> Result<(), FieldError>

Set one field by its full path.

Trait Implementations§

Source§

impl Body for EffectsPanel

Source§

const LEN: Option<u64>

Fixed body length, when the format has one; checked on read and write.
Source§

fn read<R: Read + Seek>( r: &mut BodyReader<'_, R>, _: &Header, ) -> Result<Self, Error>

Decode from r, which is scoped to the body: position 0 is the first body byte and BodyReader::len is known. header is for version gating and location/aux interpretation, not for layout — the container already consumed the header bytes.
Source§

fn write<W: Write + Seek>(&self, w: &mut BodyWriter<'_, W>) -> Result<(), Error>

Encode to w in one forward pass.
Source§

impl BodyLayout for EffectsPanel

Source§

fn layout() -> &'static [LayoutField]

Every placed field, in declaration order. Bits no field claims are preserved by the codec but have no entry here — there is no name to report them under.
Source§

impl Debug for EffectsPanel

The decoded values; the backing bytes are not printed.

Source§

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

Formats the value using the given formatter. Read more
Source§

impl Default for EffectsPanel

Source§

fn default() -> EffectsPanel

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

impl From<&EffectsPanel> for [u8; 18]

Source§

fn from(p: &EffectsPanel) -> Self

Converts to this type from the input type.
Source§

impl TryFrom<[u8; 18]> for EffectsPanel

Source§

type Error = ParseError

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

fn try_from(raw: [u8; 18]) -> Result<Self, Self::Error>

Performs the conversion.

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> 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, 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.