|
|||
On this forum and elsewhere I have read about aliasing caused by things like waveshapers, and about countering it with oversampling, filters, or both.
I'm not clear on why any alias is happening, though I am still learning this stuff. Waveshaping is what I am working on, more in the area of guitar tone than a static synth wave. In the interesting of understanding it better can someone provide me with an example I can implement or some way I can hear that kind of aliasing so I can get an idea of what it is like. Or is aliasing not an issue for general waveshapers and I'm just misunderstanding? Last edited by rootbear on Sun Apr 22, 2012 5:21 pm; edited 1 time in total |
|||
| ^ | Joined: 07 Feb 2011 Member: #249871 | ||
|
|||
All sounds can be broken down into harmonics, right? A pure sine wave has only one harmonic, its fundamental frequency. But as soon as we distort its shape in any way, we end up adding harmonics above the fundamental. Because that new shape now needs many sine waves to describe it, where originally it was one.
So for any sound, however complex, when we distort it with some kind of non-linearity we end up creating new, higher-pitched frequencies that are harmonics OF the harmonics that were originally present in the sound. (This is why the sound gets "thicker" with distortion, there's more harmonic content!) And, some of those new, higher harmonics are probably going to be above Nyquist (half the sample rate). As soon as you do that, pow! Aliasing. What does aliasing sound like? It sounds like unrelated crap. A particularly good way to hear it is a slowly modulating, siren-like sound. Going up and down in pitch. You'd expect all the harmonics to stay in the same relation to each other, but half of the aliases will actually be shifting pitch in the opposite direction. So to make a good aliasing test-tone, try a very high pitched sine wave that's modulating slowly and widely in pitch (like up and down at least an octave, over several seconds). You'll hear aliasing clearly then if you apply non-linear distortion (waveshaping) of any kind. Make sense? |
|||
| ^ | Joined: 10 Oct 2005 Member: #83902 Location: Toronto, Canada | ||
|
|||
For a guitar input, I would want it to be oversampled. If the input had only low frequencies and not many overtones, the oversampling wouldn't be as useful. ---- ![]() |
|||
| ^ | Joined: 16 Feb 2005 Member: #58183 | ||
|
|||
yeah it is pretty clear with the high pitched sine wave. Thanks. |
|||
| ^ | Joined: 07 Feb 2011 Member: #249871 | ||
|
|||
rootbear wrote: yeah it is pretty clear with the high pitched sine wave. Thanks.
|
|||
| ^ | Joined: 10 Oct 2005 Member: #83902 Location: Toronto, Canada | ||
|
|||
I always liked the wagon wheel analogy. If the rotation period of the wheel exceeds half the cirumference (2pi), we can't tell which way the wheel is rotating, so the "data" gets corrupted in a sense making it look like it's rotating backwards. And this has particular relevance to sound waves as a roating wheel essential generates a sinusoidal wave. So to represent frequencies above half of the sampling rate (Nyquist), would require those frequencies' wheels to rotate faster than 2pi in which case the sound data gets misrepresented in the audio file. |
|||
| ^ | Joined: 15 Apr 2012 Member: #278696 Location: Toronto, ON | ||
|
|||
LemonLime wrote: I always liked the wagon wheel analogy. If the rotation period of the wheel exceeds half the cirumference (2pi), we can't tell which way the wheel is rotating, so the "data" gets corrupted in a sense making it look like it's rotating backwards. And this has particular relevance to sound waves as a roating wheel essential generates a sinusoidal wave. So to represent frequencies above half of the sampling rate (Nyquist), would require those frequencies' wheels to rotate faster than 2pi in which case the sound data gets misrepresented in the audio file.
Yep. Or just imagine the wheels going backwards on wagons in the old movies. Same reason. Of course, the aliases in the RIGHT direction are all in the wrong places too. But it's easiest to hear the ones going "the wrong way", hence the sine-siren as a great test tone for this kind of thing. |
|||
| ^ | Joined: 10 Oct 2005 Member: #83902 Location: Toronto, Canada | ||
|
|||
| ^ | Joined: 11 Apr 2003 Member: #6706 Location: now on the flat | ||
|
|||
So.. how much oversampling is needed? I'm not sure that I hear the difference between 4x and 8x uprsampling from 44.1khz. As sampling rate increases I start to mistrust recursive filters used for modelling preamp EQ's and windowed sinc filters used before downsampling. Using oversampling to avoid aliasing is fine but it seems like a compromise must be made to keep other things sane. ---- ~stratum~ |
|||
| ^ | Joined: 29 May 2012 Member: #281392 | ||
|
|||
AdmiralQuality wrote: Yep. Or just imagine the wheels going backwards on wagons in the old movies. Same reason.
I became cautious with that analogy when I heard "what do you mean in movies? They always seem to move backwards when you look at them!" - twice! |
|||
| ^ | Joined: 20 Aug 2010 Member: #237880 | ||
|
|||
cheppner wrote: AdmiralQuality wrote: Yep. Or just imagine the wheels going backwards on wagons in the old movies. Same reason.
I became cautious with that analogy when I heard "what do you mean in movies? They always seem to move backwards when you look at them!" - twice! hmm - when the wagon starts, they move forward, then stop, move backward, stop again, move forward again, stop, etc. - or not? it's some time ago that i have seen that kind of movie. |
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany | ||
|
|||
Robin from www.rs-met.com wrote: cheppner wrote: AdmiralQuality wrote: Yep. Or just imagine the wheels going backwards on wagons in the old movies. Same reason.
I became cautious with that analogy when I heard "what do you mean in movies? They always seem to move backwards when you look at them!" - twice! hmm - when the wagon starts, they move forward, then stop, move backward, stop again, move forward again, stop, etc. - or not? it's some time ago that i have seen that kind of movie. Are you guys serious? The same effect can happen under old style florescent lights, as they're really blinking on and off 120 times a second. (100 times a second for you 50 Hz power people.) But this effect does NOT happen under normal sunlight because you need a strobe -- i.e. a discreet sampling interval -- to see it with your own eyes. Film and video however have a discreet frame capture rate, just like audio has a discreet sample rate. Here... http://www.youtube.com/watch?v=vANQlXAmq28 The wheel is obviously moving all the same way, and not suddenly changing direction. The appearance of changing direction, and of different directions for the different parts (the 5 bolts vs. 6 spokes) is aliasing. (This is also why they used to shun florescent lighting in metal shops. Because it can make a fast spinning machine appear to be moving slowly or even stopped.) |
|||
| ^ | Joined: 10 Oct 2005 Member: #83902 Location: Toronto, Canada | ||
|
|||
And why does the inner part of the wheel seems to be spinning independently of the outer part? |
|||
| ^ | Joined: 11 Feb 2009 Member: #200706 Location: Perú | ||
|
|||
Tzarls wrote: And why does the inner part of the wheel seems to be spinning independently of the outer part?
I already said why. Because the inner part with 5 evenly spaced bolts has a frequency of 5 * rotation speed. And the outer part with 6 evenly spaced spokes has a rotation speed of 6 * rotation speed. So they effectively have different frequencies. And JUST like with audio aliasing, different frequencies will be affected (or should I say, reflected?) in different ways. While some are going up, others are going down. |
|||
| ^ | Joined: 10 Oct 2005 Member: #83902 Location: Toronto, Canada | ||
|
|||
| ^ | Joined: 08 Mar 2004 Member: #15959 Location: Berlin, Germany |
| KVR Forum Index » DSP and Plug-in Development | All times are GMT - 8 Hours |
|
Printable version |
Disclaimer: All communications made available as part of this forum and any opinions, advice, statements, views or other information expressed in this forum are solely provided by, and the responsibility of, the person posting such communication and not of kvraudio.com (unless kvraudio.com is specifically identified as the author of the communication).
Powered by phpBB © phpBB Group










