DSP Audio Effects Project
Dynamic Range Compression
Dynamic range compression is a non-linear electronic audio effect that reduces louder noises and emphasizes quieter sounds. In this process, there is a certain power level threshold that will allow sounds under this value to remain constant. Any sound above this threshold is reduced by a factor that is determined by the compressor. Reduction factors usually vary from 2:1 to 10:1 (severe compression). If for example, the signal was 5 dB over the threshold, and the reduction factor was 5:1, the signal would be reduced to 1 dB above the threshold. This type of compression is not linear because it uses level dependent gain. Therefore, if two signals where summed, and then compressed, the result would vary significantly compared to compressing the two signals and then summing them.
Audio systems in public spaces require compression so that when music is played the volume is constant throughout and quiet parts can still be heard. It is also used in amateur radio to make signals easier to identify from station to station. Compression is often used to make instruments more uniform so that they compliment other instruments in the piece, as well as maintain consistent attention from the listener. Another common use is in live recordings, where loud spikes must be reduced for enjoyable listening. In broadcasting, most countries have legal limitations on the peak volume level that can be broadcasted. Compression is applied to ensure these levels are not exceeded.
Our Implementation
Original
After Effect
This demonstration uses the call_compression function using a live recorded piano piece titled piano.mp3 in the project files page. Using implementation 1, we set the cutoff at -15 db and a ratio of 2.
Distortion is added when compression is applied because our approach does not use an attack or release. This smoothes out the transition where the signal is reduced, but our implementation creates sudden changes in the signal which produces distortion.
Compression: (-15dB cutoff, 2:1 ratio)
Other Implementation
Original
After Effect
This demonstration uses the call_compression function on piano.mp3 in the project files page. Use implementation 2 for the function. This algorithm was found online, and the website is included in our references page.(note: this function is not variable in threshold or reducing ratio)