feat(mixer): live multi-color LUFS meters per deck - #88
Merged
Conversation
Replace the flat green peak bars in the mixer cluster with segmented LED meters on a -40..0 LUFS scale, driven by timestretch's new MomentaryLoudness streaming BS.1770-4 meter (400 ms window) fed the post-trim pre-fader signal in the audio callback. Zones: green below -14 LUFS, amber to -9, red above; a red strip at the top flags peaks at the ceiling. The analysis worker now measures integrated loudness on the original interleaved signal (the mono downmix reads ~3 dB low) and stores it in the artifact; the meter draws it as a reference marker so two decks can be gain-matched by aligning bars to markers. The marker prefers a completed analysis still pending engine adoption, since it is display-only. Tracks analyzed before this change show no marker until re-analyzed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replaces the flat green 6 px peak bars between the channel strips with 12 px segmented LED meters on a −40..0 LUFS scale, driven by the new
MomentaryLoudnessstreaming BS.1770-4 meter from timestretch-rs 0.10.0 (robmorgan/timestretch-rs#26, merged).audio.rs): oneMomentaryLoudnessper deck (all 3, audition included) fed the post-trim pre-fader stereo pair per frame — the same tap as the peak meter. Published per block into a newDeckShared::meter_lufsatomic; no extra ballistics (the 400 ms window is its own integration). Meters reset on processor adoption and warm-start seeks so transitions don't ghost. The meter's push/read paths are allocation- and lock-free (verified against the ebur128 source), keeping the callback rules intact.app.rs): 3 px LED segments lit bottom-up, each colored by its own position — green below −14 LUFS, amber (ACCENT) to −9, red above — reusing the master/CPU meter palette. A light marker sits at the track's integrated LUFS (gain-match decks by aligning bars to markers), a red top strip flags peaks at the ceiling, and hover shows the numeric momentary/integrated values. Mixer panel widens 130 → 144 px.worker.rs): analysis now runsmeasure_loudnesson the original interleaved signal (BS.1770 sums per-channel energies; the mono downmix reads ~3 dB low) and stores it in the artifact. Old rows deserialize withloudness: None— previously analyzed tracks just show no marker until re-analyzed.pending_artifactbeforedeck.pre_analysis, since a fresh analysis waits for a non-playing moment to reach the engine but the marker is display-only.Testing
Mode::Mmeasurement within 0.01 LU.cargo test --workspace(117 passed),cargo check --workspace --all-targets,cargo +nightly fmt --all.🤖 Generated with Claude Code