top of page

Data and Naive Compression

Progress report #1

Overview

For our first progress report we have implemented a 'naive' approach to compression and plotted the time and frequency representations of an input signal (male vocal) and its compressed counterpart. 

We will discuss the goals of our project, selection of our input data and our first compression algorithm below.  

Our Data

Our project will implement a variety of compression algorithms and highlight characteristic differences between them.  It is our hope that by doing this we will be able to 'demystify' compression for beginning digital audio students and allow deeper understanding of tradeoffs between different compressors and different compression settings.  With this goal and our intended audience (audio beginners) in mind, we have elected to keep our input signal volume relatively low in order to keep the focus on the compression characteristics and to keep our output data easy to digest.

 

We have selected three different audio signals for input.  The signals were chosen with the intention of creating a representative group of sounds you would typically find in recorded music.

  • A male vocal sample

  • An strummed acoustic guitar

  • A drum kit

 

Audio was recorded at University of Michigan in the Duderstadt Recording Studio by Avery Bruni.  All files were recorded with at 44.1k with 16 bit depth and are stored as .wav files.

Algorithm and Plots

 

Our naive compression algorithm is intended to be an 'honest try' approach - simply reduce the volume of any sample above a preselected threshold by a fixed amount.  

 

Our sample signal (in this case the male vocal clip)  is plotted both before and after compression in the time domain in Figure 1, where the red line shown represents our threshold.  By noting the maximum amplitude on each plot (approx. 0.4 for uncompressed and 0.25 for compressed) it is clear the signals volume is being reduced when it exceeds the threshold, and thus we have achieved simple compression.  Figure 2 shows the same two signals plotted in the frequency domain as well as a plot of the difference between the two signals, illustrating the effect of the compressor.

All plots were generated using built-in MATLAB plotting tools.

 

While our naive compressor does accomplish its given task, it is not a viable algorithm for actual audio production due to two primary drawbacks:

  • Currently this algorithm only is implemented in MATLAB i.e. processing cannot be done in real time

  • The algorithm introduces a fair amount of distortion into the signal due to its lack of defined attack, release, or knee characteristics

Male Vocal - Sample Audio
00:00 / 00:00
Drum Kit - Sample Audio
00:00 / 00:00
Acoustic Guitar - Sample Audio
00:00 / 00:00

Figure 1: Male vocal signal compressed and uncompressed in time domain

Figure 2: Male vocal signal compressed and uncompressed in frequency domain; difference between the two signals

Acoustic Guitar - Sample Audio
00:00 / 00:00
Naive Comp. Guitar - Sample Audio
00:00 / 00:00
bottom of page