Cheap-o Looper Effect

From Wikiants

Jump to: navigation, search

Cheap-o Looper Effect

"… I’m surprised with what I’m able to do when I’m supposed to be doing homework.

Here’s my latest project, it’s less than 24 hours old =)

I’ve always wanted a looper effect, like the boss loopstation, mainly because the online demos were so neat. Being a bass player, I though it would help me practice with drum loops, but it’s just not worth the money unless you’re going to use it live. I ended up playing drum samples on my PC and playing along on the bass."

And here’s the simple arduino code:

int recPin = 4;
int playPin = 2;
 
void setup()
{
    //prepare pins for output
    pinMode(recPin,OUTPUT);
    digitalWrite(recPin,HIGH);
    pinMode(playPin,OUTPUT);
    digitalWrite(playPin,HIGH);
}
 
void loop()
{
    //wait and then record a 5 second loop
    delay(5000);
    digitalWrite(recPin,LOW); //"hold down" rec button
    delay(5000);
    digitalWrite(recPin,HIGH); //release it
    delay(30); // to pass debouncing
    while(1) {
        digitalWrite(playPin,LOW);
        delay(30);
        digitalWrite(playPin,HIGH);
        delay(4970);
 
        digitalWrite(playPin,LOW); //emulate a second click, this will stop playing the sample, and will be ready to play
        //again in the next loop iteration
        delay(30);
        digitalWrite(playPin,HIGH);
        delay(30);
    }
}

[edit] References

Personal tools