Compression in relation to music can be a confusing and frustrating topic, especially for music producers.
Music compression has been around for years, and it is all based on the premise of throwing away data to make another piece of data stand out. There are many types of compression in music, depending on the genre of music. The one I'm going to touch upon is dynamic range compression.
As a music producer myself, I had trouble understanding what compression was and how to incorporate it into my tracks when first beginning my venture into the world of music production. For months, all I would hear about was how it was quite necessary for me to compress the hell out of my kick drums, and how I should compress my bass. I was told that I would have to start to incorporate compression into my music if I ever wanted it to sound professional. Confused and quite frustrated, I began reading eBooks which explained why compression was so important, how to use compression and what types of compression there are. But even with the assistance of the books I read on the matter, compression is still quite a complex subject, in both a pragmatic and theoretical approach.
Common features that you would find in a hardware compressor, or a software adaptation of a compressor are the: threshold, ratio, attack, and release. There are more features in certain types of compressors. But more features can sometimes become confusing, because you will naturally require more patience when trying to find the right settings for your music. The threshold controls how loud the volume has to before the signal is reduced. Thus, setting the threshold to a higher setting will reduce the amount of compression that will occur. This is because less of the signal will exceed the threshold to activate the compressor. Conversely, a lower threshold means that the compressor will actually do more.
The ratio control how much compression occurs, depending on how much of the signal exceeds the threshold. If there are signal which exceed the compression of the threshold, the ratio controls how much of those signals are compressed.
The attack and the release work together, along with the threshold feature, to establish where compression should begin and end. If the signal is above the threshold for less time than the attack setting, then little or no compression would occur. Once compression is activated, it stays in affect for the length of time determined by the release control. So by setting a long/slow attack, you can allow through the first part of a loud sound. This is quite useful because almost every note played on an instrument contains a little burst of energy, called the "initial transient". By setting a long attack, the initial transients are allowed through, which prevents the compressor from squashing the life out of the recording. This is called over-compressing. So if your compressed music sounds lifeless and flat, a longer attack may be a good idea. Equally, setting the attack too long will prevent the compressor from working at all. It is al about give and take with compression. There is really no right or wrong answer to the dark art of compression. It is mainly about going by ear, and listening to your recordings. What might also help is listening to some professional tracks. Comparing your music to the music of the pro's can be very beneficial to your mixing skills.