Understandability at 1 Bit

I recently had the opportunity to do some MUSHRA testing which is used to gather subjective qualitative data on codecs. MUSHRA stands for Multiple Stimuli with Hidden Reference and Anchor and compares several codecs and/or bitrates with the original source and an anchor, which is a low quality version of the original (usually bandlimited to 3.5kHz). The user subjectively rates the quality of the various samples and the data is gathered and compared.

One of the codecs included in the testing was an MP3 at 64kbps, which as you can imagine sounded pretty awful. But no matter how bad the quality of the codec at a given bitrate, the sample was always recognizable, which got me to thinking about the qeustion – “At what bitrate or bit-depth does a piece of music or speech become inaudible or unrecognizable?”. My theory was that you could get pretty low before the signal gets lost completely. I decided to start at the bottom and work my way up. Could you recognize a signal at a bit depth of 1?

After a quick search I found this discussion on Tom’s Hardware, which goes pretty in depth on some tangents about dither and PWM (pulse width modulation), but within the conversation someone decided to put the theory to the test, producing a matlab script to quantize a piece of audio to N bits. (Credit to Randy Yates, Sony Ericsson Mobile Communications)

I copied the code to text files and saved them as .m files (matlab script). Not having a copy of matlab installed on my machine I needed to convert the code to scilab format instead. Scilab is a great open source alternative to matlab. It has a lot of the same functionality, so it is perfect for quick experiments like this. I used the convenient scilab function mfile2sci to convert the .m script files to the scilab equivalents. I decided not to stray too far from the source material and went with a chopin piece (Nocturne in G minor) to quantize.

Here is the youtube version of the original 30 second wav source (trimmed from a 5 minute 128kbps MP3 source file)

 

 

And here is the 1-Bit quantized with dither version [warning – full scale noise signal, check volume to avoid damage to hearing or speakers]

 

 

The second file is just noise, and rather unpleasant to listen to, but buried within the noise, the piano melody is still audible and discernible. This is a pretty strong testament to our ability to pick out audio signal within noise.

If you want to hear what dither really does to a piece of quantized audio, here is the same audio, processed by the same script, but with dither turned off. The piano piece is still recognizable, but highly distorted, rather than “buried” within the noise. The link above and here gives a pretty good overview of what dither actually is. A good way to think of it is masking unpleasant quantization noise, with more natural white noise (or other shaped noise).

[warning – full scale audio – check volume to avoid hearing or speaker damage]

 

The scilab clips used are available below

clip.sci

quantize.sci

You can call the function with the following commands –

// Modify as required
stacksize(‘max’);
[chopin,Fs,N] = wavread(‘chopin.wav’);
wavwrite(quantize(chopin,1,1),Fs, N, ‘chopinq.wav’);

Share this post
  , , , ,


One thought on “Understandability at 1 Bit

  1. Pingback: Quora

Leave a Reply

Your email address will not be published. Required fields are marked *