pub struct CenterPanel {Show 19 fields
pub lower_part: Instrument,
pub upper_part: Instrument,
pub lower_octave_shift: OctaveShift,
pub upper_octave_shift: OctaveShift,
pub lower_sustain: bool,
pub upper_sustain: bool,
pub lower_control: bool,
pub upper_control: bool,
pub unknown_boolean1: bool,
pub split: bool,
pub split_point: SplitPoint,
pub transpose_enabled: bool,
pub transpose: Transpose,
pub part_mix: PartMix,
pub gain: Level,
pub organ_type: OrganType,
pub lower_enabled: bool,
pub upper_enabled: bool,
pub drawbar_live: bool,
/* private fields */
}Expand description
The center panel: part selection, split, transpose, gain, and the organ selector.
Unclaimed bits, kept verbatim through a re-encode: 48..=55.
The body’s map, in offset order:
| bytes | bits | field | type |
|---|---|---|---|
0x00 bits 7..5 | 0..=2 | lower_part | Instrument |
0x00 bits 4..2 | 3..=5 | upper_part | Instrument |
0x00 bits 1..0; 0x01 bits 7..6 | 6..=9 | lower_octave_shift | OctaveShift |
0x01 bits 5..2 | 10..=13 | upper_octave_shift | OctaveShift |
0x01 bit 1 | 14..=14 | lower_sustain | bool |
0x01 bit 0 | 15..=15 | upper_sustain | bool |
0x02 bit 7 | 16..=16 | lower_control | bool |
0x02 bit 6 | 17..=17 | upper_control | bool |
0x02 bit 5 | 18..=18 | unknown_boolean1 | bool |
0x02 bit 4 | 19..=19 | split | bool |
0x02 bits 3..1 | 20..=22 | split_point | SplitPoint |
0x02 bit 0 | 23..=23 | transpose_enabled | bool |
0x03 bits 7..4 | 24..=27 | transpose | Transpose |
0x03 bits 3..0; 0x04 bits 7..5 | 28..=34 | part_mix | PartMix |
0x04 bits 4..0; 0x05 bits 7..6 | 35..=41 | gain | Level |
0x05 bits 5..3 | 42..=44 | organ_type | OrganType |
0x05 bit 2 | 45..=45 | lower_enabled | bool |
0x05 bit 1 | 46..=46 | upper_enabled | bool |
0x05 bit 0 | 47..=47 | drawbar_live | bool |
0x06 | 48..=55 | — | unclaimed |
Fields§
§lower_part: InstrumentBits 0..=2 (byte 0x00, bits 7..5).
upper_part: InstrumentBits 3..=5 (byte 0x00, bits 4..2).
lower_octave_shift: OctaveShiftBits 6..=9 (byte 0x00, bits 1..0; byte 0x01, bits 7..6).
upper_octave_shift: OctaveShiftBits 10..=13 (byte 0x01, bits 5..2).
lower_sustain: boolBits 14..=14 (byte 0x01, bit 1).
upper_sustain: boolBits 15..=15 (byte 0x01, bit 0).
lower_control: boolBits 16..=16 (byte 0x02, bit 7).
upper_control: boolBits 17..=17 (byte 0x02, bit 6).
unknown_boolean1: boolZero in every specimen. Inferred from specimens; not confirmed on hardware.
Bits 18..=18 (byte 0x02, bit 5).
split: boolBits 19..=19 (byte 0x02, bit 4).
split_point: SplitPointBits 20..=22 (byte 0x02, bits 3..1).
transpose_enabled: boolSticky: the instrument sets this the first time transposition is changed and never clears it again, so it stays true after the value is put back to 0. It marks that transposition has been touched, not that the program is transposed.
The transpose light is on for transpose_enabled && transpose != 0. Neither field
answers on its own — a caller reporting or editing transposition must read both.
Confirmed on hardware.
Bits 23..=23 (byte 0x02, bit 0).
transpose: TransposeHalf-step transposition, -6..=6, stored biased by 6.
Carries no meaning while transpose_enabled is clear: an
untouched program stores +1 there rather than 0. Inferred from specimens; not
confirmed on hardware. Every specimen with the enable clear holds +1.
Bits 24..=27 (byte 0x03, bits 7..4).
part_mix: PartMixBits 28..=34 (byte 0x03, bits 3..0; byte 0x04, bits 7..5).
gain: LevelBits 35..=41 (byte 0x04, bits 4..0; byte 0x05, bits 7..6).
organ_type: OrganTypeBits 42..=44 (byte 0x05, bits 5..3).
lower_enabled: boolBits 45..=45 (byte 0x05, bit 2).
upper_enabled: boolBits 46..=46 (byte 0x05, bit 1).
drawbar_live: boolBits 47..=47 (byte 0x05, bit 0).
Implementations§
Source§impl CenterPanel
impl CenterPanel
Sourcepub fn field_values(&self) -> Vec<FieldValue>
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.
pub fn field_specs() -> Vec<FieldSpec>
Trait Implementations§
Source§impl Body for CenterPanel
impl Body for CenterPanel
Source§fn read<R: Read + Seek>(
r: &mut BodyReader<'_, R>,
_: &Header,
) -> Result<Self, Error>
fn read<R: Read + Seek>( r: &mut BodyReader<'_, R>, _: &Header, ) -> Result<Self, Error>
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§impl BodyLayout for CenterPanel
impl BodyLayout for CenterPanel
Source§fn layout() -> &'static [LayoutField]
fn layout() -> &'static [LayoutField]
Source§impl Debug for CenterPanel
The decoded values; the backing bytes are not printed.
impl Debug for CenterPanel
The decoded values; the backing bytes are not printed.