-
Notifications
You must be signed in to change notification settings - Fork 25
/
rationale,md
19 lines (10 loc) · 5.07 KB
/
rationale,md
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Rationale
==============
This essay is about the plugin available [here](readme.md).
For a long time now, I've listened to classical music less than I might like to. A lot of that is because listening to classical music is hard. You have to turn the volume up to hear the soft parts, and then either turn it down when it gets loud or have it be loud enough to be distracting (or painful). For instance, in the car, there's a lot of noise from the road, so even at normal volumes it can be difficult to hear some of the soft parts. And some albums and songs are so quiet that many players can't be turned up loud enough to hear the music, even in quiet conditions!
I've sort of put up with this problem for a long time, but it really hit home how inconvenient it is the other day when I was driving with some friends. I changed my mp3 player to some Debussy piano solos (from his Children's Corner suite, really nice stuff) and tried to play some of it for them. Well, it failed pretty miserably. It was so quiet, even with the volume all the way up, that you couldn't even hear anything below a mezzo-piano, and the tape adapter was already so noisy (not to mention the harmonic distortion) that enjoying the music was basically impossible. And I realized: if only this music were as loud as normal music, they probably would have really liked the tracks. So the low volume of those songs actually turned two people off of classical music. What a shame!
So, what to do? Well, there's no simple solution, but there is a pretty good one. Using an audio editing program, it's possible to rip the music off of a CD and change the sound to be louder. Then you can make an MP3 of it or burn it back to a CD. This solution is kind of labor intensive, but after the first CD it can be largely automated (depending on how much you want to tweak it for each song, and that does make a difference), and anyway it's the sort of thing many people enjoy doing with their music collections. Well, me, at least.
So one day I loaded up a song into my editor and tried applying a dynamic compression effect to it. Dynamic compression, often simply called "compression," is a technical term in audio editing that refers to a process that raises the volume of the quiet parts of an audio input up to near the volume of the loud parts. This has the effect of compressing, or reducing, the *dynamic range*—the difference between the soft and the loud—of the signal. The way it does this is usually to detect how loud the input is at a given point and amplify or reduce the output until it's near the target volume. Now, it doesn't adjust its amplification instantly. If the signal drops suddenly (as it might in a recording of speaking, after the end of a sentence), the compressor gradually increases the volume over a period of anywhere from .25 seconds to 5 seconds.
However, most dynamic compressors _decrease_ the volume instantly when the signal rises. Well, actually, worse than "instantly", they actually have a lag. They decrease the volume only _after_ the input starts to rise. This is because most compressors are designed to be used on vocals and solo instruments, in realtime. Even in audio editing programs, where things aren't realtime, the compression effect is usually designed the same way. Because it's in realtime, it doesn't have the option of decreasing amplification before the signal starts to rise. So some of the signal, usually some tenths of a second, is output at a very high volume while the compressor is detecting the loudness and reducing the amplification.
As you might imagine, this doesn't really sound that great. When I applied that effect to my music, it didn't turn out well at all. It sounded much too harsh, and sudden loudness usually led to clipping. (Clipping is like when someone speaks loudly into a microphone very close to their mouth, and you can't understand what they're saying because of the distortion.) The feel of the music was completely lost.
So I let it be for a few years. The other day, I was thinking some more on the problem, and came up with a design for a compressor that would do the kind of job I really wanted it to. The main idea is to anticipate the loud parts in advance, and start reducing the volume smoothly ahead of time so that it doesn't get loud too quickly. (Another idea is to support extremely long rise and fall times so that the effect is never too intrusive.) I did some of the math (fifth grade math, albeit, involving finding the intersection of lines—I tried a version with parabolas that didn't work out) and read up on the programming interface to Nyquist (luckily, I was already familiar with the language used to program the plugins), and within two days I had a nice, working compressor. It does wonders to all sorts of piano solo and orchestral music. It's possible to listen to things at very low volumes without missing any of the music. It even makes you hear things that you couldn't otherwise hear even at full volume, because they're just so quiet. (Things like the sound of the pedals being released on the piano at the end of a soft piece, or the very beginning of Ravel's Daphne et Chloe.)