Skip to main content

Topic: Lowpass precision in Lame (Read 3462 times) previous topic - next topic

0 Members and 1 Guest are viewing this topic.
  • RD
  • [*][*][*]
Lowpass precision in Lame
Orignally posted by Tangent:

As we know, the low order lpf (lowpass filter) has a gentle cutoff slope, so attentuation has to begin at a frequency somewhat lower to get full attenuation at 22.1kHz, and I guess this frequency starts at 20kHz.

I'm not sure if Lame has a "low order lpf", and then there is always that thorny "lowpass width" variable in Lame, but my question is as follows.

When selecting --lowpass 19 we see:
Using polyphase lowpass  filter, transition band: 18671 Hz - 19205 Hz

Do I interpret this correctly to mean that it is not that case that ALL frequencies at 18.67 Khz are cut out, but rather like Tangent said there is a gentle cutoff slope (or maybe not so gentle) beginning with 18671 Hz and ending with 19205 Hz?

And therefore that we do not have full attenuation until sometime after 19 Khz?

RD

  • Garf
  • [*][*][*][*][*]
  • Developer (Donating)
Lowpass precision in Lame
Reply #1
Quote
Originally posted by RD
Do I interpret this correctly to mean that it is not that case that ALL frequencies at 18.67 Khz are cut out, but rather like Tangent said there is a gentle cutoff slope (or maybe not so gentle) beginning with 18671 Hz and ending with 19205 Hz?


Yes

Quote

And therefore that we do not have full attenuation until sometime after 19 Khz?


Yes

The steeper you try to make the lowpass, the more chance there is that you get undesirable side-effects (I don't know what exactly they are though).
A very steep lowpass is also called a 'brickwall' filter.

--
GCP

  • tangent
  • [*][*][*][*][*]
Lowpass precision in Lame
Reply #2
Well, I believe that MP3 does lowpass filtering in the frequency domain rather than the time domain, which I believe doesn't cause the phase distortion which normal filtering methods cause.

  • niktheblak
  • [*][*][*][*]
  • Members (Donating)
Lowpass precision in Lame
Reply #3
Quote
Originally posted by tangent
Well, I believe that MP3 does lowpass filtering in the frequency domain rather than the time domain, which I believe doesn't cause the phase distortion which normal filtering methods cause.


Actually you can't do a lowpass but in frequency domain. In time domain there is no direct way to alter frequencies since the samples have no "frequency"-value.

You can however do a lowpass in time-domain by mathematical process called convolution. You can convolve the source signal with a lowpass-like impulse response signal and get a lowpassed signal. But these impulse responses are designed in frequency domain to begin with and IFFT'd (Inverse Fast Fourier Transform) into time-domain for the use of convolution.

More common and more efficient way of lowpassing is to FFT the signal into frequency domain and multiple it with desired frequency response signal. Both convolution in time-domain and multiplication in frequency-domain give identical results, FFT way is just (much) faster.

Garf:

In frequency domain we can "draw" a perfect brickwall lowpass filter (with transition band of 0, looking like a square) but it cannot be perfectly transformed into time-domain. In complex DFT (Discrete Fourier Transform) the IFFT'd lowpassed signal would have imaginary values as well as real values. Discarding these imaginary values would mean loss of phase information. So we have to use only frequency responses which do not result imaginary output. These signals are "sinusoidal like" smooth gentle slopes.

  • RD
  • [*][*][*]
Lowpass precision in Lame
Reply #4
Can anyone here tell the difference in a music listening test (for example abxing songs like U2s Desire or Metallica's Fade to black) between --lowpass 19 and --lowpass 19.5?

A while back on the r3mix board there was a big controversy over this and I remember Julius calling me stupid because I advocated --lowpass 19 over --lowpass 19.5

--lowpass 19 is currently the default setting in Dibrom's current incarnations of --alt-preset normal

Thanks.

  • Dibrom
  • [*][*][*][*][*]
  • Administrator
Lowpass precision in Lame
Reply #5
Quote
Originally posted by RD
A while back on the r3mix board there was a big controversy over this and I remember Julius calling me stupid because I advocated --lowpass 19 over --lowpass 19.5


lol...  We'll I think Julius made some wild claims like being able to hear up to 22khz in music or something also (not impossible, but pretty unbelievable).  But he called me stupid and ignorant many times (in relation to nspsytune).. apparently though he is incapable of hearing most artifacts anyway and he never provided a single abx test of anything, so I wouldn't bother worrying about anything he said.

  • RD
  • [*][*][*]
Lowpass precision in Lame
Reply #6
Quick question:

I know your hearing is very good Dibrom.

Have you come across a file while testing --alt-preset normal that you felt --lowpass 19 was not enough for you?

Must admit I am curious.. though lately my philosophy is that in 10 more years I'll be too old to worry about --lowpass 19 vs. --lowpass 19.5

  • Dibrom
  • [*][*][*][*][*]
  • Administrator
Lowpass precision in Lame
Reply #7
Quote
Originally posted by RD
Have you come across a file while testing --alt-preset normal that you felt --lowpass 19 was not enough for you?


Not really.. and I'll be honest and say that I doubt I could detect the difference between a lowpass at 19khz and 19.5khz in most material anyway.

Realistically, the difference between a lowpass at 19.5khz and 19khz is going to be far less than the reduction in artifacts you would get in one preset (alt-normal) vs another (--r3mix) that might use a higher lowpass.

I think I only know one or two people who might be able to reliably hear the difference between a lowpass at these values.. and at least one of them won't touch mp3 for high quality encoding anyway  If you can honestly hear up to that range with extreme clarity, mp3 just isn't going to cut it period, because the quality degrades so much above 16khz because of the sfb21 issue..

  • tangent
  • [*][*][*][*][*]
Lowpass precision in Lame
Reply #8
Quote
Originally posted by niktheblak
Actually you can't do a lowpass but in frequency domain. In time domain there is no direct way to alter frequencies since the samples have no "frequency"-value.

You can however do a lowpass in time-domain by mathematical process called convolution. You can convolve the source signal with a lowpass-like impulse response signal and get a lowpassed signal. But these impulse responses are designed in frequency domain to begin with and IFFT'd (Inverse Fast Fourier Transform) into time-domain for the use of convolution.

Theoretically you can say that FFR/IFR works using the frequency domain, but in practice, you use them in the time tomain. So I still see it as a time domain function. There are other ways to digitally filter in the time domain. Ever tried building an RLC circuit in a simulator and running a wave file through the input?

Quote
In frequency domain we can "draw" a perfect brickwall lowpass filter (with transition band of 0, looking like a square) but it cannot be perfectly transformed into time-domain. In complex DFT (Discrete Fourier Transform) the IFFT'd lowpassed signal would have imaginary values as well as real values. Discarding these imaginary values would mean loss of phase information. So we have to use only frequency responses which do not result imaginary output. These signals are "sinusoidal like" smooth gentle slopes.

Perhaps that's why DCT is used instead of DFT?