v0.99.0: Boost Volume amplifies a quiet song's file up to a typical song's loudness (says how many dB and whether it clips; Edit ▸ Undo puts the original back), replacing the per-song Volume Adjustment, which could never play past full volume

This commit is contained in:
2026-11-19 22:51:16 -08:00
parent f52dd7f567
commit a7d061b200
10 changed files with 783 additions and 196 deletions
+15 -7
View File
@@ -139,13 +139,21 @@ persistence) → GUI (Qt widgets that read the manager and connect to its signal
without recursing. Widgets react to its signals (`playlists_changed`,
`playlist_content_changed(pid)`, `track_updated(id)`, `track_fields_edited`).
- **Per-track volume** (Round 79): `Track.volume_adjustment` is iTunes'
"Volume Adjustment", imported as-is (±255 = ±100%) and edited in Get Info.
`player.volume_with_adjustment` scales the slider's *perceptual* level by
it: −100% is silence, and a boost can't pass full. `Player` applies it
through `_output_volume()` everywhere it pushes volume to a sink, before
each load, and on `refresh_volume()` (MainWindow calls that when the
playing track is edited). `Player.volume()` stays the bare slider value.
- **Boost Volume** (Round 131, `boost.py`; Get Info's button and the
right-click menu) replaced Round 79's per-track Volume Adjustment, which
scaled the slider and so could never play past full — with the slider up
it did nothing (normalization has the same ceiling for quiet songs). The
file itself is amplified once: ebur128 measures integrated loudness and
true peak, the target is a *typical* song (`LoudnessAnalyzer.typical_lufs`,
the median measured), the clean limit is the true peak to −1 dBTP; when
typical needs more, the warning offers both (clean, or all the way and
clipping — trav wants iTunes' clipping boost available). ffmpeg rewrites
the same format (MP3 at V0, AAC 320k, lossless as itself), tags and art
copied, staged in `lossless.staging_root()`, then
`replace_track_files(…, in_place=True)` trashes the original and puts the
boosted file at the same path — one undo step. A boost of the playing song
`Player.reopen_current()`s it where it was (no new listen).
`Track.volume_adjustment` is still imported and stored but nothing reads it.
- **Volume normalization** (Round 83, `loudness.py`, Controls → Normalize
Volume / Preferences → General): each file's EBU R128 integrated loudness