Skip to content

-Inf #52

@isolin

Description

@isolin

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 and block_size stays at the default 0.4.

import soundfile as sf
import pyloudnorm as pyln

data, rate = sf.read('path_to_the_wav_sample')
meter = pyln.Meter(rate)
print(meter.integrated_loudness(data))

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.zip

Update:
I think the issue is that meter.py:Ln90 produces an empty array since all blocks are between -80 and -70.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions