Open isolin opened 1 year ago
I'm also encountering this issue with popular music where many samples within a short amount of time have the maximum or minimum amplitude value.
Thanks @isolin and @harimohanraj for raising this.
I took a look at the timpani example. I see that it has very low level. If I use the loudness meter implementation in Adobe Audition it actually will not report any value and instead says: "Selection too short". This is likely because it did not find any blocks in the input signal above -70 dB in energy.
I think it is a detailed question of what pyloudnorm
should return in these cases. I think -inf
is in fact one valid option as it indicates the we cannot accurate measure the loudness because the input was essentially silent. However, we could potentially adapt the behavior to clamp the minimum value to -80 dB for example, however, I think this is slightly deceiving.
@harimohanraj are you able to share the audio of any example where you found this issue?
Hi, I found pyloudnorm just yesterday while searching for a way to get loudness readings from orchestral samples recorded with different velocities, so that I can smoothly interpolate them. For most of them it works just great, so I'm very happy with it. Great job!
There is one issue I found so far: for quite a few samples of timpani it returns
-Inf
. This is the case for all filter types offered. The rate is 44100 andblock_size
stays at the default0.4
.No idea if that is due to the low base frequency or relatively weak sound. It would be really great to have it fixed. My sample should be ok, it contains no NaN or infinite numbers. I assume the
-inf
comes from a division by zero, maybe some normalization or similar?Here an example file that returns
-Inf
: Timpani_S36_A0_V80_R1.zipUpdate: I think the issue is that
meter.py:Ln90
produces an empty array since all blocks are between-80
and-70
.