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: Unusual sampling rates (Read 4306 times) previous topic - next topic
0 Members and 4 Guests are viewing this topic.

Unusual sampling rates

Hello. I know some unusual sampling rates and wonder if they really have use case(s). The sampling rates follow (multiplications with powers of 2 are considered the same).

29400Hz: Actually I thought this would make sense in some cases as interpolating it to 44100Hz would be problemless with basic interpolators (when it's multiplied with a power of 2 that is lower than what's applied to 44100) before seeing it in EZ CD Audio Converter as an xHE-AAC sampling rate. Does it really have use case(s)?

37800Hz: I know that this sampling rate is used in PlayStation, but does it have other use case(s)?

38400Hz: I saw this one in EZ CD Audio Converter as an xHE-AAC sampling rate too, but didn't in anywhere else at all. Does it really have use case(s)?

And, are there other unusual sampling rates?

Re: Unusual sampling rates

Reply #1
Historically (pre-internet) compatibility between devices was irrelevant so the choice of sampling rate often came down whatever hardware supported, what could fit in available space on a disk, etc.  Since the exact sampling rate is arbitrary it often ended up at odd values like the 37800Hz chosen to fit on the playstation CDROMs.

In modern times these odd sampling rates are primarily of historical interest.  You may care about them if you're archiving old media but otherwise they're not used.

Re: Unusual sampling rates

Reply #2
Historically (pre-internet) compatibility between devices was irrelevant so the choice of sampling rate often came down whatever hardware supported, what could fit in available space on a disk, etc.  Since the exact sampling rate is arbitrary it often ended up at odd values like the 37800Hz chosen to fit on the playstation CDROMs.

In modern times these odd sampling rates are primarily of historical interest.  You may care about them if you're archiving old media but otherwise they're not used.

But do they really have (other for 37800Hz) use cases @saratoga ?





 


Re: Unusual sampling rates

Reply #9
Is anyone into the maths of resampling? There's this idea that upsampling/downsampling with 2^n multipliers is a good thing[1] but I also often read, that's a myth and applies to ancient times.
Most likely example may be 44.1/88.2/176.4->48/96/192
As an amateur I'd think, the latter is true. It's a myth. I guess it's simple maths to e.g. calculate some intermediate samples and internally we can have enough precision in the floats?

As for the topic, unusual sample rates: I downsample high resolution flac source (192,176.4,88.1,96) down to 64000 at times, depending on some factors, "peace of mind" and "don't waste space" as a motivation[2]. BTW FB2K has some playback issues with them. Rarely, but under for me unknown circumstances, sometimes there's no sound output. Stopping/starting solves it. Not too important for me.

[1] SoX resampler hints to it, because it offers 2x/4x beside the fixed sample rate settings.
[2] Example numbers: All my 64kHz/20bps FLAC of classical orchestral music has an average of 1177 kbps (64/24 av. 1671kbps). My 96kHz/24 averages at 2324kbps.

Re: Unusual sampling rates

Reply #10
Is anyone into the maths of resampling? There's this idea that upsampling/downsampling with 2^n multipliers is a good thing[1] but I also often read, that's a myth and applies to ancient times.
Most likely example may be 44.1/88.2/176.4->48/96/192
As an amateur I'd think, the latter is true. It's a myth. I guess it's simple maths to e.g. calculate some intermediate samples and internally we can have enough precision in the floats?

As for the topic, unusual sample rates: I downsample high resolution flac source (192,176.4,88.1,96) down to 64000 at times, depending on some factors, "peace of mind" and "don't waste space" as a motivation[2]. BTW FB2K has some playback issues with them. Rarely, but under for me unknown circumstances, sometimes there's no sound output. Stopping/starting solves it. Not too important for me.

[1] SoX resampler hints to it, because it offers 2x/4x beside the fixed sample rate settings.
[2] Example numbers: All my 64kHz/20bps FLAC of classical orchestral music has an average of 1177 kbps (64/24 av. 1671kbps). My 96kHz/24 averages at 2324kbps.

Thanks, but resampling outside of the multiplies really does cause problems with basic interpolators.

Re: Unusual sampling rates

Reply #11
I do a lot of image processing and for image sizes of 2^n the algorithms are extra fast, the FFT for example. I dont know if this is relevant for audio though.
I feel like for quality this logic only makes sense if one thinks an audio signal is stairsteps.
And so, with digital, computer was put into place, and all the IT that came with it.

Re: Unusual sampling rates

Reply #12
Conceptually, converting by non-integer ratio is just upsampling by integer ratio to the lowest common multiple and then downsampling by integer ratio to the final sampling frequency. Because there are many samples in that process that are zero or will be thrown away, this can be heavily optimized.

Re: Unusual sampling rates

Reply #13
I do a lot of image processing and for image sizes of 2^n the algorithms are extra fast, the FFT for example.

The FFT being faster specifically for powers of 2 is a common misconception but not actually true.  Since modern algorithms work by splitting into prime factors, it is fast for any number that is not prime, and fastest for numbers with small prime factors such as 2, 3 or 5.  They don't have to be the same prime factors though.

Is anyone into the maths of resampling? There's this idea that upsampling/downsampling with 2^n multipliers is a good thing[1] but I also often read, that's a myth and applies to ancient times.

There is nothing special about a factor of 2 except that the math is very simple to work out. 

Re: Unusual sampling rates

Reply #14
It is faster for some implementations.
And so, with digital, computer was put into place, and all the IT that came with it.


Re: Unusual sampling rates

