Jump to content
Please note: You can easily log in to MPN using your Facebook account!

What's aliasing, and what does it sound like?


Veracohr

Recommended Posts

The IAR website has an excellent article on The Importance of Digital Filtering. It does a good job explaining why our inability to create a perfect box filter at todays technological level results in less then perfect sound reproduction at the 44.1khz sampling frequency. It points out that at the level of todays best filters, sound degradation begins around 2khz.

 

Someone also mentioned that the D/A converters are critical because they must reconstruct the sound from sampling points. This in itself is a problem. The reason the Nyquist Theory states that sampling should be just over twice the rate of the highest frequency is so that the plotted points can collect enough data over time to reconstruct the wave. If the number were only twice the highest frequency, then when sampling that highest frequency your plotted sample points would always fall at the same position on the wave. It is possible to sample a 5khz tone with a 10khz sample rate and get not audio because the sample points could always be at the zero point. If you sample that same wave at 10,001 then you gradually build the information you need to accurately reconstruct that 5khz tone at the correct amplitude.

 

A critical assumption here is that tones have a bit of consistency. What happens if that 5khz tone is shifting slightly. As the reconstruction reads the data necessary to accurately reproduce that 5khz tone, that tone has already shifted to 4khz? And even if the frequency of the tone is steady, what happens to the reconstruction process when you have quick amplitude spikes? Anyone reading this that has a good old MiniMoog, set osc 3 up into the audio range and use it to modulate the amplitude of osc one while using a sine wave. As you move the mod wheel up you get a nice, smooth buzz or ring. Try this in the digital domain and you get gurgling. Now take it a step further. Push the filter to the point that it rings and use the eg to make a dive bomb sound. As the resonating filter swoops down use the mod wheel to apply the amplitude modulation with the rate in audio range. The resulting audio stream can make a mess of any D/A that has to convert samples limited to the rate proposed by the Nyquist theory.

 

The Nyquist Theory is fine for sampling steady tones but the necessity of a look ahead D/A is always going to have problems when the sound is changing. To deal with this some in the field are suggesting a sampling frequency of up to 10 times the audio range. For more information do a Google search and read up on D/A routines and how points are converted back into waves.

 

Robert

This post edited for speling.

My Sweetwater Gear Exchange Page

Link to comment
Share on other sites

  • Replies 35
  • Created
  • Last Reply

Geek that I am, I fooled around with Sound Forge to confirm my understanding of Nyquist and sampling. I expected to see an alias frequency that was the difference between the sampled and sampling frequency. My test confirmed this.

 

I recorded a 25 samples of a 20kHz sine wave and then successively pitch-shifted each "one semitone" at a time with the last being at 80kHz. My intial test file was sampled at Sound Forge's max setting - 192 kHz. I then resampled the file at both 96kHz and 44.1 kHz and observed playback on Sound Forge's spectrum analyzer. Just as I suspected, alias frequencies that were the difference between the "tones" and the sampling frequencies (44.1 kHz and 96 kHz) were created.

 

The initial alias frequencies weren't a problem because they were above the range I can hear. Eventually, however, the difference between the sampling and sample frequency dropped well below 20 kHz so they became audible. The higher the sample's frequency, the lower the alias frequency became.

 

What this confirms is that at too low a sample rate, frequencies that we can' hear can become a problem. That extra "sizzle" from a synth can be aliased to become a low frequency rumble. Anti-aliasing filtering is used to correct this but it removes those higher frequencies that "color" a sound.

Link to comment
Share on other sites

Originally posted by Rabid:

The IAR website has an excellent article on The Importance of Digital Filtering. It does a good job explaining why our inability to create a perfect box filter at todays technological level results in less then perfect sound reproduction at the 44.1khz sampling frequency. It points out that at the level of todays best filters, sound degradation begins around 2khz.

Copying from that website:

You see, the common misconception also believes that the bits coming off a CD furnish enough dots (sample points) to reasonably outline the music waveform, and basically all a CD player or D-A processor needs to do is connect the dots. This common misconception is true only at low frequencies. In the lower midrange it begins to be only approximately or crudely true. And above 2 kc it is not true at all. In truth, above 2 kc there are not enough sample dots or points coming off the CD frequently enough to outline the correct, original music waveform, and indeed at higher frequencies the pattern of these dots or sample points coming off the CD doesn't even resemble the music waveform. Instead, the CD player or D-A processor must literally create or generate the music waveform almost out of thin air, with the sample dots off the CD being mere sketchy clues (as in a detective story) that need to be correctly interpreted to guide the music waveform creation process.
This is absolutely wrong. The beauty of nyquist is you only need slightly more than two samples per cycle of the highest frequency in any wave to reconstruct it perfectly. You do not need ten samples per cycle like they imply. If they get this basic premise wrong, what make you think the rest of what they say is right? Modern d/a converters do a fine job recreating the signal given to them. The filters are not perfect, but they work just fine. They're not the awful things this site makes them out to be.

 

Originally posted by Rabid:

