What would you think if you saw a car rolling all the way up a hill from a dead stop, without the driver accelerating?
You’d probably exclaim “that’s impossible!” or “it must be haunted!” or maybe “it’s magic!”
But it isn’t magic, and there’s actually a number of places in the world that this very phenomenon occurs. They’re called “gravity hills” or “magnetic hills”. And though you can get in your car and roll uphill just to convince yourself, the only thing truly out of whack in these places is your eyes.
Your eyes claim these hills are “magic” because there seems to be no simple explanation in the same way your mind decides that whatever sound does inside a computer is “magic” because your eyes glaze over when you see computer code. But – I assure you – though you’re used to turning mouth farts into machine guns in Pro Tools, how sound is represented inside a computer as completely understandable as a gravity hill.
What does sound look like in real life?
To explain the inside of a computer and make it understandable, we first have to start with real life. Things make sound due to waves of air pressure. When you listen to your favorite song out of a set of speakers, the speaker cones pump outwards from the speaker box and also back inwards. This movement creates both “compression” of air when the cone moves outwards and “rarefaction” of the air when it moves inwards.
If you think of the waves that occur in a lake when you throw a rock into it – “compression” is the raised up visible part of the wave, “rarefaction” is when the wave is lower or more spread out. In super layman’s terms, your speakers shove air molecules together and pull them apart – when that hits your eardrums, it’s sound!
Microphones work via the exact same process, but in reverse of that of a speaker. Air pressure waves from your mouth or another pressure source (guitar cabinet, drums, etc.) hit a small cone or diaphragm and get “transduced” (which is a fancy word for “convert” that all us audio people use) into a low-power electrical signal. This is what we like to call “analog” sound!
How does this translate into a computer?
You all know that generally there’s an “audio interface” or at least a mic input on your computer that you can record audio from. You probably even know that a more technical term for an audio interface is an “analog to digital converter” or “ADC” (the opposite of which would be a “DAC” which converts a digital signal to an analog one!)
This analog to digital converter assists in the process of “sampling” your signal in real time. Being an audio person, I’m sure you’re incredibly familiar with the term “sample rate” and numbers like 44.1k, 48k, 88.2k, and 96k. Where visual mediums have a “frame rate”, our analogous term is “sample rate” and our audio pictures must be sampled much faster to to be audible to our ears.
This is the line where most audio turns into “magic” for folks – because how this signal gets represented is hidden away from you with a visual timeline in your DAW. What’s presented to you as a waveform, a computer sees slightly differently.
It’s all data
Once sampled, your audio signal is simply stored as a set of data in your computer memory. If you’ve played with any tiny bit of code before and know what an “array” is – every sample of your sound is stored in either one array, or as many arrays as you have channels.
If you’ve never heard of an “array” before, think of it like one of those pill boxes that has a slot for each day of the week – that’s a set of pills. In audio form, one sample would go in each box. If you wanted to play back one second of audio, you might need 44,100 (or more) spots.
But what does this data look like? Clearly it’s a number, but what numbers? Well, this is fairly straightforward as well. Since your signal can only go so loud until it distorts or breaks something, and only so soft until you can’t hear it anymore – there is a minimum and maximum signal scale agreed upon. Inside of a computer this is represented by the range of 1 to -1. An audio signal would be distorting if represented by a number larger than 1, or less than -1. The signal is silent if it’s represented by 0.
Before I lose you, think about this from the perspective of looking at a sound wave in your DAW. A 440hz sine wave has a peak amplitude at both the top and bottom of the wave. To a computer, the top of the wave is 1, the bottom of the wave is -1, and no signal is 0.
Not that complicated after all, is it?!
“But Adaaam” you say, “This seems way to simple? I thought digital audio was more complicated with math and stuff!”
Oh, don’t worry – it is! But a good chunk of it isn’t as complicated as you might think. In future articles, we’re going to walk through it more together so you can understand more of what makes a bitcrusher “crunchy” or a tape delay “warped”. Though we use colorful emotional adjectives to communicate to each other and describe the quality of a sound, these qualities have other representations as well!
I think, when you get to know and understand these descriptions better from multiple angles, you’ll be a better and faster musician, or sound designer as well.
So if computer sound isn’t magic, what is it again?
- Sound itself is “compression” and “rarefaction” of air molecules
- A microphone “transduces” these pressure waves into an electrical signal
- Your audio interface “samples” that signal into numbers ranging from 1 to -1, stored in one or more “arrays”
- When played back from your computer, audio does that whole process above, but in reverse
So if it’s not magic, what about those hills?
Now that we’ve demystified the audio in your computer, I guess we can demystify the gravity hills as well. Just as you might suspect, those hills are simply an optical illusion.
Though your surroundings may cause you to believe you’re going uphill, you’re actually going downhill. Let this serve as a lesson – just because your eyes don’t understand it at first glance, doesn’t mean it’s incredibly difficult or “magic”.
But playing with sound in your computer is magic
And you don’t just have to do it with plugins, either. You may have never written a line of computer code in your life (and even better if you haven’t!), but I made Begin Audio Scripting with Reaper so that you could do just that for the very first time.
(and so that you would have fun and you wouldn’t get pissed off by it!)
If you ever wanted to give programming a shot and you’ve heard how cool Reaper is, this is the place I’d recommend you take the plunge. It’s worked so well that even people who swear on their entire lives that they’d never be able to code (like this guy) have learned and even *gasp* enjoyed it!
Take a look for yourself right here.
Copyright 2016-2021, NIR LLC, all rights reserved.