pub struct Program {
pub program_version: u16,
pub center_panel: CenterPanel,
pub piano_panel: PianoPanel,
pub sample_panel: SamplePanel,
pub organ_panel: OrganPanel,
pub effects_panel: EffectsPanel,
/* private fields */
}Expand description
The 121-byte panel body: five panels behind a version echo. The pads between the panels are unclaimed bits, kept verbatim.
Reads and writes byte-exactly. A read verifies the container checksum, gates
on KNOWN_VERSIONS and the aux word, validates the slot, and range-checks
every field. Placements are pinned by a change-one-knob specimen corpus
written by the instrument; each panel marks its own placements’ provenance.
Unclaimed bits, kept verbatim through a re-encode: 72..=111, 176..=207.
The body’s map, in offset order:
| bytes | bits | field | type |
|---|---|---|---|
0x00..0x02 | 0..=15 | program_version | u16 |
0x02..0x09 | 16..=71 | center_panel | CenterPanel |
0x09..0x0e | 72..=111 | — | unclaimed |
0x0e..0x16 | 112..=175 | piano_panel | PianoPanel |
0x16..0x1a | 176..=207 | — | unclaimed |
0x1a..0x22 | 208..=271 | sample_panel | SamplePanel |
0x22..0x67 | 272..=823 | organ_panel | OrganPanel |
0x67..0x79 | 824..=967 | effects_panel | EffectsPanel |
Fields§
§program_version: u16Every specimen echoes the header’s schema version.
Bits 0..=15 (byte 0x00, bits 7..0; byte 0x01, bits 7..0).
center_panel: CenterPanelBytes 0x02..0x09.
piano_panel: PianoPanelBytes 0x0e..0x16.
sample_panel: SamplePanelBytes 0x1a..0x22.
organ_panel: OrganPanelBytes 0x22..0x67.
effects_panel: EffectsPanelBytes 0x67..0x79.
Implementations§
Source§impl Program
impl Program
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 Program
impl Body for Program
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.