There are lots, and lots, and lots of little things that can make a huge difference to sound quality, and increasingly production kit does them for us. Sometimes it doesn’t, though, and even so it’s handy to know what’s happening behind the scenes. So what’s a zero crossing point and why does it matter?
Digital audio is stored as a representation of an actual sound wave, so that it can be recalled and turned back into a sound wave at a later point. We call digital recording sampling, and measure its sample rate in Hertz (times per second) because as a physical soundwave is recorded, its shape is plotted (or sampled) every so often. The more often the wave’s shape is sampled, the more accurate the digital representation is; sampling is like join the dots, and the more dots you take out of a join the dots picture the more jagged and less like the original picture the finished puzzle will look.
Zero Crossing Points
A zero crossing point, at the risk of killing the suspenseful element of today’s piece, is a point in a digital audio file where the sample is at zero amplitude. At any other point, the amplitude of the wave is rising towards its peak or sinking towards its trough. The reason finding zero crossing points to cut down is important, especially for things we plan on looping, is because if the start of one piece of audio and the end of the next are cut on completely different amplitudes we will get an instantaneous change in amplitude that sounds like a pop or a cracking sound. At zero, the joins between the audio will be as smooth as possible.
Above is a picture of a piece of stereo audio, with a line running down where I’m going to cut the sample. At the moment we’re so far zoomed out of the sample, it’s impossible to tell where the amplitude is at zero… so we’ll have to zoom in.
Zoomed in a little closer, we can see things a little bit more clearly. It looks like I’ve found a place where the amplitude is at zero, but just to make sure let’s go in with that magnifying glass a bit more.
Got it! …right? It certainly looks like I’m about to cut this in the right place, but in order to make absolutely sure we need to go right down to the sample level to make sure.
Lo and behold, I was out by a sample. Now, considering that this is 44.1KHz audio, this is 44,100ths of a second. Not that much, really! The thing is, even this can make a big difference, and the bigger the jump away from zero that next sample is, the bigger that difference will be. You’ll also notice that if you have a stereo file, finding a point at which both channels are at zero is more difficult and in some circumstances may not be possible. If this is the case, making things as smooth as you can and checking out the extra considerations below will help you out.
Listen to the sound of this looped sample with absolutely no care taken to cut along zero crossing points:
And now listen to it out by a sample each end to hear that it’s better, but still not quite perfect.
Compare it to the perfectly looped version:
You’ll hear that that that popping sound is completely gone. The loop doesn’t sound completely smooth, but that’s down to the actual sound changing over the course of the audio that is looped; the loop points themselves have no popping in them.
Zero crossing points aren’t the be all and end all for seamless looping, but they are very important. Many audio editors allow you to create miniscule crossfades between two directly adjoining pieces of audio to ‘smear’ out the the imperfections, and even if you don’t have a zero crossing at each end of your audio files you’ll probably be able to find a crossfade point that makes the popping inaudible.
The best way to work with audio is almost always to start with a zero crossing point, even if you want to work with a very fast attack. Don’t forget that we’re talking tens of thousandths of seconds when choosing individual samples, so losing punch isn’t really an issue here! If, somehow or other, you have audio that is already cut at a zero crossing point and thus makes a popping sound at the beginning or end (kicks and snares from sample packs and sound libraries will sometimes be guilty of this – they shouldn’t be, but they are) then a volume fade to manipulate the amplitude yourself is a good way to fix things.
Don’t forget about OD Music Production 101 for lots more information on how to work with your music gear, not against it, and OD Total Music Production for those of you that want to get into the real nitty gritty!