Granular synthesis creates a unique type of distortion caused by discontinuities between individual grains in the outgoing signal. Sometimes this distortion creates an effect I can only describe as a "ripping" sound, other times it introduces new frequencies into the audio that were not present before. Here is an example by Aphex Twin, the granular synthesis is especially prominent in the bridge at around 3min in. Another example of granular synthesis, this time applied to vocals for pitch shifting and textural effects, is from Paul Lansky. My favorite thing to do with this effects box is to use subtle pitch shifting to achieve an androgynous vocal sound, I got the idea for the project after listening to copious amounts of Fever Ray this past winter, you can hear how she pitch shifts her voice to sound somewhat masculine at times.
PARTS LIST
(1x) Arduino Uno REV 3 Radioshack 276-128
(7x) 10K Ohm 1/4-Watt Carbon Film Resistor (2 packages) Radioshack #271-1335
(9x) 20K Ohm 1/4-Watt Carbon Film Resistor (2 packages)
(1x) 1K Ohm 1/4-Watt Carbon Film Resistor Radioshack 271-1321
(1x) 50K-Ohm Linear-Taper Potentiometer Radioshack #271-1716
(1x) 10KOhm Audio Control Potentiometer with SPST Switch Radioshack #271-215 (this will be used to control volume and turn the device on/off)
(5x) 0.25" Knurled Knob Radioshack 274-424
(2x) 9V Alkaline Battery Radioshack #23-866
(2x) Heavy-Duty 9V Snap Connectors Radioshack #270-324
(1x) PC Board with Copper Radioshack #276-147
(1x) SPST PC-Mountable Submini Toggle Switch Radioshack #275-645
(2x) Male Header Pins Jameco 103393
(3x) 8 pin socket Radioshack 276-1995
(1x) TL082 Wide Dual JFET Input Op Amp Radioshack 276-1715
(3x) 100K Ohm 1/4-Watt Carbon Film Resistor (1 package) Radioshack 271-1347
(1x) 10uF electrolytic capacitor
(1x) 47nF capacitor
(3x) 0.1uf capacitor Radioshack 55047557
(2x) 1M-Ohm Linear Taper Potentiometer Radioshack 271-211
(1x) 1MOhm logarithmic potentiometer
(1x) 2kOhm 1/4-Watt Carbon Film Resistor
(1x) male header pins Jameco 103393
(1x) 10K-Ohm Linear-Taper Potentiometer Radioshack 271-1715
(1x) DPDT Flatted Metal Lever Toggle Switch Radioshack 275-636
(2x) 1/4" stereo jack Radioshack 274-141 or Radioshack 274-312
(2x) 5mm High-Brightness White LED (1 package) Radioshack 276-017
(2x) 100 ohm 1/4W 5% Carbon Film Resistor Radioshack 271-1311
(2x) TS922IN Dual Op Amp Digikey 497-3049-5-ND (one TS924 would also work, but they are not available on digikey at the moment)
Additional Materials:
22 Gauge Wire Radioshack #278-1224
Solder Radioshack #64-013
sand paper
plywood
wood glue
hot glue
screws
Download Arduino IDE
Remove these ads by
Signing UpStep 1: Schematic
The first schematic shows the audio out circuit. This project outputs audio through an 8 bit R2R digital to analog converter through Arduino digital pins 0-7. This signal is sent through an amplifier, a low pass filter, and a volume control pot before being sent out to speakers.
The second schematic shows the mic input circuit. The line in the from the mic is sent through an amplifier and a DC offset circuit before being sent into the Arduino via analog input pin A0.
The third schematic shows how all the controls of the effects box are connected to the Arduino. There are two LED indicators in this project: one clipping indicator and one output indicator. Three pots on the device control grain size, pitch, and wet/dry mix and a switch controls the direction of sample playback (forward or reverse).









































































Visit Our Store »
Go Pro Today »




I see. Yeah I was actually quite surprised at the relatively high samplerate you managed to achieve! I though the atmega328 was way to slow/simple to handle that. Have you considered using a audio codec (external ADC and DAC) (http://uk.rs-online.com/web/c/?sra=oss&r=t&searchTerm=audio+codec&x=-608&y=-21) for both input and output? I don't think there is very much point in increasing the fidelity after the processing when the audio is compressed to 8-bit fidelity when 'entering' the Arduino.
This could also be something to look into: http://soniccrayon.blogspot.no/2012/08/anti-nautilus-or-autoglitch.html (the schematic, first image below the youtube video)
http://www.instructables.com/id/Split-rail-power-supply-from-a-single-rail-supply/
you can see in this project how there's a +V, -V, an 0V supply. Connect the 0V supply to Arduino ground.
http://www.instructables.com/id/Stereo-Audio-with-Arduino/
your dac setup should be similar, let me know if you still can't get it up and running, I can take a look at the data sheet.
I had this hooked up and was messing around with sound on my PC speakers and was wondering if this voice stream could get sent to my PC via ethernet. Say using the ethernet shield connected to the arduino being used?
http://www.arduino.cc/en/Main/ArduinoEthernetShield
so you will need keep those pins free. If you keep the clipping indicator, you will need to move it to another digital pin (like pin 9)
Check out this piece of code:
http://www.instructables.com/id/Arduino-Audio-Input/step7/Interrupt/
you should try to send your serial data via ethernet inside the interrupt routine. Hopefully the Ethernet Shield is fast enough to send data at 38.5kHz, I'm not sure.
code with clipping indicator is at the bottom of this page:
http://www.instructables.com/id/Arduino-Audio-Input/step8/Clipping-Indicator/
change all the 13's to 9's
I'm working on a project and wondering if this can also work with voice input, via an electret (specifically using this one: http://www.sparkfun.com/products/9964) ?
Thanks for your assistance!
Let me know what you make! and definitely let me know if you have questions!
I connected up the DAC as per your instructions. However, using the sketch in step 27, I don't get any sound through to my headphones (zero output). I find this odd as my serial monitor is giving me an endless stream of symbols (input from electret).
Please help, I have no idea what I could be doing wrong, may have missed something.
Oh, for now I'm just working on inputting voice, through a mic and out through headphones, manipulating it with arduino. This seems pointless at the moment but it will be implemented into a larger project with arduino at it's core. Will keep you updated as I go along.
Thanks again for your help :)
Thanks for the super clear images and directions.
not sure you have the unit sitting around that you could just set it up and go about your business there in the lab/office.
thanks again for the great work.
amanda
It says "time was not declared in this scope" in the following part.
void checkWetDry(){
PORTB &= 239;//set pin 12 low
time = 0;
while(digitalRead(12)){
wetDryPot = time;//from 0 to ~185
Can someone please help?
I have used the same values on the componentsa as you. But i am using electrolytic caps for the RC circuitry.. Maybe that doesn't work.
forward = newForward;//update direction
scale = newScale;//update scale
grain = newGrain;//update grain
is the output working now? it should just following the incoming signal.
try changing int scale = 10
does that give you half frequency playback?
int scale = 10 does not change anything.
The caps are .1µF