EFX-TEK

TEK Talk => Audio => Topic started by: JonnyMac on October 21, 2013, 01:46:31 PM

Title: SD Card and Encoding Tips
Post by: JonnyMac on October 21, 2013, 01:46:31 PM
Tip 1: Not all SD cards are equal (in quality). In fact, there's an SD Card Association and a vendor must be part of that association, and abide by its rules, to put the SD card logo their product. You should only use cards with an official SD logo.

Tip 2: Not all SD cards are equal (in speed). A properly manufactured card (see #1) will also have a speed rating  (a C with a number in it marked on the card). The higher the number, the faster one can move data to and from the card. For audio, we suggest a Class 4 card or higher.

This image shows a popular SD card that works very well in our AP-16+. Note the SD card logo and speed rating are clearly marked.

(http://www.efx-tek.com/files/good_sd_card.jpg)


What many people don't realize is that an SD card is actually "smart" media; it's not just a magnetic storage device like an old floppy disc. What this means is that the host (computer or audio player) has to "talk" to the SD card controller to get data from it, or store data on it.

When it comes to audio for props and displays, we can help the SD card in two ways:

Tip 3: Reduce the sample rate from 44.1kHz to 32kHz. Here's the reason: normal human hearing is only up to about 15kHz -- and that's only in people with really good hearing. Even at that, responsiveness to high frequency sounds is much less than lower frequencies. With a 32kHz sample rate we can reproduce a 16kHz sound. By reducing the sample rate to 32kHz we reduce the data throughput by about 27.5% -- this can make a big difference in the performance of some low-cost SD cards, and you won't be able to hear the difference between the sample rates.

Tip 4: If the sound doesn't have to be stereo, then make it mono -- this will cut the data throughput by 50%

Note: the throughput numbers are specifically for WAV files, but these modifications affect encoded files like MP3s as well.


Our favorite audio editor is Audacity. To change the sample rate of the file, simple select it in the drop-down box located in the lower left-hand corner of the screen. The file will be re-encoded on the next export. If you wish to test the new sample rate before exporting the file, use Tracks -> Resample.

Here's an example file: a monster sound from a monster-in-the-box prop. Note that the original file is stereo, 44.1kHz. Chances are only one speaker is used -- as you can see, both channels contain the same data.

(http://www.efx-tek.com/files/mib_fix_01.jpg)


Open the track menu by clicking on the little black triangle in the header; select Split Stereo to Mono. This process will create two mono tracks from the original stereo track. Delete the second by clicking the X in the track header.

(http://www.efx-tek.com/files/mib_fix_02.jpg)


Finally, set the new sample rate to 32000 (32kHz) before exporting.

(http://www.efx-tek.com/files/mib_fix_03.jpg)


Tip 5: For small audio players (from any manufacturer) it's a good idea to remove the non-audio metadata from the file. In Audacity you can use File -> Edit Metadata to open the metadata dialog, then press the Clear button to remove all non-audio information from the file.


Review:
  -- use SD cards with official logo
  -- use SD cards with a speed rating of 4 or greater
  -- reduce sample rate of file to 32kHz
  -- use mono file if possible
  -- remove metadata from file before exporting
Title: Re: SD Card and Encoding Tips
Post by: JonnyMac on October 21, 2013, 01:49:40 PM
For those wondering why I split the file to mono before changing the sample rate -- this was done just to save Audacity a little work. The order doesn't matter, but there's no need to re-sample two channels when we're only going to use one.
Title: Re: SD Card and Encoding Tips
Post by: livinlowe on October 21, 2013, 03:00:20 PM
Thanks, Jon, for this tutorial. As always, EFX-TEK really tries to help their customers with their projects!
Title: Re: SD Card and Encoding Tips
Post by: bsnut on October 21, 2013, 04:11:07 PM
Quote from: livinlowe on October 21, 2013, 03:00:20 PM
Thanks, Jon, for this tutorial. As always, EFX-TEK really tries to help their customers with their projects!
Yes, I have to agree another great tutorial as normal.
Title: Re: SD Card and Encoding Tips
Post by: JonnyMac on October 22, 2013, 12:25:44 PM
Thanks, guys.

BTW... for those wondering about the size reduction of my demo: The original (stereo, 44.1kHz) file is 1,766,380 bytes. The mono, 32kHz version is 640,892 bytes (36% of the original) -- and I would challenge anyone to detect an audible difference between the two files, especially when used in the context of a monster-in-the-box prop.