Skip to content

fix: match Synesthesia's measured bang smooth, transitions, control shapes and script globals (D702-D705) - #158

Merged
lnorton89 merged 12 commits into
masterfrom
feat/syn-probe-fixes
Dec 3, 2026
Merged

lnorton89 merged 12 commits into
masterfrom
feat/syn-probe-fixes

Conversation

@lnorton89

Copy link
Copy Markdown
Owner

Follows #138: measure Synesthesia running, then make Strobe match. This adds a probe kit, tools/syn-probes: six original scenes that draw what they measure as a strip chart, one column per frame, plus scripts that capture the window, read the strips back and send OSC. The kit ran on the T480 against a signed-in Synesthesia 1.25.4. The results are committed in tools/syn-probes/results/2026-12-02.

What changed in Strobe

  • D702, bang smooth: the value now reaches 1.0 on the frame of the press, then falls by 1 - PARAMS each frame, the same curve Synesthesia showed at 60 fps. Strobe keeps its decay frame-rate independent.
  • D703, transitions:
    • A hard transition draws from all of its values, including the one on screen, so it can repeat; Synesthesia repeated 0.1 three times in a row.
    • A family never re-picks.
    • A family's fade is now exponential: tau is 0.207 s with no DURATION and 0.427 s at DURATION 1. Strobe assumes tau = 0.427 × DURATION.
    • This partly supersedes D489 and D660.
  • D704, odd control shapes:
    • A dropdown with more LABELS than VALUES: the extra labels send the last value.
    • An untyped control whose DEFAULT has three numbers becomes a slider set to the first number. It used to be a colour picker.
    • This partly supersedes D412.
  • D705, script globals: scripts now see syn_InputLevel (it carries syn_Level, the closest value Strobe has) and syn_BassExpoCurve (always 0), as Synesthesia's scripts do.

Docs

Not verified

  • Fade length vs DURATION: only DURATION 1 was measured, so tau scaling with DURATION is an assumption (Q33). One automatic transition right after a load cut straight to the new value; Strobe always fades.
  • syn_InputLevel is an approximation. What drives it and syn_BassExpoCurve is still open (Q25).
  • Mouse uniforms never moved under the synthetic pointer, so Q2 needs a person with a real mouse.
  • Q34: the strip charts filled only three quarters of the output width under "Rescale All Passes Relatively".

Tests

  • Windows: strobe-scene, strobe-script, strobe-app and strobe-playlist all pass.
    • One timing test, ten_thousand_set_uniform_calls_in_one_update_are_cheap, failed while a WSL build loaded the machine. It passes alone.
  • WSL Mesa (headless GL): the transitions and script_uniforms tests pass.
  • After the merge: clippy on the affected crates, fmt and the conventions tests (65) are clean.

…a strip chart, with capture, read-back and OSC scripts (S1, S2, S4, S6, S10, S11, S12)

Six original scenes for tools/syn-probes: bang smooth and slider smooth envelopes, hard and smooth transitions from the first frame, the mouse uniforms and three script globals, and the dropdown, untyped-control and unknown-key shapes of Q32 and Q6. A buffer pass scrolls one column a frame, so one PrintWindow capture holds the last 256 frames and read-strip.ps1 turns it into a CSV. All six load and run in both dialects in the corpus harness.
…locks user scenes (S1, S2, S4, S6, S10, S11, S12)
…C names, transitions, inputs, dropdown and control shapes, Reactivity and Audio Speed ranges (S1, S2, S4, S5, S6, S10, S11, S12)
@github-actions

github-actions Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @lnorton89's task in 29s —— View job


Review of #158

I read the Rust changes in strobe-scene and strobe-script, the tests, and the new decision files. I found nothing wrong.

  • D702, bang smooth: the peak lands on the press frame and decay is 1 - PARAMS per sixtieth of a second, scaled by dt. A dt of 0 holds the peak, and the test covers that. Normalised units keep inverted ranges working, and dropping attacking leaves no dead state.
  • D703, transitions:
    • The fade is exponential, 1 - exp(-dt/tau), so it is frame-rate independent. DURATION 0 cuts and lands in fire() through step(0.0).
    • The LANDED snap guarantees a finished fade is exactly one-hot.
    • Hard transitions can now repeat, and a family never re-picks the member that is on.
    • Nothing allocates per frame.
    • The tau scaling with DURATION is an assumption (Q33). The PR already says so, and the docs and code comments say it too.
  • D704, control shapes: extra labels send the last value. A three-number DEFAULT on an untyped control gives a slider set to the first number. The four-number case is assumed to behave the same way, and the code comment says so. The old test is replaced.
  • D705, script globals: the new conformance test covers syn_InputLevel and syn_BassExpoCurve.
  • House rules: I saw no unwrap, expect, panic!, #[allow], wildcard arms or unsafe. D702 to D705 each have a decision file. D412, D489 and D660 carry supersession notes. ROADMAP, STATUS_AUDIT, COMPATIBILITY and the backlog are updated. CHANGELOG.md is untouched.

Nits, no change needed:

  • The tools/syn-probes/results/ CSVs and PNGs add about 10k lines, mostly data. That is fine as committed evidence.
  • You listed ten_thousand_set_uniform_calls_in_one_update_are_cheap as flaky under load. Its timing threshold may be worth loosening in a separate PR.

I didn't run the tests or CI myself. The PR's own test results are as reported in the description.
· branch feat/syn-probe-fixes

@lnorton89
lnorton89 merged commit ea1c835 into master Dec 3, 2026
19 of 21 checks passed
@lnorton89
lnorton89 deleted the feat/syn-probe-fixes branch December 3, 2026 00:46
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.

1 participant