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: LAME Sampling Rate Tuning (Read 6822 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

LAME Sampling Rate Tuning

I was wondering if there has been any recent discussion related to how LAME is tuned for different sampling rates. I've found a HA discussion indicating that it was tuned specifically for 44.1 kHz in the past, but that discussion is over a decade old (2003), so I doubt it's relevant anymore. Are there any listening tests or developer insight that might indicate whether it matters which sampling rate you use? I would think that 44.1 kHz is the most commonly tested rate, since most lossless audio comes from CD sources, but assuming there aren't any known bugs or deficiencies related to using 48 kHz, I wouldn't expect it to make a difference, since both sampling rates fully cover the frequencies audible to the human ear.

I ask because I'm going to be working with sequenced source material that I will be recording to WAV myself, so since the source doesn't have a sampling rate, I have to choose it myself. My preference would be to use 48 kHz solely because it's a more common standard among non-CD audio sources, but if 44.1 kHz is known to be preferable for some reason, then I could use that, instead.

Thanks!

LAME Sampling Rate Tuning

Reply #1
Its probably less well tuned, but the difference in sampling period is so small I doubt it matters much.

LAME Sampling Rate Tuning

Reply #2
According to my little acknowledgement about MP3 (and even less for LAME) it has two types of blocks. Long blocks and short blocks. Long block (576 samples) has a good frequency resolution and duration of 13,06 ms (576/44100). However transient signals have fast variations in considerably smaller amount of time than 13 ms.  Short block (192 samples) is used for such kind of signals. The length of one short block is 4,35 ms (192/44100). Now if your signal is sampled at 48 kHz then short block will be a bit shorter in time (192/48000 = 4 ms). 
So now it’s 4 ms instead of 4,35 ms. But now long block has 12 ms of duration instead of 13,06 ms. So You benefit short block and do contrary  for long block. But it can be a good thing probably. Because MP3 (at least LAME at high bitrates) mostly has issues with transients and not so much on steady signals. Not sure if it’s audible.

Again, these are all just thoughts with a lot of simplifications.

LAME Sampling Rate Tuning

Reply #3
@ IgorC

Your observations remind me of some similar speculation regarding 32 vs 44.1 kHz that I recall reading here some time ago. In essence, the idea was that since 44.1 kHz contained more frequencies to represent, the odds of artifacts appearing were probably higher than when using 32 kHz, but since 32 kHz had fewer samples per second, any artifacts that did occur could end up being more noticeable, since the artifacts would constitute a proportionally larger percentage of time (as 1 sample at 44.1 kHz lasts for 0.02 ms, whereas 1 sample at 32 kHz lasts for 0.03 ms).

At any rate, thanks for the input. I think it's safe to say that the sampling rate won't make much of a difference.

LAME Sampling Rate Tuning

Reply #4
Please let me make some corrections.
Any sampling rate "contains" an infinite number of frequencies, what changes is the bandwidth but which mp3 usually limits to <20 kHz anyway (so 22.05 or 24 kHz doesn't make any difference). Of course in the time domain higher sampling rate means more redundancy (e.g. a 100 Hz cycle has 39 more samples when going from 44.1 to 48 kHz but no extra information is stored), but mp3 stores information in the frequency domain anyway.

A sample doesn't really last for any period of time, it is the measured amplitude at exactly one point in time. The sampling period however (1/Fs) tells you the "distance" between samples.
But of course if an algorithm uses a fixed number of samples, the duration of that chunk of audio will change with sampling rate.
"I hear it when I see it."

 

LAME Sampling Rate Tuning

Reply #5
But of course if an algorithm uses a fixed number of samples, the duration of that chunk of audio will change with sampling rate.

I think that's what the previous discussion was getting at, even if I didn't express it correctly. Thanks.