Music, Programming, and other topics related to the modern Music Engineering Scene.

As mentioned at the end of the last post, aliasing can be a problem when recording digitally. Aliasing occurs when you try to record frequencies that are too fast. You have a limit on which frequencies you can record based on your sample rate. The Nyquist Theorem says that you can only accurately record frequencies that are less than half of your sample rate. For a 44,100 Hz sample rate, you can record frequencies up to 22,050 Hz. This covers everything that human ears can hear.

When you try to record something greater than 22,050 Hz, you will get aliasing. This creates high pitched "chirpies" that don't actually exist, but get reproduced because of how samples are taken. Consider the following picture:The black sine wave is the original signal. The blue dots are the samples that get taken, and the green dashed line is the false frequency that gets reproduced. You can see it is a much lower frequency than the original signal, and is not at all what we wanted to capture.

To get around aliasing, we apply anti-aliasing filters. Basically, this is a low-pass filter with a cutoff frequency just below your Nyquist frequency (half of your sampling rate). This prevents any frequencies that are too high from ever trying to get recorded, protecting the signal that we can capture from unwanted aliasing.

With the advent of computers, audio has been digitized. This should not come as a shock to you, as we've been using digital audio for many years now. But just how is audio digitized? The next few posts go over digital audio - the good parts and the bad.

Digital Audio relies on Quantization and Sampling. Quantization is the act of taking the peaks of an audio signal and storing them as binary values. These values are accurate to whatever bit depth you're working in (16 bit for CDs). Sampling is the act of splitting your signal into little chunks, called samples. You record the values at a specified interval, called the sampling rate, so you can reproduce the signal later. The sample rate for CDs is 44,100 Hz, which means 44,100 samples are taken per second. This might seem like a huge task, but don't worry. Computers are really quick.

Think of this like a grid being superimposed over your signal:The horizontal grey lines are akin to your bit depth. The vertical lines are the sampling rate. The blue dots represent the samples that you would take of this wave form. You can see that they don't perfectly match up, but they're close enough that you can reproduce the wave form and still get something out that sounds similar to what you recorded.

Next up, we'll go over the limits of the digital model (aliasing), and ways around it.

Labels

Followers

Disclaimer

Chemzoar does not intend to provide complete walkthroughs of everything covered on this website. Before undertaking any projects proposed by this website, be sure to do your own research on top of what's listed here. Chemzoar does not take any responsibility for decisions made based on the content of this site.