From ded7c220fbaf7fa823f53d25c885d5795a86076f Mon Sep 17 00:00:00 2001 From: moon2 <moon2protonmail@protonmail.com> Date: Sat, 21 Dec 2024 16:26:51 +0100 Subject: [PATCH] mixer: move rms bar to align notch with -15dB --- python_payload/st3m/ui/mixer.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/python_payload/st3m/ui/mixer.py b/python_payload/st3m/ui/mixer.py index 26bcf8b704..9df06c90b7 100644 --- a/python_payload/st3m/ui/mixer.py +++ b/python_payload/st3m/ui/mixer.py @@ -336,6 +336,8 @@ class AudioMixer(Responder): ctx.rgb(0, 0, 0) ctx.rectangle(chan_width / 2 - 13, bar_bottom - len_bar, 9, len_bar).fill() + + # reference notch ctx.move_to(chan_width / 2 - 13, bar_bottom - len_bar * 5 / 7) ctx.rel_line_to(-5, 0).stroke() @@ -358,9 +360,9 @@ class AudioMixer(Responder): ctx.rgb(0, 0, 0) ctx.rectangle(chan_width / 2 - 9, bar_bottom - len_bar, 5, len_bar).fill() + # rms bar - # hmmmh do we reuse the 0dB notch for normalization...? - rms = chan.get_rms_dB() + 12 + rms = chan.get_rms_dB() + 15 ctx.rgb(*colors.rms_bar) rms_bar_len = (rms + 50) / 70 rms_bar_len = min(1, max(0, rms_bar_len)) -- GitLab