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 4997 times) previous topic - next topic
0 Members and 5 Guests are viewing this topic.

Re: Unusual sampling rates

Reply #25
I think I've heard some cheap toys that use those sampling rates like
(5000 hz, 6000 hz, 7000 hz , 9000 hz) instead of 8000 hz
LAME: -f -V 0 -Y
 Xing: -V150 -X2 -U2 -HF-1 -TX0

Re: Unusual sampling rates

Reply #26
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).

The most natural thing to do is not introduce artifacts.  Then you don't have these strange issues with specific sampling rates making distortion more or less annoying to the ear. 

Re: Unusual sampling rates

Reply #27
Linear interpolation is not completely natural but it's the most natural interpolator because ... In my opinion, at least.
This is a common misconception among non-experts in this field. The most natural (as in "natural sciences") thing with waveform signals is something involving damped or undamped sinusoidal oscillations (like a good IIR or windowed-sinc resampler), not drawing straight lines between two sample points (like a linear interpolator).

btw, do you realize that bad resamplers, despite creating some new high-frequency content, also introduce significant distortion in the lower frequencies, sometimes even as low as 100 Hz or so?

Chris
If I don't reply to your reply, it means I agree with you.

Re: Unusual sampling rates

Reply #28
btw, do you realize that bad resamplers, despite creating some new high-frequency content, also introduce significant distortion in the lower frequencies, sometimes even as low as 100 Hz or so?
Out of curiosity: Why/how? Of course code bugs, but ... ?

Re: Unusual sampling rates

Reply #29
I think I've heard some cheap toys that use those sampling rates like
(5000 hz, 6000 hz, 7000 hz , 9000 hz) instead of 8000 hz

Thanks.

The most natural thing to do is not introduce artifacts.  Then you don't have these strange issues with specific sampling rates making distortion more or less annoying to the ear. 

What causes these issues is the ratio between the sampling rates, not the sampling rates alone.

This is a common misconception among non-experts in this field. The most natural (as in "natural sciences") thing with waveform signals is something involving damped or undamped sinusoidal oscillations (like a good IIR or windowed-sinc resampler), not drawing straight lines between two sample points (like a linear interpolator).

btw, do you realize that bad resamplers, despite creating some new high-frequency content, also introduce significant distortion in the lower frequencies, sometimes even as low as 100 Hz or so?

btw, do you realize that bad resamplers, despite creating some new high-frequency content, also introduce significant distortion in the lower frequencies, sometimes even as low as 100 Hz or so?
Out of curiosity: Why/how? Of course code bugs, but ... ?

This can be the case only with the mentioned case (when the output sampling rate is not a multiply of the input sampling rate).

Re: Unusual sampling rates

Reply #30
As i understand resampling at sane sampling rates creates new values and it doesn't matter if you use even or uneven numbers until you use a Half-band filter or no filter at all.
Is troll-adiposity coming from feederism?
With 24bit music you can listen to silence much louder!

Re: Unusual sampling rates

Reply #31
This can be the case only with the mentioned case (when the output sampling rate is not a multiply of the input sampling rate).
Regarding additional frequencies created as a result of insufficiently attenuated aliasing (fold-over from high to low frequencies... answer to Porcus' question), that might be true. However, lowpass-filter-like attenuation of the low-band (the frequency content being upsampled) occurs in any case when using linear interpolation. Attached the average frequency response for an example, where the input signal is simple white noise (green)... which should, ideally, remain spectrally flat in the low-band but is 6dB down at the low-band Nyquist frequency when upsampling via linear interpolation (red). And 3dB down much earlier than that.

I, personally, would not like to have my upsampled waveforms 3dB down at such low frequencies...

The attached picture contains, in the lower right corner, the Matlab/Octave code using which I created this example.

Chris
If I don't reply to your reply, it means I agree with you.

Re: Unusual sampling rates

Reply #32
This can be the case only with the mentioned case (when the output sampling rate is not a multiply of the input sampling rate).
Regarding additional frequencies created as a result of insufficiently attenuated aliasing (fold-over from high to low frequencies... answer to Porcus' question), that might be true. However, lowpass-filter-like attenuation of the low-band (the frequency content being upsampled) occurs in any case when using linear interpolation. Attached the average frequency response for an example, where the input signal is simple white noise (green)... which should, ideally, remain spectrally flat in the low-band but is 6dB down at the low-band Nyquist frequency when upsampling via linear interpolation (red). And 3dB down much earlier than that.

I, personally, would not like to have my upsampled waveforms 3dB down at such low frequencies...

The attached picture contains, in the lower right corner, the Matlab/Octave code using which I created this example.

I know that, but I still find the frequency response of linear interpolation much more natural than the one of sinc interpolation. However, I want to try the pre-emphasis which flattens the frequency response as I wonder what does it sound like, therefore you reminded me to start a topic about that (topic#127058) - thanks.

Re: Unusual sampling rates

Reply #33
The most natural thing to do is not introduce artifacts.  Then you don't have these strange issues with specific sampling rates making distortion more or less annoying to the ear. 

What causes these issues is the ratio between the sampling rates, not the sampling rates alone.

Yes I know how linear interpolation works.  You have these problems with artifacts essentially because you are going about solving your problem is a very poor way.

However, I want to try the pre-emphasis which flattens the frequency response as I wonder what does it sound like, therefore you reminded me to start a topic about that (topic#127058) - thanks.

That will reduce the artifacts you generate.  Next you can do as the paper I sent you months ago explains and zero stuff your input samples and then filter them before your pre-emphasis to further reduce artifacts.  Then you can post filter, at which point you will have eliminated distortion because you will be essentially at sinc interpolation.  Finally you can do spectral extension on the upsampled data and end up with what most people would do in this situation.  Besides being more effective, this will work for any sampling rate combination.

Re: Unusual sampling rates

Reply #34
Thanks.

 

Re: Unusual sampling rates

Reply #35
I still find the frequency response of linear interpolation much more natural than the one of sinc interpolation. However, I want to try the pre-emphasis which flattens the frequency response as I wonder what does it sound like, therefore you reminded me to start a topic about that (topic#127058)
Attached an extension of my experiment above (blue, was curious myself). Et voila, you've added a much more natural IIR oscillating filter.

Chris
If I don't reply to your reply, it means I agree with you.

Re: Unusual sampling rates

Reply #36
I still find the frequency response of linear interpolation much more natural than the one of sinc interpolation. However, I want to try the pre-emphasis which flattens the frequency response as I wonder what does it sound like, therefore you reminded me to start a topic about that (topic#127058)
Attached an extension of my experiment above (blue, was curious myself). Et voila, you've added a much more natural IIR oscillating filter.

Chris

Sorry, I couldn't understand you. Can you tell me that how can I listen linear interpolation with pre-emphasis at https://hydrogenaud.io/index.php/topic,127058 @C.R.Helmrich ?

Re: Unusual sampling rates

Reply #37
@Klymins : You've been given lots of explanations, theory and reasoning since you first started posting in this site. And yet in most of your posts you try to tell the others that they are wrong because your preference is different.

I have a clear example of how aliasing sounds and why a bad resampling might feel better even though its quality is worse.
Check these two videos on youtube with the same song rendered one with ZOH and the other with SINC interpolator:
Song with aliasing (ZOH)
Song without aliasing (SINC)

Especially the start of the song has a very pronounced aliasing.
You might feel that the song sounds better WITH aliasing than without, but that does not mean better quality.
(Note: Since this is ZOH instead of linear, the aliasing extends to almost all the frequency range. Linear interpolation would kindly lowpass filter itself like what C.R.Helmrich posted)


Aliasing is an artifact that causes mirroring of the frequencies. There is no control of this mirroring, and it would rarely resemble what existed there before sampling it at a too low sample rate. 
The lack of control means that you can hear aliasing on a bass sound that should not have high pitched sound at all,  or you might hear a hihat that "magically restores" the missing part. 
So in the end it is a gamble if the aliasing will be an improvement or it will annoy and that's why pretending to use aliasing as a kind of sound improvement is a nonsense.

Mechanisms like SBR, used in MP3PRO or HE-AAC fullfill this functionality in a controlled way, and it still can sound bad in certain cases.

Re: Unusual sampling rates

Reply #38
@Klymins : You've been given lots of explanations, theory and reasoning since you first started posting in this site. And yet in most of your posts you try to tell the others that they are wrong because your preference is different.

I have a clear example of how aliasing sounds and why a bad resampling might feel better even though its quality is worse.
Check these two videos on youtube with the same song rendered one with ZOH and the other with SINC interpolator:
Song with aliasing (ZOH)
Song without aliasing (SINC)

Especially the start of the song has a very pronounced aliasing.
You might feel that the song sounds better WITH aliasing than without, but that does not mean better quality.
(Note: Since this is ZOH instead of linear, the aliasing extends to almost all the frequency range. Linear interpolation would kindly lowpass filter itself like what C.R.Helmrich posted)


Aliasing is an artifact that causes mirroring of the frequencies. There is no control of this mirroring, and it would rarely resemble what existed there before sampling it at a too low sample rate. 
The lack of control means that you can hear aliasing on a bass sound that should not have high pitched sound at all,  or you might hear a hihat that "magically restores" the missing part. 
So in the end it is a gamble if the aliasing will be an improvement or it will annoy and that's why pretending to use aliasing as a kind of sound improvement is a nonsense.

Mechanisms like SBR, used in MP3PRO or HE-AAC fullfill this functionality in a controlled way, and it still can sound bad in certain cases.

Thanks, but I still think that the aliasings of SBR are much more annoying and artificial than the reflections of linear interpolation (this doesn't mean it's bad, I still can prefer SBR in some cases), and linear interpolation never creates anything unwanted for me. My opinions are different than the ones of the most people in this forum and I don't think this is a problem. Maybe I was wrong for saying that it is more natural but I think it shouldn't be a problem to tell my opinions.


Re: Unusual sampling rates

Reply #40
When you deny that audible aliases are artifacts, it is not opinion, it is misinformation.

I was trying to say that what is artifact and what isn't changes with the point of view, sorry for that.

Re: Unusual sampling rates

Reply #41
I was trying to say that what is artifact and what isn't changes with the point of view
And that is misinformation. At least here, when it is about audible artifacts - sure you could have argued that when you are down to way below audibility it wouldn't anymore qualify for the term, but that's not what you are doing: you keep denying that [this particular kind of] resampling artifacts constitute "artifacts" whatsoever. 

Re: Unusual sampling rates

Reply #42
I was trying to say that what is artifact and what isn't changes with the point of view
And that is misinformation. At least here, when it is about audible artifacts - sure you could have argued that when you are down to way below audibility it wouldn't anymore qualify for the term, but that's not what you are doing: you keep denying that [this particular kind of] resampling artifacts constitute "artifacts" whatsoever. 

In this case, distortions created by a guitar amplifier (real or simulated), which are very widely used in some music genres like rock and metal, would also be artifacts.

Re: Unusual sampling rates

Reply #43
In this case, distortions created by a guitar amplifier (real or simulated), which are very widely used in some music genres like rock and metal, would also be artifacts.
Creating music and reproducing a signal are different, you know? Two Wikipedia illustrations of halftone:





No artifacts here?

Re: Unusual sampling rates

Reply #44
In this case, distortions created by a guitar amplifier (real or simulated), which are very widely used in some music genres like rock and metal, would also be artifacts.
Creating music and reproducing a signal are different, you know? Two Wikipedia illustrations of halftone:

No artifacts here?

Definition of a word shouldn't change based on that manner. It either is an artifact or isn't.

Re: Unusual sampling rates

Reply #45
That's bullshit, but if you insist: it would make it much easier for you to give one categorical answer the following question.
Are the half-tone (the "dots") digitization artifacts or are they not?

Re: Unusual sampling rates

Reply #46
That's bullshit, but if you insist: it would make it much easier for you to give one categorical answer the following question.
Are the half-tone (the "dots") digitization artifacts or are they not?

They are not.