Recording 100 - Digital Audio Basics
Now that we’ve covered a bit of analog signals and their respective levels, it is time to take a look at what happens when those signals hit the input of an AD converter and get spat out the other side.
If you missed the first posts, check them out here:
Recording 100 - The VERY Basics
Recording 100 - Signal, Signal, Signal
And again, my aim here is to try to provide a gentle primer to recording and answer some basic questions that often get glossed over, that someone may be too intimidated to ask, or simply not even really know _how_ to ask just yet. There’s a lot of information out there (good and bad), and it can all be pretty daunting. With any luck, this post can help cut through a lot of the noise and provide some bit of signal (heh) to orient the absolute beginner to the world of recording.
Just a Small Sample
Analog to digital conversion happens similarly to the way that multiple still images are used to stitch together a video. Analog signals stream continuously across the wire, and a converter will periodically take a “snapshot” of the signal. The frequency at which this snapshot is taken is called the sample rate. Common sample rates for (CD) audio, in kHz, are: 44.1 (single speed), 88.2 (double speed), and 176.4 (quad speed). For (DVD) video, you’ll commonly see: 48, 96, and 192 kHz sample rates.
Along with the frequency of the samples, the bit depth (level of detail) must be taken into consideration. A very good way to visualize this is to compare early Nintendo graphics to a modern Playstation. More bits means more precision in measurement, which then translates into higher resolution and fidelity the audio capture. Currently, 24 bits is considered the standard for high resolution audio, but previously 8, 16, and 20 have been used as standards.
When looking at audio interfaces and converters, you’ll often see these listed in “bit depth / sample rate” form: 24/96, 24/192, and so on.
Nyquist-Shannon, or How Bigger Isn’t Always Better
While most modern audio interfaces are capable of recording at 24/192, this isn’t strictly necessary, or even really desired. The Nyquist-Shannon theory basically states that for any given frequency, you only need to have a sample rate that is double that frequency in order to faithfully capture it. With the nominal human range of hearing being 20 Hz to 20 kHz, this means that a sample rate of 40 kHz would suffice to cover the nominal range of human hearing.
So what gives? Like most topics that live at the boundary of art and science, what happens above the Shannon-Nyquist frequency is subject to much debate. I won’t go into detail here, but rest assured there are tomes of arguments elsewhere that can be pretty easily found if you want to read up.
There are, however, a few practical matters that more immediately come to mind when choosing sample rates. Higher sample rates generate more data, which will in turn require more storage, more horsepower to crank through it, and more bandwidth to transfer it. If any of these resources are a concern, just know that 24/44.1 is a perfectly acceptable configuration of your interface and project.
Performance will always carry the day, and if you’re collaborating with someone, just agree up front on these settings and get on with the making music part.
Historically, the guidance to selecting a sample rate is to consider the eventual delivery method (audio vs video) and use a multiple of the base rate (44.1 or 48, respectively). If you have to convert sample rates, think of it like using an adapter. It isn’t the end of the world, there is a potential for things to get weird, but likely you’ll be fine and it is best avoided in the future if possible.
USB, Firewire, Thunderbolt, Ethernet, Other?
Believe it or not, interface connectivity is more a matter of convenience than anything, as even earlier USB formats have the ability to carry many channels of audio signal without being a bottleneck. If you’re not super math inclined, you can skip over the rest of this short section and not miss out on much. Bottom line, use an open connection on your computer.
Now, on to the basic maths! Using the bit depth and sample rate we can calculate the size of the data flow for a single channel of audio:
(bits / sample) * (samples / second) = bits / second
24 bits * 192 kHz = 4608000 bits / second = 4.608 Mbps
Given that USB 2.0 can carry a theoretical maximum of 480 Mbps, this means that it can carry 480 Mbps / 4.608 Mbps / channel, or just over 104 channels of high resolution audio, which should be sufficient for just about any of us.
I won’t work through a super detailed example here, but you can also use the rate from above to calculate storage requirements by multiplying the flow rate by the length of each capture in seconds and then summing them - 10 tracks of 10 seconds at 24/192 would need roughly 460.8 Mb available to store.
Audio File Formats
Now that we’ve worked through conversion and have an idea of what is coming out of the business end of an AD converter, we need a pace to stuff all of those samples that we’re generating. This is the humble audio file. Given that the majority of us will opt to let a well behaved computer program manipulate our audio files, there are only a few salient points to cover here on audio file formats.
Audio is generally recorded in an uncompressed audio format, such as WAV or AIFF. By definition, these files are larger than compressed audio formats such as MP3 or FLAC due the data more directly representing the original audio capture. In practice, this means less computational overhead within your DAW, as it does not need to perform any data de/compression when working with the files.
As a side note, DAWs can work comfortably with a number of audio formats, but short of importing an external media file (like your buddy’s MP3 or a rip from your favorite CD), you’ll mostly be working with uncompressed data formats.
Towards the end of the process, you will render your multitrack project down to a two track stereo in a format that is more suitable for distribution, such as the aforementioned MP3 or FLAC. This rendering is considered to be a destructive transformation, as once the tracks are combined into a stereo format, the originals cannot be recreated from the render.
Now What?
At this point, we’ve covered a good bit of ground from the point of capturing analog signals (from a microphone or instrument), through some utilities to get the right levels going into the right places, across AD converters, and finally splatting them into files on your computer. Before we actually dive into the DAW and the larger production process, it is worth taking a moment to consider one of the biggest components of getting a good capture to begin with - the room. The art and science of getting a good recording starts from the walls and works its way inwards (with decreasing importance) as you get closer to the DAW.
Now that we’ve covered a bit of analog signals and their respective levels, it is time to take a look at what happens when those signals hit the input of an AD converter and get spat out the other side.
If you missed the first posts, check them out here:
Recording 100 - The VERY Basics
Recording 100 - Signal, Signal, Signal
And again, my aim here is to try to provide a gentle primer to recording and answer some basic questions that often get glossed over, that someone may be too intimidated to ask, or simply not even really know _how_ to ask just yet. There’s a lot of information out there (good and bad), and it can all be pretty daunting. With any luck, this post can help cut through a lot of the noise and provide some bit of signal (heh) to orient the absolute beginner to the world of recording.
Just a Small Sample
Analog to digital conversion happens similarly to the way that multiple still images are used to stitch together a video. Analog signals stream continuously across the wire, and a converter will periodically take a “snapshot” of the signal. The frequency at which this snapshot is taken is called the sample rate. Common sample rates for (CD) audio, in kHz, are: 44.1 (single speed), 88.2 (double speed), and 176.4 (quad speed). For (DVD) video, you’ll commonly see: 48, 96, and 192 kHz sample rates.
Along with the frequency of the samples, the bit depth (level of detail) must be taken into consideration. A very good way to visualize this is to compare early Nintendo graphics to a modern Playstation. More bits means more precision in measurement, which then translates into higher resolution and fidelity the audio capture. Currently, 24 bits is considered the standard for high resolution audio, but previously 8, 16, and 20 have been used as standards.
When looking at audio interfaces and converters, you’ll often see these listed in “bit depth / sample rate” form: 24/96, 24/192, and so on.
Nyquist-Shannon, or How Bigger Isn’t Always Better
While most modern audio interfaces are capable of recording at 24/192, this isn’t strictly necessary, or even really desired. The Nyquist-Shannon theory basically states that for any given frequency, you only need to have a sample rate that is double that frequency in order to faithfully capture it. With the nominal human range of hearing being 20 Hz to 20 kHz, this means that a sample rate of 40 kHz would suffice to cover the nominal range of human hearing.
So what gives? Like most topics that live at the boundary of art and science, what happens above the Shannon-Nyquist frequency is subject to much debate. I won’t go into detail here, but rest assured there are tomes of arguments elsewhere that can be pretty easily found if you want to read up.
There are, however, a few practical matters that more immediately come to mind when choosing sample rates. Higher sample rates generate more data, which will in turn require more storage, more horsepower to crank through it, and more bandwidth to transfer it. If any of these resources are a concern, just know that 24/44.1 is a perfectly acceptable configuration of your interface and project.
Performance will always carry the day, and if you’re collaborating with someone, just agree up front on these settings and get on with the making music part.
Historically, the guidance to selecting a sample rate is to consider the eventual delivery method (audio vs video) and use a multiple of the base rate (44.1 or 48, respectively). If you have to convert sample rates, think of it like using an adapter. It isn’t the end of the world, there is a potential for things to get weird, but likely you’ll be fine and it is best avoided in the future if possible.
USB, Firewire, Thunderbolt, Ethernet, Other?
Believe it or not, interface connectivity is more a matter of convenience than anything, as even earlier USB formats have the ability to carry many channels of audio signal without being a bottleneck. If you’re not super math inclined, you can skip over the rest of this short section and not miss out on much. Bottom line, use an open connection on your computer.
Now, on to the basic maths! Using the bit depth and sample rate we can calculate the size of the data flow for a single channel of audio:
(bits / sample) * (samples / second) = bits / second
24 bits * 192 kHz = 4608000 bits / second = 4.608 Mbps
Given that USB 2.0 can carry a theoretical maximum of 480 Mbps, this means that it can carry 480 Mbps / 4.608 Mbps / channel, or just over 104 channels of high resolution audio, which should be sufficient for just about any of us.
I won’t work through a super detailed example here, but you can also use the rate from above to calculate storage requirements by multiplying the flow rate by the length of each capture in seconds and then summing them - 10 tracks of 10 seconds at 24/192 would need roughly 460.8 Mb available to store.
Audio File Formats
Now that we’ve worked through conversion and have an idea of what is coming out of the business end of an AD converter, we need a pace to stuff all of those samples that we’re generating. This is the humble audio file. Given that the majority of us will opt to let a well behaved computer program manipulate our audio files, there are only a few salient points to cover here on audio file formats.
Audio is generally recorded in an uncompressed audio format, such as WAV or AIFF. By definition, these files are larger than compressed audio formats such as MP3 or FLAC due the data more directly representing the original audio capture. In practice, this means less computational overhead within your DAW, as it does not need to perform any data de/compression when working with the files.
As a side note, DAWs can work comfortably with a number of audio formats, but short of importing an external media file (like your buddy’s MP3 or a rip from your favorite CD), you’ll mostly be working with uncompressed data formats.
Towards the end of the process, you will render your multitrack project down to a two track stereo in a format that is more suitable for distribution, such as the aforementioned MP3 or FLAC. This rendering is considered to be a destructive transformation, as once the tracks are combined into a stereo format, the originals cannot be recreated from the render.
Now What?
At this point, we’ve covered a good bit of ground from the point of capturing analog signals (from a microphone or instrument), through some utilities to get the right levels going into the right places, across AD converters, and finally splatting them into files on your computer. Before we actually dive into the DAW and the larger production process, it is worth taking a moment to consider one of the biggest components of getting a good capture to begin with - the room. The art and science of getting a good recording starts from the walls and works its way inwards (with decreasing importance) as you get closer to the DAW.