Reply #16
Not about speed but for basic interpolators (linear and ZOH), resampling outside of the multiplies causes artifacts in the sound. This is slight in linear interpolation but very obvious in ZOH.

Re: Unusual sampling rates

Reply #17
Not about speed but for basic interpolators (linear and ZOH), resampling outside of the multiplies causes artifacts in the sound.

In terms of accuracy, linear interpolation does not care about the ratio of sampling rates.  All it does it draw a line between samples you have and calculate where it intercepts the position you want.  You can draw a line between any two points regardless of sampling rates.  The only difference it makes is how the error is distributed in frequency.  You may prefer some distribution over another, but all are quite bad. 

Re: Unusual sampling rates

Reply #18
Not about speed but for basic interpolators (linear and ZOH), resampling outside of the multiplies causes artifacts in the sound.

In terms of accuracy, linear interpolation does not care about the ratio of sampling rates.  All it does it draw a line between samples you have and calculate where it intercepts the position you want.  You can draw a line between any two points regardless of sampling rates.  The only difference it makes is how the error is distributed in frequency.  You may prefer some distribution over another, but all are quite bad. 

This is not about preferences. Basic interpolators introduce artifacts when they are used outside of the multiplies, and they don't otherwise. The spectral reflections they create are not artifacts nor errors, they are rich enhancements.

Re: Unusual sampling rates

Reply #19
Basic interpolators introduce artifacts when they are used outside of the multiplies, and they don't otherwise.

That is not true.  Linear interpolation refers to fitting a straight line to what is basically a bunch of curved sin waves.  Since a straight line is a very crude approximation of a curve you always have errors, and they don't depend on integer multiples or anything like that. 

Re: Unusual sampling rates

Reply #20
Basic interpolators introduce artifacts when they are used outside of the multiplies, and they don't otherwise.

That is not true.  Linear interpolation refers to fitting a straight line to what is basically a bunch of curved sin waves.  Since a straight line is a very crude approximation of a curve you always have errors, and they don't depend on integer multiples or anything like that. 

I don't agree with you. Drawing straight lines between the samples is the most natural way of resampling. Again, the spectral reflections that linear interpolation creates are not artifacts nor errors, they are rich enhancements.


Re: Unusual sampling rates

Reply #22
Basic interpolators introduce artifacts when they are used outside of the multiplies, and they don't otherwise.

That is not true.  Linear interpolation refers to fitting a straight line to what is basically a bunch of curved sin waves.  Since a straight line is a very crude approximation of a curve you always have errors, and they don't depend on integer multiples or anything like that. 

I don't agree with you. Drawing straight lines between the samples is the most natural way of resampling.

In the real world sounds are not made of little connected straight lines, so it is not at all a natural way to do resampling.  Probably you mean "easiest to understand".  It is used because it is easy, not because it is good.

Again, the spectral reflections that linear interpolation creates are not artifacts nor errors

They're artifacts resulting from the error introduced by approximation of a curve with lines.  You may personally like that sort of distortion, but as many people have pointed out there are much better ways to accomplish the same thing than trying to find specific ratios of sampling rates that make the distortion less harsh or whatever you're looking for. 

Re: Unusual sampling rates

Reply #23
Again, the spectral reflections that linear interpolation creates are not artifacts nor errors, they are rich enhancements.
I believe many users of this board recognize the Nyquist–Shannon sampling theorem as a fundamental way to understand sampled audio. You may or may not subscribe to this view, but I would like to hear of an alternative theorem that described how sampled data works.

The Nyquist–Shannon sampling theorem states that sampled audio must be band-limited, not containing any frequencies higher than half the sampling frequency. This implies that during downsampling, frequencies higher than half the sampling frequency must be removed, and during upsampling, no frequencies higher than half the old sampling frequency can appear.

Linear interpolation does not fulfill these implications. It doesn't even come close.
Music: sounds arranged such that they construct feelings.

Re: Unusual sampling rates

Reply #24
In the real world sounds are not made of little connected straight lines, so it is not at all a natural way to do resampling.  Probably you mean "easiest to understand".  It is used because it is easy, not because it is good.

They're artifacts resulting from the error introduced by approximation of a curve with lines.  You may personally like that sort of distortion, but as many people have pointed out there are much better ways to accomplish the same thing than trying to find specific ratios of sampling rates that make the distortion less harsh or whatever you're looking for. 

Linear interpolation is not completely natural but it's the most natural interpolator because generating absolutely nothing above a frequency limit is much more artificial than generating filtered reflections (lower frequencies generate weaker and weaker reflections in linear interpolation, that's the filtering). In my opinion, at least.

I believe many users of this board recognize the Nyquist–Shannon sampling theorem as a fundamental way to understand sampled audio. You may or may not subscribe to this view, but I would like to hear of an alternative theorem that described how sampled data works.

The Nyquist–Shannon sampling theorem states that sampled audio must be band-limited, not containing any frequencies higher than half the sampling frequency. This implies that during downsampling, frequencies higher than half the sampling frequency must be removed, and during upsampling, no frequencies higher than half the old sampling frequency can appear.

Linear interpolation does not fulfill these implications. It doesn't even come close.

I know this theorem, and I agree with the first part of it: Frequencies higher than the Nyquist limit should be removed during downsampling. What I don't agree with is the second part of it.

I don't like basic interpolators for downsampling, I like them (especially linear) for upsampling. Except for the mentioned case, of course, as in that case it's better to use it together with sinc.
For example: for 16000 => 44100, 16000 => 48000 with linear and 48000 => 44100 with sinc.