pub struct Program {Show 29 fields
pub panel_b_selected: bool,
pub panel_enable: PanelEnable,
pub split_enabled: bool,
pub split_low_enabled: bool,
pub split_mid_enabled: bool,
pub split_high_enabled: bool,
pub split_low_note: SplitNote,
pub split_mid_note: SplitNote,
pub split_high_note: SplitNote,
pub split_low_width: SplitWidth,
pub split_mid_width: SplitWidth,
pub split_high_width: SplitWidth,
pub piano_layer_detune: PianoLayerDetune,
pub organ_pitch_stick: bool,
pub organ_vibrato_mode: OrganVibratoMode,
pub rotary_speaker_speed: RotorSpeed,
pub rotary_speaker_stop_mode: bool,
pub rotary_speaker_speed_wheel: SwitchMorph,
pub rotary_speaker_speed_aftertouch: SwitchMorph,
pub rotary_speaker_speed_ctrl_pedal: SwitchMorph,
pub transpose_enabled: bool,
pub transpose: StageTranspose,
pub master_clock: MasterTempo,
pub rotary_speaker_drive: Level,
pub dual_keyboard: bool,
pub dual_keyboard_style: DualKeyboardStyle,
pub synth_pitch_stick_range: Selector<4>,
pub panel_a: Panel,
pub panel_b: Panel,
/* private fields */
}Expand description
The program-wide globals at the head of the body. Bits are MSB-first from body
byte 0 (0x2c in a type-1 file), so byte 0x05 bit 7 is bit 40.
Reads and writes byte-exactly. A read verifies the container checksum, gates
on KNOWN_VERSIONS, and range-checks every field; unclaimed bits survive a
re-encode verbatim. Placements from the community byte maps; values raw except
where those maps enumerate them. Inferred from specimens; not confirmed on
hardware.
⚠️ The three split notes can be stored out of order — the panel reorders them on display (documented with specimens in the ns3-program-viewer sources). The decode reports what is stored.
Unclaimed bits, kept verbatim through a re-encode: 0..=39, 82..=95, 117, 124..=175.
The body’s map, in offset order:
| bytes | bits | field | type |
|---|---|---|---|
0x00..0x05 | 0..=39 | — | unclaimed |
0x05 bit 7 | 40..=40 | panel_b_selected | bool |
0x05 bits 6..5 | 41..=42 | panel_enable | PanelEnable |
0x05 bit 4 | 43..=43 | split_enabled | bool |
0x05 bit 3 | 44..=44 | split_low_enabled | bool |
0x05 bit 2 | 45..=45 | split_mid_enabled | bool |
0x05 bit 1 | 46..=46 | split_high_enabled | bool |
0x05 bit 0; 0x06 bits 7..5 | 47..=50 | split_low_note | SplitNote |
0x06 bits 4..1 | 51..=54 | split_mid_note | SplitNote |
0x06 bit 0; 0x07 bits 7..5 | 55..=58 | split_high_note | SplitNote |
0x07 bits 4..3 | 59..=60 | split_low_width | SplitWidth |
0x07 bits 2..1 | 61..=62 | split_mid_width | SplitWidth |
0x07 bit 0; 0x08 bit 7 | 63..=64 | split_high_width | SplitWidth |
0x08 bits 6..5 | 65..=66 | piano_layer_detune | PianoLayerDetune |
0x08 bit 4 | 67..=67 | organ_pitch_stick | bool |
0x08 bits 3..1 | 68..=70 | organ_vibrato_mode | OrganVibratoMode |
0x08 bit 0 | 71..=71 | rotary_speaker_speed | RotorSpeed |
0x09 bit 7 | 72..=72 | rotary_speaker_stop_mode | bool |
0x09 bits 6..4 | 73..=75 | rotary_speaker_speed_wheel | SwitchMorph |
0x09 bits 3..1 | 76..=78 | rotary_speaker_speed_aftertouch | SwitchMorph |
0x09 bit 0; 0x0a bits 7..6 | 79..=81 | rotary_speaker_speed_ctrl_pedal | SwitchMorph |
0x0a bits 5..0; 0x0b bits 7..0 | 82..=95 | — | unclaimed |
0x0c bit 7 | 96..=96 | transpose_enabled | bool |
0x0c bits 6..3 | 97..=100 | transpose | StageTranspose |
0x0c bits 2..0; 0x0d bits 7..3 | 101..=108 | master_clock | MasterTempo |
0x0d bits 2..0; 0x0e bits 7..4 | 109..=115 | rotary_speaker_drive | Level |
0x0e bit 3 | 116..=116 | dual_keyboard | bool |
0x0e bit 2 | 117..=117 | — | unclaimed |
0x0e bits 1..0 | 118..=119 | dual_keyboard_style | DualKeyboardStyle |
0x0f bits 7..4 | 120..=123 | synth_pitch_stick_range | Selector<4> |
0x0f bits 3..0; 0x10 bits 7..0; 0x11 bits 7..0; 0x12 bits 7..0; 0x13 bits 7..0; 0x14 bits 7..0; 0x15 bits 7..0 | 124..=175 | — | unclaimed |
0x16..0x11d | 176..=2279 | panel_a | Panel |
0x11d..0x224 | 2280..=4383 | panel_b | Panel |
Fields§
§panel_b_selected: boolBits 40..=40 (byte 0x05, bit 7).
panel_enable: PanelEnableBits 41..=42 (byte 0x05, bits 6..5).
split_enabled: boolBits 43..=43 (byte 0x05, bit 4).
split_low_enabled: boolBits 44..=44 (byte 0x05, bit 3).
split_mid_enabled: boolBits 45..=45 (byte 0x05, bit 2).
split_high_enabled: boolBits 46..=46 (byte 0x05, bit 1).
split_low_note: SplitNoteBits 47..=50 (byte 0x05, bit 0; byte 0x06, bits 7..5).
split_mid_note: SplitNoteBits 51..=54 (byte 0x06, bits 4..1).
split_high_note: SplitNoteBits 55..=58 (byte 0x06, bit 0; byte 0x07, bits 7..5).
split_low_width: SplitWidthBits 59..=60 (byte 0x07, bits 4..3).
split_mid_width: SplitWidthBits 61..=62 (byte 0x07, bits 2..1).
split_high_width: SplitWidthBits 63..=64 (byte 0x07, bit 0; byte 0x08, bit 7).
piano_layer_detune: PianoLayerDetuneBits 65..=66 (byte 0x08, bits 6..5).
organ_pitch_stick: boolBits 67..=67 (byte 0x08, bit 4).
organ_vibrato_mode: OrganVibratoModeBits 68..=70 (byte 0x08, bits 3..1).
rotary_speaker_speed: RotorSpeedBits 71..=71 (byte 0x08, bit 0).
rotary_speaker_stop_mode: boolBits 72..=72 (byte 0x09, bit 7).
rotary_speaker_speed_wheel: SwitchMorphBits 73..=75 (byte 0x09, bits 6..4).
rotary_speaker_speed_aftertouch: SwitchMorphBits 76..=78 (byte 0x09, bits 3..1).
rotary_speaker_speed_ctrl_pedal: SwitchMorphBits 79..=81 (byte 0x09, bit 0; byte 0x0a, bits 7..6).
transpose_enabled: boolBits 96..=96 (byte 0x0c, bit 7).
transpose: StageTransposeBits 97..=100 (byte 0x0c, bits 6..3).
master_clock: MasterTempoBits 101..=108 (byte 0x0c, bits 2..0; byte 0x0d, bits 7..3).
rotary_speaker_drive: LevelBits 109..=115 (byte 0x0d, bits 2..0; byte 0x0e, bits 7..4).
dual_keyboard: boolBits 116..=116 (byte 0x0e, bit 3).
dual_keyboard_style: DualKeyboardStyleBits 118..=119 (byte 0x0e, bits 1..0).
synth_pitch_stick_range: Selector<4>Bits 120..=123 (byte 0x0f, bits 7..4).
panel_a: PanelPanel A — the first of the program’s two complete setups.
Bytes 0x16..0x11d.
panel_b: PanelPanel B. Same type: the two are the same layout, and neither is
a copy of the other — panel_enable says which sound.
Bytes 0x11d..0x224.
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.