Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AudioBus level meters incorrect readout #88952

Open
Tracked by #76797
lander-vr opened this issue Feb 28, 2024 · 0 comments · May be fixed by #89954
Open
Tracked by #76797

AudioBus level meters incorrect readout #88952

lander-vr opened this issue Feb 28, 2024 · 0 comments · May be fixed by #89954

Comments

@lander-vr
Copy link
Contributor

lander-vr commented Feb 28, 2024

Tested versions

v4.2.1.stable.official [b09f793]

System information

Godot v4.2.1.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce RTX 2060 (NVIDIA; 31.0.15.3758) - AMD Ryzen 5 5600X 6-Core Processor (12 Threads)

Issue description

Level meters of audio busses read out inaccurate decibels. It looks like the meter simply shows the dB linearly.

I generated a sine-wave signal with amplitude 1.0 in Audacity, so the sound is normalized.

Here are the dB reductions on the AudioStreamPlayer itself, with the level meter readout below.
image

Notice how -40dB goes up halfway the meter, indicating that it's simply doing a linear readout in a range of 0 to -80 (which is I believe the dB range Godot uses), instead of converting with linear_to_db().

Also note how the dB level indicators on the side of the meter are not aligned properly. The skipped bar in the dB meter towards the top indicates 0 dB, however the actual level indicators on the side indicates it several bars lower. This means that even if the dB levels readout is corrected, the information shown to the user will still not be accurate.
I'll create a separate issue post for this though, or a proposal for a UI rework on the audio busses, since this part of the UI feels very rigid and inflexible, unlike most other parts of the editor.

Steps to reproduce

  • Play a normalized constant tone
  • Adjust volume dB in the AudioStreamPlayer
  • Check level meter readout on bus

Minimal reproduction project (MRP)

Issue audiobus levels meter readout incorrect.zip

aaronp64 added a commit to aaronp64/godot that referenced this issue Mar 27, 2024
Updated dB to normalized value to use with TextureProgressBar

Updated BusVuActive.svg and BusVuFrozen.svg to line up gap at 0 dB, and more
completely fill in the icon vertically

Moved padding from EditorAudioMeterNotches to a MarginContainer that includes
the full HBoxContainer, to keep child items lined up with each other

Fixes godotengine#88952
@aaronp64 aaronp64 linked a pull request Mar 27, 2024 that will close this issue
@YeldhamDev YeldhamDev added this to the 4.3 milestone Mar 27, 2024
@KoBeWi KoBeWi removed this from the 4.3 milestone Jul 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants