The optional DJ Shield (sold separately) can be added on top to give you 5 buttons, 3 potentiometers, and two indicator LEDs. It's not required to use with the Audio Hacker but it makes it easier to do projects that require more controls.
This video shows only a few of the many fun projects you can do with the Audio Hacker. See the projects page for a collection of great projects.
|Audio input and output 3.5mm stereo jacks and solder pads. The stereo input is converted to mono, and the output is always mono. Solder pads are provided for input and output in case you want to use different types of connectors.||The bypass switch allows you to hear the input signal (after it has been converted to mono) on the output. This switch allows you to compare the original signal with the processed output of the Audio Hacker.|
|Small volume knob for the output level of the processed signal.||Two buttons provided for user input. These are connected to digital pins 5 and 6.|
|Preamp gain allows you to amplify weak input signals. For inputs from an MP3 music player (e.g. iPod) or computer, this potentiometer should be set to its lowest level (no gain).||Battery connection allows you to keep your audio samples in non-volatile memory when power is disconnected. A simple 3V coin cell battery (e.g. CR2032) is sufficient to retain the memory contents. See this project for more details.|
Input SettingsThe Audio Hacker has a preamplifier that can be used to amplify weak signals. The input should only be amplified if the incoming signal is very weak. For output from a computer or MP3 player, don't amplify the signal.
Output SettingsThe Audio Hacker has a volume knob to control the output signal strength. DO NOT connect the Audio Hacker output to large unamplified speakers. It can drive a small 8 ohm speaker, but for big sound only connect it to a stereo receiver system or amplified (powered) computer speakers.
Bypass SwitchThe bypass switch should be in the left position (no bypass) to use the Audio Hacker. To hear the original signal on the output, move the switch to the right position to bypass the Audio Hacker circuitry. The signal on the output will still be converted to mono, but will be otherwise disconnected from the Audio Hacker circuitry.
Memory CapacityThe Audio Hacker has 256K of serial SRAM to store audio samples. You can store multiple samples if you divide the memory into banks or chunks, but there is an upper bound on the total amount of audio that can be recorded.
The amount of audio that can be stored depends upon the sample rate and the bit resolution. Both of these affect the quality of the audio. Higher quality means less capacity. If lower quality audio is sufficient for your project, you can store much longer samples. This project lets you dynamically change the sampling rate and bit resolution so you can hear the difference in realtime. The table below shows how sample rate and bit resolution affect the audio capacity.
A Note About Performance ConstraintsAn Arduino is fast enough to sample an audio input with the ADC and recreate the signal on the output DAC at a rate of 44.1 kHz with 12-bits of resolution. However, when recording the sampled audio to SRAM, the sample rate is limited to about 22 kHz because it takes extra time to communicate with the memory chips. The more you try to do when processing audio, the lower the sample rate must be in order to have enough time for the audio processing. Some Audio Hacker projects use a lower sample rate and/or a lower bit resolution to achieve the speeds needed for the project. For example, the 3-track looper project uses a sample rate of 18 kHz and 8-bit audio in order to have enough time to read three tracks from memory and mix them together.
Audio Hacker LibraryThe Audio Hacker library makes it easy to access the different functions of the shield and comes with many example projects. There are API functions for reading the ADC, writing output to the DAC, and reading/writing the serial SRAM memory. By looking at the example projects and reading the API documentation below, you can learn how to write your own Audio Hacker programs. The 8-bit sampler is a good project to start with to learn about the libary.
Download the library
Instructions for installing an Arduino library can be found on the Arduino web site. After installing, the structure should look like this:
libraries | + AudioHacker | + AudioHacker.h | + AudioHacker.cpp | + examples | [many example sketches...]
Library APIbegin() : initializes the Audio Hacker shield
readADC() : read the voltage on the ADC and return a 12-bit value. Returns an unsigned int in the range [0-4095].
readADC_8bit() : read the voltage on the ADC and return an 8-bit value. Returns an byte in the range [0-255]. The least significant 4 bits of the 12-bit ADC reading are discarded.
writeDAC_8bit(byte output) : write an 8-bit value in the range [0-255] to the DAC. The actual value written to the DAC is 12 bits in the range [0-4095] with the lower four bits as 0.
writeSRAM(byte chipNumber, long address, unsigned int data) : write a 16-bit value to the memory on one of the two SRAM chips. Chips are numbered 0 and 1. Address range is [0-131070]. The two bytes of the unsigned int will be stored at address addressand address+1.
writeSRAM(byte chipNumber, long address, byte *buf, int len) : write multiple bytes to the memory on one of the two SRAM chips. Chips are numbered 0 and 1. len specifies the number of bytes from the buffer to write. Address range is [0-(131071-(len-1))].
writeSRAMPacked(byte chipNumber, long address, unsigned int data1, unsigned int data2) : store two 12-bit audio samples efficiently in 3 bytes of SRAM by "packing" the data efficiently. The two 12-bit values data1 and data2 will be packed into 3 bytes by discarding the upper 4 bits of each unsigned int. Chips are numbered 0 and 1. Address range is [0-131069]. The data will be stored at addresses address, address+1, and address+2.
readSRAM(byte chipNumber, long address) : read a byte from memory. Chips are numbered 0 and 1. Address range is [0-131071]. The return value is the byte read.
readSRAM(byte chipNumber, long address, byte *buf, int len) : read multiple bytes from memory into buffer buf. Chips are numbered 0 and 1. len specifies the number of bytes to read into the buffer. Address range is [0-(131071-(len-1))].
readSRAMPacked(byte chipNumber, long address, unsigned int *buf) : read two 12-bit audio samples from 3 bytes of SRAM. The two 12-bit values are packed into 3 bytes by discarding the upper 4 bits of each unsigned int. Chips are numbered 0 and 1. Address range is [0-131069]. The data will be read into buf and buf.
The DJ Shield shield for Arduino give you 5 high-quality buttons and 3 10K linear...
Add 13 digital output pins to your Arduino! This shield has 16 digital output pins...
The Defusable Clock kit is an electronics kit that lets you build a scary looking...
The Digit Shield is a simple, low-cost Arduino shield that provides a four digit 7-segment...