Repository navigation
Stepped speed fader with an exact-speed box (branch ready for review) #802
Copy link
Copy link
Open
Description
Proposed change: a stepped speed fader with an exact-speed box
Branch: https://github.com/ntonjsgo/stemdeck/tree/feat/different-speed
Compare: main...ntonjsgo:stemdeck:feat/different-speed
What
This replaces the three speed buttons (0.5x / slow / 1x) with a fader and, beside it, a box where you type the exact speed:
- Fader: goes from 0.50x to 1.00x, notched every 0.05x, with taller notches at 0.5, 0.75 and 1. Dragging or the arrow keys move it a hundredth at a time. The wheel jumps to the next notch (0.83 goes to 0.85 or 0.80). A double-click goes back to 1x.
- Box: takes any hundredth in that range, written as
0.83,0,83,0.83x,83or83%. Out-of-range values are clamped to the nearest end, and anything that isn't a number is ignored. The wheel and the up/down arrow keys move it by 0.01 (Shift+arrow by 0.05). It is highlighted while the song is slowed, like the key readout next to it.
Why
The slow button could only be adjusted by scrolling or arrowing in 0.01 steps (#701). Getting to a specific speed meant counting presses, and there was no way to type one. The fader shows where you are in the range at a glance, and the box lets you jump straight to the speed a passage needs. Half speed is still one gesture (#742, #743): drag the fader to its left end or type 0.5.
Details
- The rate is applied once a drag or scroll settles (150 ms), as the slow button did, because every rate change flushes the tempo stage.
- The control takes exactly the space of the three buttons it replaces (147px), so the footer fit from [Bug]: StemDeck UI Scaling in Windows #586 is unchanged.
- Guide mode now has one entry for the whole control, translated in all 11 languages (including a pt-PT override).
- Behaviour change: the slow speed is no longer remembered between sessions. There is one value now, and a track still opens at 1x.
- The upper limit stays at 1x, following the "practice speeds, not a tempo control" decision from [Feature]: Count-in #269. Allowing speeds above 1x would only mean changing
SPEED_MAXand the fader'smax.
Testing
- Full Playwright e2e suite run locally: 465/466 passed. The one failure was footer-fit at 1728px: the first version of the control was wider than the buttons. I narrowed it to the buttons' 147px, then re-ran the affected specs (footer-fit, speed-control, help-mode, transpose, tempo-stage): 57/57 pass.
tests/e2e/slow-speed.spec.mjsis rewritten astests/e2e/speed-control.spec.mjs, covering hundredth steps, notch jumps, typed and parsed values, clamping, and the wheel and arrow keys. The transpose, tempo-stage and help-mode specs are updated to use the new control.npm run test:jspasses, andnode --checkpasses on every changed JS file. No Python changes.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity