Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: strange results using low-pass filter ( lame 3.98/3.99.5 ) (Read 29632 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #50
Using the foobar ABX component, the provided mp3 files sound very different. One is silent to my ears, the other is buzzing. See log below.

However, using regular foobar playback, they are both silent. After some tinkering with/without DSP, WASAPI vs. DirectSound, RG on/off, the reason -- apparently -- is that I apply -3dB for non-replaygained files by default, which of course is ignored by the ABX component. When going closer to 0dB gain, the buzzing is added.

I opened the files in Audacity and even after applying a gain of -12dB, one file is still buzzing and the other is silent (when played back via Audacity). I assume the clipping manifests itself when Audacity initially decodes the file to fixed-point (default sample format 16bit) and is therefore unaffected by the following gain. When I set the default sample format to float32 and re-open the file, the buzzing can be heard at FS but disappears with increasingly negative gain.

This should not be news/surprising to any of the regulars but maybe helps the OP to understand what is going on: On this type of synthetic signal, LAME's processing leads to signals which exceed FS which causes audible clipping when decoded to fixed-point PCM. The clipping can be avoided by reducing the gain prior to decoding (e.g. using replaygain) or prior to encoding. As far as I understood [JAZ], the lowpass filter in LAME might actually be the one causing the larger-than-FS signal but can not be easily fixed due to the implementation.

The question remains whether this is in any way relevant for real-world signals. Previous experience suggests it is not. But it seems like good engineering practice to add as little content above FS as possible during the processing.

Code: [Select]
foo_abx 1.3.4 report
foobar2000 v1.2.6
2013/08/16 11:34:25

File A: F:\incoming\music\lame lowpass\out_v0_lp20.1_99lame.mp3
File B: F:\incoming\music\lame lowpass\out_v0_lp20.2_99lame.mp3

11:34:25 : Test started.
11:34:33 : 01/01  50.0%
11:34:36 : 02/02  25.0%
11:34:38 : 03/03  12.5%
11:34:41 : 04/04  6.3%
11:34:43 : 05/05  3.1%
11:34:45 : 06/06  1.6%
11:34:47 : 07/07  0.8%
11:34:49 : 08/08  0.4%
11:34:52 : Test finished.

 ----------
Total: 8/8 (0.4%)

 

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #51
How's it sound in lame 3.100a2?

(I'd also be curious what the -Y switch does with it, but I suspect that'd be straying off-topic.)

You tell us.

-Y is not a low-pass.  If you want to create an output of two tones you will likely need to use a low-pass. I doubt -Y would do much of anything as this sample likely isn't complex enough to starve the encoder of precision in order to meet the quality threshold of -V0, even with the ill-advised, overly-tight corner.

Remember, samples beyond FS are a decoding artifact, not an encoding artifact.

strange results using low-pass filter ( lame 3.98/3.99.5 )

Reply #52
How's it sound in lame 3.100a2?

(I'd also be curious what the -Y switch does with it, but I suspect that'd be straying off-topic.)

You tell us.

-Y is not a low-pass.  If you want to create an output of two tones you will likely need to use a low-pass. I doubt -Y would do much of anything as this sample likely isn't complex enough to starve the encoder of precision in order to meet the quality threshold of -V0, even with the ill-advised, overly-tight corner.

Remember, samples beyond FS are a decoding artifact, not an encoding artifact.

I'll admit that I didn't hear a difference at all.  But I have far from discerning ears - I cannot hear anything in the top band (15.7kHz or higher), and frequently cannot ABx what others can.
I typically use -Y instead of a lowpass filter; I'd rather preserve some semblance of the top band, even if I cannot hear it, in case friends or family listen in.  It didn't sound, or look, like -Y did much in this case...probably because, as you said, it was such a simple sample, and the upper frequencies weren't causing bitrate bloat.