A critical assumption here is that tones have a bit of consistency. What happens if that 5khz tone is shifting slightly. As the reconstruction reads the data necessary to accurately reproduce that 5khz tone, that tone has already shifted to 4khz?

Please tell me how a frequency can 'shift' without changing frequency in the process or stoping and then starting again.

 

Originally posted by Rabid:

And even if the frequency of the tone is steady, what happens to the reconstruction process when you have quick amplitude spikes?

The amplitude spike is recreated. Basically, a sound can't be any faster than the highest frequency in that sound. Once the sound is filtered in the a/d conversion process, there can't be any amplitude spikes faster than the a/d or d/a converters can handle. Pretty cool huh?

 

Originally posted by Rabid:

Anyone reading this that has a good old MiniMoog, set osc 3 up into the audio range and use it to modulate the amplitude of osc one while using a sine wave. As you move the mod wheel up you get a nice, smooth buzz or ring. Try this in the digital domain and you get gurgling. Now take it a step further. Push the filter to the point that it rings and use the eg to make a dive bomb sound. As the resonating filter swoops down use the mod wheel to apply the amplitude modulation with the rate in audio range. The resulting audio stream can make a mess of any D/A that has to convert samples limited to the rate proposed by the Nyquist theory.

Have you tested this? Have you tried running that signal through an a/d-d/a conversion and had it sound strange (moreso than running any other signal through the conversion)?

 

Originally posted by Rabid:

The Nyquist Theory is fine for sampling steady tones but the necessity of a look ahead D/A is always going to have problems when the sound is changing. To deal with this some in the field are suggesting a sampling frequency of up to 10 times the audio range. For more information do a Google search and read up on D/A routines and how points are converted back into waves.

The Nyquist Theorem is good for any signal, whether it's audio, video, xrays, ultraviolet light, etc steady or not. Who are these people that are suggesting such high sampling rates? Might they be trying to sell you something? I can show you where one of the most respected converter designers says that 192Khz is a bad idea. I can show you where another very respected designer says that in his testing with his converters, you couldn't tell the difference between the original signal and the convertered signal at 48Khz. There's nothing wrong with Nyquist. The problem is that designing a good converter is not trivial and most companies seem content selling us higher and higher sample rates instead of actually making better converters. In the case of sample rate for audio, bigger is not better.
Link to comment
Share on other sites

Originally posted by azrix:

Originally posted by Rabid:

The IAR website has an excellent article on The Importance of Digital Filtering. It does a good job explaining why our inability to create a perfect box filter at todays technological level results in less then perfect sound reproduction at the 44.1khz sampling frequency. It points out that at the level of todays best filters, sound degradation begins around 2khz.

Copying from that website:

You see, the common misconception also believes that the bits coming off a CD furnish enough dots (sample points) to reasonably outline the music waveform, and basically all a CD player or D-A processor needs to do is connect the dots. This common misconception is true only at low frequencies. In the lower midrange it begins to be only approximately or crudely true. And above 2 kc it is not true at all. In truth, above 2 kc there are not enough sample dots or points coming off the CD frequently enough to outline the correct, original music waveform, and indeed at higher frequencies the pattern of these dots or sample points coming off the CD doesn't even resemble the music waveform. Instead, the CD player or D-A processor must literally create or generate the music waveform almost out of thin air, with the sample dots off the CD being mere sketchy clues (as in a detective story) that need to be correctly interpreted to guide the music waveform creation process.
This is absolutely wrong. The beauty of nyquist is you only need slightly more than two samples per cycle of the highest frequency in any wave to reconstruct it perfectly. ....
Ok. :rolleyes:

 

Slightly more than two equals three. You cannot have 2.1 sample points. We are dealing with whole numbers here so you need three samples to reconstruct the sound wave. To reconstruct that sound wave perfectly the sound cannot change over those three samples. Otherwise, the D/A uses a third point that is not consistent with the wave of the first two points and the wave is misrepresented. This is not a problem with lower frequencies, but as you reach the Nyquist limit, shifting high frequencies increase the chance of D/A errors.

 

Please tell me how a frequency can 'shift' without changing frequency in the process or stoping and then starting again.
I am not sure what you mean here? I thought I was clear that I was talking about shifting frequency, as my example of shifting from 4khz to 5khz. You know, shift as in sliding from one frequency to another.

 

Anyway, this discussion seems to have evolved into an argument so I think I will bow out before people get insulted and start taking different views as personnel attacks or signs of stupidity. There is an abundance of information for anyone that wants to do a search on "Nyquist Theory". Even some graphs that will demonstrate how sample points are plotted and waves reconstructed.

 

Robert

This post edited for speling.

My Sweetwater Gear Exchange Page

Link to comment
Share on other sites

I don't know of any VAs running at over 48kHz, so you wouldn't hear this kind of detail from a digital synth.

The very final words of Chowning's "FM Theory and Applications": "...our calculation has enabled us to estimate that the sampling rate for the DX7 is at least 50,000 Hz." (Italics his, not mine).
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...