I had a very frustrating conversation the other day about a fade out on a song. I thought it sounded too fast. To me, it sounded very linear. I was trying to explain it should be a logarithmic fade out. Sarcastically, I was told I should teach a class on the subject if I flippin’ knew so much. So fuck it, class is in session. When speaking about audio, what does one mean when using the terms “linear” and “logarithmic?”
For a linear fade out, a linear equation of the dB decrease could be shown simply as y=e*x+dB, where e is a negative number. That’s a straight line heading downward. When speaking about “logarithms” in audio applications, though, it’s actually describing several things: exponential and logarithmic curves, and their reverse functions. For a “logarithmic” fade out, the function would be y=ex*dB, where e is a number between 0 and 1; that is an exponential function showing decay. For fade ups, the function can be reversed to y=ex/dB to show an exponential increase in volume. Fucking confused, yet? YES!*
Your ear hears in a logarithmic way. When perceiving pitch, it hears an A note at 220Hz. It hears A again an octave up at 440Hz. Then it hears A again at 880Hz. The frequency A is heard at will rise exponentially every time, creating a curve. It’s not a straight line, but your ear doesn’t hear the numbers, it hears a straight line from each octave as it passes over 12 semitones. Similarly, ears want the same thing from volume. So, a straight linear fade will perversely sound like an exponentially increasing fade to your ear.
Though these are nice straight lines on this fade, it seem to drastically taper up at the beginning of the fade in and drastically taper down towards the end of the fade out. What we need to do to smooth things out is create a logarithmic fade.
The quieter part of the fades are extended. Our perception of a smooth transition from silence to noise and back again is aided by a mathematical curve. Did you think algebra didn’t affect you all the God-damn time? Think about it every time you turn a volume knob, because algebra is fucking with your head… in a good way.
Type A potentiometers used strictly for volume have a logarithmic taper, as can be seen by the measurements. That’s to adjust for your stupid faulty ears that can’t hear those minute changes in the quieter audio spectrum. Stupid, stupid ears. If you used type B linear pots for volume knobs, the decay would sound uneven.
So, I hear no one ask, “what about crossfades?” Cross fading is the technique of taking one segment of audio and blending it over another. DJs do it to keep the beat going between songs. Audio engineers do it to hide the fucking mistakes the guitar player made while doing a solo. The latter case is more relevant here.
To do a crossfade, one should use the opposite technique for a smooth fadeout, basically reversing the curve. We want the tracks to exponentially fade out and then back in so quickly the listener never hears the transition. A linear transition isn’t quick enough. The listener would hear where the tracks join. We use a logarithmic transition that utilizes the ear’s stupid sense and plays double foolies on it.
The listener can’t really hear the audio drop at the exact point where the tracks transition, because it’s a stupid fucking logarithmic ear. The fade in and fade out of the joined tracks is so drastic they appear and disappear without any audible click-in point. Voilá, your noodle-headed guitar player just totally nailed that solo.