feat(playback): Semitones strategy, 2-decimal speed label, advanced fine steps (#1084)

* feat(playback): varispeed-by-semitones strategy and 2-decimal speed label

Adds a fourth playback-rate strategy "Varispeed (semitones)" — a frontend
lens over varispeed where the user dials the pitch change directly in
semitones (±12 st, 0.1 step) and speed = 2^(st/12). Engine contract is
unchanged: the store maps it to the existing "varispeed" Rust strategy via
engineStrategy(), and switching between the two varispeed lenses at the same
speed no longer restarts the track.

Also widens the speed readout to two decimals (formatSpeedLabel → toFixed(2))
so every 0.05 slider step is visible (1.05×, 1.10×, 1.15×), addressing the
feedback on issue #531 that the label looked stuck between steps.

Includes new i18n keys and updated hint across all 9 locales, plus Vitest
coverage for the new helper, label formatting, and the no-restart lens switch.

* refactor(playback): shorten Semitones strategy label, add per-strategy tooltips

Renames the fourth strategy to a concise "Semitones" (was "Varispeed
(semitones)") across all 9 locales, and lets the four strategy buttons share
the row width so they fit on one line in Settings while still wrapping in the
narrow player popover. Each strategy button now has a short hover tooltip
explaining how it is built (incl. the 2^(st/12) and 12 × log2(speed) maths).

* feat(playback): advanced fine-step precision for speed/pitch sliders

Adds an opt-in "Fine adjustment" toggle in Settings → Audio (visible only in
Advanced mode) that shrinks the playback-rate slider steps to 0.01× for speed
and 0.01 st for pitch/semitones, with the pitch readout widening to two
decimals to match. Default behaviour (0.05× / 0.1 st) is unchanged. The
preference is UI-only (persisted, not sent to the engine) and also applies to
the player-bar popover and wheel. Addresses the finer-precision request on
issue #531 without cluttering the default UX.

* docs: changelog and credits for playback speed follow-up (PR #1084)
This commit is contained in:
cucadmuh
2026-06-14 01:32:20 +03:00
committed by GitHub
parent 41c8187186
commit 0b7d9eae2d
19 changed files with 341 additions and 46 deletions
+9 -1
View File
@@ -492,12 +492,20 @@ export const settings = {
playbackRateStrategy: 'Strategy',
playbackRateStrategySpeed: 'Speed',
playbackRateStrategyVarispeed: 'Varispeed',
playbackRateStrategyVarispeedSemitones: 'Semitones',
playbackRateStrategyPreserve: 'Pitch shift',
playbackRateStrategySpeedTip: 'Changes tempo; pitch is corrected automatically.',
playbackRateStrategyVarispeedTip: 'Speed and pitch move together, like tape. Pitch follows speed: 12 × log2(speed).',
playbackRateStrategyVarispeedSemitonesTip: 'Varispeed dialled directly in semitones. Speed = 2^(st/12).',
playbackRateStrategyPreserveTip: 'Adjustable tempo plus a manual pitch offset (±12 st).',
playbackRateSpeed: 'Speed',
playbackRatePitch: 'Pitch',
playbackRateDerivedPitch: 'Pitch shift from speed: {{value}}',
playbackRateDerivedSpeed: 'Speed from semitones: {{value}}',
playbackRateFineStep: 'Fine adjustment',
playbackRateFineStepDesc: 'Smaller slider steps: 0.01× for speed and 0.01 st for pitch.',
playbackRateAutoPitch: 'Pitch is corrected automatically.',
playbackRateHint: 'Speed keeps pitch natural. Varispeed changes pitch with speed. Pitch shift adds a manual offset. Uses more CPU than varispeed. Not for radio, previews, or Orbit.',
playbackRateHint: 'Speed keeps pitch natural. Varispeed changes pitch with speed. Varispeed (semitones) sets that pitch change directly in semitones. Pitch shift adds a manual offset. Uses more CPU than varispeed. Not for radio, previews, or Orbit.',
playbackRateNeutral: 'At 1.0× with no pitch offset, playback is normal.',
playbackRateOrbitPaused: 'Not applied during Orbit sessions — playback stays at 1.0× for sync.',
playbackRateOrbitPausedShort: 'Orbit: 1.0× for sync.',