Tuesday, October 27, 2009

Arduino-based Low Bit Stand Alone Digital Delay Line

I made a very basic standalone digital delay line using Arduino.

Hardware
The hardware is very, very simple. The audio input is analog pin 5. The output is PORTD, with the following schematic (bits 0 - 7 refer to Arduino digital pins 0 - 7). This is a resistor ladder.

Arduino Code

byte array[1900]; // create an array

void setup() {
DDRD = 0xff; // set PORTD to all outputs - digital pins 0 - 7
analogReference(INTERNAL); // change the analog input reference voltage level
}

void loop() {
for(int i = 0; i < 1900; i ++) { // set up a loop
PORTD = array[i]; // play back sample
array[i] = analogRead(5) >> 1; // record sample
}
}


Video

0 comments: