How do you feel about this article? Help us to provide better content for you.
Thank you! Your feedback has been received.
There was a problem submitting your feedback, please try again later.
What do you think of this article?
Building a sound effects unit with an attractive, practical enclosure, and editing audio files for the best results.
I am forever on the lookout for things to add a bit of fun and something unusual to the Red Tin, so when I read about the Adafruit Sound FX Processor board I immediately thought I could put it to good use.
Sound Effects when DJ’ing
I had tried adding a few sound effects and samples to my DJ performance in the past, but I always found flipping between the main screen and the samples screen of the DJ software was a pain. Having a selection of sound effects I could trigger with the press of a button sounded far easier, and this is what the Adafruit board offered.
Having done some reading up, it seemed it would be straightforward to add and remove different sound effects, so it would be easily adaptable for different situations – I could, for instance, load it up with fireworks, Big Ben and a count down for a New Year’s Eve gig.
The board is powered by either 3x AAA batteries or USB, so I ordered a battery holder along with 10 buttons , an LED for a power indicator and the board itself.
Putting it in an enclosure
The first thing I did was put together a very quick design in Inkscape, the Open Source vector graphics software, for an enclosure for the board, battery pack and buttons. This meant I could laser cut a prototype and mount the Sound FX board and the push buttons, then connect them all up and start testing — instead of using a breadboard.
I based the enclosure on the design I had done for the NuTube Pre-amp, so the two would be interchangeable in the Red Tin.
The panel mounted buttons could be soldered up on the prototype and tested, then all being well removed en mass and installed in the final version of the enclosure.
I cut a small piece of MDF with holes for the buttons as they were to be arranged on the final build. I then soldered them up and connected them to the board using the instructions provided by Adafruit as a guide.
I was careful to get the wires of the ribbon cable that connected to the trigger pins on the board in the right order so they would trigger the sound effects in order – 0 in the bottom left corner through to 9 in the top right.
The next thing was to quickly load some sounds onto the board to test it. I plugged it into the PC and, as promised it showed up as a USB drive. I copied a few sound files across, connected up my buttons — still on their temporary piece of MDF — and once the board was disconnected from the PC and then powered up, I could hear the sounds being triggered as expected.
Putting the enclosure together
Now I was sure things were working as they should, I transferred the buttons to the enclosure and fixed the Adafruit board in place, raising it above the base with some 2.5mm spacers I had laser cut from scrap acrylic. I soldered a 150-ohm resistor to the anode lead of the LED, having calculated the correct value using the LED section of the DesignSpark Toolbox, and then fitted it in place. It was then connected to the battery pack, which in turn was connected to the power pins on the board. The battery pack is held in place with Velcro so that it can be easily removed to replace the batteries.
The finished enclosure consists of a red transparent acrylic top that has been heated and bent to make a three-sided box. The base is a simple oblong with cutouts to accommodate the wiring in the Red Tin. The two pieces are held together with some nice red alloy stand-offs and screws I had been saving for just such a project.
The buttons to trigger the sound effects were arranged so that, when the unit was running on batteries and not in the tin, they could easily be pressed with the thumb of one hand.
One side of the enclosure is left open for access to the battery box and the USB socket of the board. When the unit is in the Red Tin this is adjacent to the open side of the main top section of the tin giving easy access to USB on the Udoo x86 and the sound card audio connections.
Adding some more interesting sounds
Now to find some fun sounds to load up!
The board takes WAV or OGG files. WAV sound files are uncompressed, so they are great quality, but are quite large considering the board has 2MB of storage. OGG files are similar to the more common MP3, in that they are compressed files so are smaller, but not as high quality as WAV.
The advantage OGG has over MP3 is that it is free to use, so Adafruit does not have to pay any licensing fees as they would if they used MP3, so it helps to keep the price of the board down.
A quick search on the Internet came up with all sorts of sound effect files in WAV format — some free and some paid for. The BBC has an archive of over 16000 sound effects that are free to download and range from a Napoleonic Battle re-enactment to 280 different kinds of applause. I also found quite a few sites with clips from films to download.
I could just load the sounds straight onto the board, but many of them were a bit too long and it might be useful to convert the WAV files to OGG, to make the best use of my 2MB. This is where Audacity comes in. It is a free, open-source audio editor that runs on Windows, Mac OS X and Linux. It is easy to get the hang of for the basic things I wanted to do, but can also do an awful lot more when you get the hang of it. It is simple enough to open the downloaded sound effects files, trim them as required by highlighting the bits you not want, and then hitting delete and then exporting them as either WAV or OGG.
You can also convert stereo files to mono, which reduces their size.
As I saved the files I named them according to the Adafruit instructions – Tnn.WAV or Tnn.OGG, where nn is the number of the trigger. For example, the sound effect to be triggered by the first button is T00.WAV and through to T09 for the last trigger. To help me finding files in the future I also put a bit of description in the tags so that I could check the properties of the files and see what sound effect they were.
Naming the files like this provides a basic trigger: when the button is pressed the audio plays once from beginning to end. It is also possible to change the nature of the trigger by changing the name of the sound file; naming a file TnnHOLDL.WAV will mean the file only plays while the button is pressed.
There are more examples of complex triggers in the Adafruit instructions.
I soon had a selection of sound effects loaded up, including a short sample of the classic “amen break” drum sample, clips from 2001 and Space Odyssey, Big Ben chiming, and a comedy musical explosion. I discovered that if you want to loop a sound, which you can do by just keeping the button pressed, it is best to save it as a WAV and to have it triggered by one on the first buttons.
According to Adafruit, “The microcontroller on board has to look through the entire filesystem every time it detects a button press…. Use WAV format, not OGG, because WAV plays faster. Also, make sure you are using T00 slot since that is the first button checked.”
And this is what it sounds like ...