godot icon indicating copy to clipboard operation
godot copied to clipboard

AudioBus level meters incorrect readout

Open lander-vr opened this issue 1 year ago • 0 comments

Tested versions

v4.2.1.stable.official [b09f793f5]

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

lander-vr avatar Feb 28 '24 11:02 lander-vr