Skip to content

Global Settings: add Preferences - #12

Merged
john-baxter-dev merged 1 commit into
john-baxter-dev:masterfrom
rtsai:global-preferences
Aug 25, 2026
Merged

Global Settings: add Preferences#12
john-baxter-dev merged 1 commit into
john-baxter-dev:masterfrom
rtsai:global-preferences

Conversation

@rtsai

@rtsai rtsai commented Aug 24, 2026

Copy link
Copy Markdown

Decoded by changing a global setting on an HX Stomp XL, refreshing the fretwire UI, and seeing what changed.

Add all enumerated settings IDs to MENU_ORDER

Other changes made to existing settings to match the HX Stomp XL interface:

  • "Preset numbering" renamed to "Preset Number", moved from "Displays" to "Preferences", and "000-127" changed to "000-128" [sic] (on HX Stomp XL, 127 would be the maximum displayed preset identifier)
  • "Snapshot edits" renamed to "Snapshot Edits"
  • "Bypass type" renamed to "Bypass Type"; options shortened to just "DSP" and "Analog"
  • "Auto In-Z" specified with "First" and "Enabled" choice labels

Apparent misspelling are preserved to match the HX Stomp XL UI:

  • Preset numbering: "000-128" (on HX Stomp XL this should be 000-127 for 128 total presets, starting at 000)
  • "Authentc" probably means "Authentic", but likely shortened to fit on the screen

@rtsai rtsai left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comments for reviewer.

/// A choice with no entries is how "observed, never explained" is recorded — it must stay
/// legal, because the alternative is inventing labels.
#[test]
fn a_choice_may_be_empty() {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test now fails. I don't know if you want to just delete this test, or fabricate a "pure" test for this case.

"Tempo",
"MIDI",
"Preferences",
"Displays",

@rtsai rtsai Aug 24, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On the HX Stomp XL, Global Settings, the sections are in the following order:

  • Ins/Outs
  • Preferences
  • Footswitches
  • EXP Pedals
  • MIDI/Tempo (a single section, not two separate groups like here)
  • Displays

I tried moving "Preferences" up to be the second item in GROUPS, but nothing changed in UI. Maybe I needed to also change something else, but I didn't see it.

// [XL]
name: "Tempo Pitch",
group: "Preferences",
kind: Kind::Flag {

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It occurs to me that in #11 I don't think I was careful about using Kind::Flag vs. Kind::Choice; I likely just copy-pasted a nearby entry.

I was more careful in this PR to pick Kind::Flag or Kind::Choice based on whether the UI was showing "false/true" vs. "0/1".

@rtsai
rtsai force-pushed the global-preferences branch 2 times, most recently from c3df953 to 60d9ab8 Compare August 24, 2026 04:49
Decoded by changing a global setting on an HX Stomp XL,
refreshing the fretwire UI, and seeing what changed.

Add all enumerated settings IDs to MENU_ORDER

Other changes made to existing settings to match the HX Stomp XL
interface:

- "Preset numbering" renamed to "Preset Number", moved from
  "Displays" to "Preferences", and "000-127" changed to "000-128"
  [sic], all to match the HX Stomp XL interface

- "Snapshot edits" renamed to "Snapshot Edits"

- "Bypass type" renamed to "Bypass Type"; options shortened to
  just "DSP" and "Analog"

- "Auto In-Z" specified with "First" and "Enabled" choice labels
@rtsai
rtsai force-pushed the global-preferences branch from 60d9ab8 to e03207c Compare August 24, 2026 05:07
john-baxter-dev added a commit that referenced this pull request Aug 25, 2026
…t run

0 is First, 1 is Enabled, read off a Stomp. The empty-choice invariant
now states the shape rather than pinning id 127, so it survives that id
being explained.

dto.rs and ui/tests/globals-mock.mjs both still asserted id 27's old
name, and neither runs in CI: fretwire-tauri is out of default-members,
and npm test is never invoked. globals-mock has been red since 9dc105b.
The mock backend was missing all seven of #12's new settings.
@john-baxter-dev
john-baxter-dev merged commit e03207c into john-baxter-dev:master Aug 25, 2026
2 of 3 checks passed
@john-baxter-dev

Copy link
Copy Markdown
Owner

Merged, thanks!
I confirmed all six sections in the same order on a plain HX Stomp. Restructured separately: MIDI and Tempo merged, Footswitches and EXP Pedals added,
and Global EQ marked as the separate top-level menu it actually is. Your groupings were right — 95,
96, 68 and 69 really are under Preferences, which I checked because the names suggest otherwise.

Auto In-Z — your labels are correct. Read off a Stomp: 0 is First, 1 is Enabled.

GROUPS doing nothing wasn't your mistake. It had no reader but its own test — the panel kept a
second hardcoded copy of the order, and that's what rendered. Fixed: the backend sorts by
(group_rank, menu_rank, id) and the panel keeps no list, so your change now does what you expected.

Your #11 worry is unfounded. An unidentified id serialises with the value mirroring the wire
type, so "the UI showed false/true vs 0/1" is the wire type — exactly what Flag vs Choice encodes.
And your #11 Choices use values 1 and 2, which a bool can't produce. No audit needed.

On the test — good catch flagging it rather than deleting it. It was anchored to id 127, so it
failed for the one reason it never should: the table got better. Restated about the shape instead.
Two others were also stale and you had no way to see them — fretwire-tauri is out of
default-members and npm test was never in CI, so one suite had been red since 9dc105b. Both wired
in now; that was the real bug.

One thing back to you: can you re-read the preset-number range on the XL? A Stomp shows 000-125,
the correct max index for its 126 presets — so the firmware gets this right on at least one unit,
which undercuts the off-by-one theory you flagged. I'd expect 000-127. Your text stands with the
[sic] either way, so nothing's lost if it holds.

Also: those labels turned out to be device-specific, so they're now derived per unit from each
pedal's preset count — a Stomp gets 000-125/01A-42C, an XL 000-127/01A-32D, from one entry.

@rtsai

rtsai commented Aug 25, 2026

Copy link
Copy Markdown
Author

Your #11 worry is unfounded.
An unidentified id serialises with the value mirroring the wire
type, so "the UI showed false/true vs 0/1" is the wire type — exactly what Flag vs Choice encodes.
And your #11 Choices use values 1 and 2, which a bool
can't produce. No audit needed.

My concern is in the other direction - I had submitted quite a few Kind::Flag on/off settings that I'm wondering whether or not they should actually be Choices (with 0 and 1 values).

@rtsai

rtsai commented Aug 25, 2026

Copy link
Copy Markdown
Author

One thing back to you: can you re-read the preset-number range on the XL? A Stomp shows 000-125,
the correct max index for its 126 presets — so the firmware gets this right on at least one unit,
which undercuts the off-by-one theory you flagged. I'd expect 000-127. Your text stands with the
[sic] either way, so nothing's lost if it holds.

Yes, my HX Stomp XL indeed reports "01A-32D" and "000-128" as the choices for the "Preset Number" preference. If I select the "000-128", scrolling through all the presets only gets me up to 127, as expected. I'm pretty sure this is just a UI bug in the HX Stomp XL firmware, and probably/hopefully just a bad string in a table somewhere.

@john-baxter-dev

Copy link
Copy Markdown
Owner

Yes, my HX Stomp XL indeed reports "01A-32D" and "000-128" as the choices for the "Preset Number" preference.

Oh wow, weird

@john-baxter-dev

Copy link
Copy Markdown
Owner

I decided to make it 000-127, I couldn't in good conscience leave it wrong :p

Sorry, I misread your concern!

  • Writes are safe either way. set_setting_num reads the current value and matches the wire type
    against what the device actually holds — it never consults Kind, so a wrong one can't cause a
    refusal.
  • Display is safe for two-state settings. The panel's flag control tests truthiness, so an
    integer 0/1 under a Flag renders correctly.
  • The failure that matters is a third state. A setting with three options declared as a Flag
    shows two in the dropdown and renders the third as if it were the second. That one is silent and
    real.

So it's worth checking, but nothing is broken today. 154 Return Type is the one I'd look at first —
that has more than two options on some Helix units. setting-get distinguishes them: a bool prints
true/false, an int prints 0/1.

cargo run -p fretwire-cli -- setting-get 2     # Send/Return L
cargo run -p fretwire-cli -- setting-get 3     # Send/Return R
cargo run -p fretwire-cli -- setting-get 31    # Input Level
cargo run -p fretwire-cli -- setting-get 94    # Output Level
cargo run -p fretwire-cli -- setting-get 154   # Return Type

No rush on it — it's in captures/_TODO-settings-names.md with the rest, and I'll be running the
same check on a Stomp. If 154 turns out to have a third option on the XL and not the Stomp, that's
a finding worth having on its own.

Separately, if you ever feel like it: Footswitches and EXP Pedals are two whole sections with no
ids at all, and your section list is what told us they exist. captures/_TODO-settings-discovery.md
has the dump/change-one/dump loop written out. Entirely optional — you've already contributed more
hardware time than anyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants