Lo-fi Arduino Guitar Pedal

 by kylemcdonald
Featured
2720361973_ca1f0aa3ab.jpg
Bit crushing, rate reducing, weird noises: DIY 10-bit effects/guitar pedal with an Arduino for lo-fi DSP.

Check out the demo video on Vimeo.
 
Remove these adsRemove these ads by Signing Up
1-40 of 92Next »
velcrofathoms says: May 8, 2013. 2:23 PM
I am trying to use your output, to modify Randolfo's design to make a effects processor for a microphone rather than an input. I am looking at your schematic and can't quite understand the notations.
If you please:
1. what does 256 x mean ( as opposed to r) ?
2. I tried to figure it out from your photo but some wires are overlapping. Looking at the photo kind of confused me, because the part that says it should be a 1K looks like a 12k in the photo.

I am only trying to work with your output.
Thanks!
arduinolover says: Dec 2, 2012. 2:39 AM
The folder I downloaded is named "Arduino_Guitar_Pedal" including five files. There is not any GlitchPedal file. May you send me the link to the Glitchpedal code? I am doing something wrong..
arduinolover says: Nov 23, 2012. 3:10 AM
Hi there,
I am about to start building this specific project but I would like to know how I am going to upload the code to my Arduino and make it run. Where can I find the GlitchPedal code and do I have to load more code (libraries) to run it? I am noobie as you understood.. Thanks a lot!!
kylemcdonald (author) in reply to arduinoloverNov 23, 2012. 4:07 AM
there are no other libraries to run, just the GlitchPedal code. but i recommend you follow this new tutorial by randy http://www.instructables.com/id/Arduino-Guitar-Pedal/
purebluearth says: Feb 21, 2012. 2:10 PM
could someone tell me why the compiler tells me that analogWrite is not defined within scope?
stvincent in reply to purebluearthMar 1, 2012. 8:09 AM
I'm a total arduino/electronics noob, but I think that some of the function libraries got migrated to a new location in some core revision to the arduino libraries.

Basically, in dsp.cpp, replace

#include "WProgram.h"

with

#include

And then make the same swap in timers.cpp with

#include "WConstants.h"


The code at least compiled for me. Of course I am still having problems with the actual build. All I'm getting is a very faint square wave buzz that modulates with knobc.

Why did I think this was going to be simple?
DJsoundestroyer says: Jan 2, 2012. 2:50 PM
hey man! this looks truly awesome. any chance of a video or mp3? also, how would keyboards/synthesizers/drum machines work through this? sweet project!
-stefan1138
kylemcdonald (author) in reply to DJsoundestroyerJan 2, 2012. 6:38 PM
check out the video on vimeo
nexekho says: Sep 16, 2011. 3:02 PM
I got the asynchronous analog read you discussed working, though not using interrupts but a standard loop. Vastly increases my sample rate. Ported the chorus/flanger to it.
code: http://pastebin.com/thP70QFj
nexekho says: Sep 15, 2011. 6:10 PM
Wrote a chorus!
Pot 1 is chorus speed. Define LINEARITY for experimental sine wave LFO using pot 2 to blend between linear or sine (it has problems) and pin 13 which has a LED on most devices will display the rate visually.
http://pastebin.com/nCNyXSsR
Works really nicely on low values, with a subtle flange on high values. Can also do many silly noises with the chorus set really fast.
Sample: http://soundcloud.com/nexekho/arduino-lo-fi-chorus
nexekho in reply to nexekhoSep 15, 2011. 6:11 PM
Site note: buffers take up quite a bit of memory, might need to go mono for a Mega 168.
nexekho in reply to nexekhoSep 15, 2011. 6:17 PM
Sounds MUCH BETTER in mono due to higher sample rate.
http://pastebin.com/2ed16VD0
http://soundcloud.com/nexekho/much-much-smoother
nexekho in reply to nexekhoSep 16, 2011. 3:44 AM
Added a depth control that changes how far it sweeps. Very useful for getting good flange effects.
Code: http://pastebin.com/cRmNHCdk
Sample: http://soundcloud.com/nexekho/flange-this
LukaR says: Sep 25, 2010. 11:05 AM
Is there a way to add an on/off switch to the circuit (like the one on the picture), making a stomp box out of this?
switch.gif
nexekho in reply to LukaRSep 15, 2011. 1:40 PM
You can make a bypass with a SPDT which will select either the Arduino output or the guitar input, but it will likely "suck tone" and as such you will need a DPDT to isolate the Arduino input as well.
Blip-Blip-Duino in reply to LukaRAug 18, 2011. 6:39 PM
Yes it would be possible, in tonepad.com you can see a wiring diagram for these switches. It would have to be a DPDT or 3PDT.
zoltzerino in reply to LukaRMar 24, 2011. 4:40 PM
Hope this helps:
http://www.muzique.com/lab/truebypass.htm
kylemcdonald (author) in reply to LukaRSep 26, 2010. 10:16 PM
I don't usually make guitar pedals so I'm not familiar with the way that switch is wired. If it actually toggles between two sources, you just need to wire the "clean" input directly to one side of the switch, and the distorted output to the other.

On the other hand, if it is a momentary switch you'll need to wire it to an interrupt pin on the Arduino and modify the code to watch for that interrupt, not applying any effects when the toggle is on.

I'm sure there are also plenty of schematics out there for making toggle boxes with these switches, in which case you would just wire your clean signal to one input and the distorted signal to the other.
nexekho says: Sep 14, 2011. 1:41 PM
Hey, I just built one of these on perfboard, made a mistake on the inputs (biasing with A7 rather than 5V, will correct in the morning) and while almost everything works (the dials work, etc.) I can't get a sound wave out. If I just take a standard flashing light example script and tell it to whack a PWM to pin 3, it outputs a very loud square wave. Using your code, nothing is output. This is my first Arduino project. I'm using a Nano but it's a Mega328P Nano which should work right?
nexekho in reply to nexekhoSep 14, 2011. 3:50 PM
I've fixed it now. It was an issue with the timer registers. Thanks for the design.

I've attached some photos of my custom build.  Small size was a priority here so I built the output filters under the Arduino itself which was a fun challenge.
ArduinoBoard.jpg
kylemcdonald (author) in reply to nexekhoSep 14, 2011. 8:47 PM
wow! awesome, and congratulations on your first arduino project. glad everything worked out. your design is super compact, it looks great :)
nexekho in reply to kylemcdonaldSep 15, 2011. 10:11 AM
Made some code changes and got it as good as it'll ever be in terms of sound cleanliness. Using 10-bit in, 16-bit out, and a prescale of 8.
Sample: http://soundcloud.com/nexekho/almost-perfect
(note: I'm using a POD as a preamp and distortion, the Arduino is just clean passthrough at the moment and then a Valvecaster post-amp before going into my PC's line in)
Code: http://pastebin.com/9zphwpvA
I'm finding that using a tone dial to roll off the highs makes a far cleaner sound.
nexekho in reply to nexekhoSep 14, 2011. 1:45 PM
(also note: I'm not being silly, I'm trying to output a 100Hz triangle wave using your code instead of passthroughing the input ;])
nexekho in reply to nexekhoSep 14, 2011. 1:43 PM
Also, the schematic describes a high-pass-filter for the output. Is that right? It feels like it should be low pass.
Or2 says: Aug 26, 2011. 8:32 PM
I'm new the the arduino scene, is Diecimila the same as Duemilanove ?
zoltzerino says: Jul 10, 2011. 1:10 PM
How crucial is the ratio between resistors R and 256R, the guy in the shop couldn't tell the difference between orange and brown so I have R = 1.5k and 256R = 190k...

Could I use my 190k and two 330R in series (R=660, 256R should equal (ish) 170R (but would be 190R)? Or is that not a close enough match?

I've checked all of my wiring and joints, guitar was on, amp was on, audio leads functional, used a chorus pedal to boost the input (you used a tuner).

Thanks in advance :-)
kylemcdonald (author) in reply to zoltzerinoJul 10, 2011. 2:12 PM
using the two 190k resistors in series against the 1.5k gives a ratio of 253 which is totally acceptable. the resistor manufacturing tolerance will probably be the bigger error. good luck!
yesiam says: Feb 4, 2011. 1:54 PM
This looks great! I was wondering if this can be used with a synth or laptop audio. And if not, if it can be modified to do so..
kylemcdonald (author) in reply to yesiamFeb 4, 2011. 2:21 PM
anything you can plug into a guitar pedal should work fine. and definitely laptop output, i primarily used my laptop for testing this while i developed it.
j03tv says: Aug 29, 2010. 8:43 PM
Weak!
cdousley says: Apr 29, 2010. 4:45 PM
does pot value matter?

kylemcdonald (author) in reply to cdousleyApr 29, 2010. 7:16 PM
No, they're just giving you a value between 0 and 5V.
missingmax says: Apr 26, 2010. 6:58 AM
I see you used ceramic and electrolytic caps. Which one works better? 
Also, what would be the polarity if you used the electrolytics in your schematic?
kylemcdonald (author) in reply to missingmaxApr 26, 2010. 9:44 AM
I didn't evaluate ceramic vs electrolytic for their "sound" really, so I can't say which one is "better". You'll have to try both out and let me know if you hear a difference!

I vaguely remember, on the outputs, the electrolytic caps facing the output. But again, you should try it both ways -- this was two years ago now and I have been writing a lot more code that making circuits since then :)
loneguitarist says: Apr 20, 2010. 4:21 PM
 Any chance you could post a picture with the other side of the perfboard circuit for the DAC? I'd like to have a go at this project but am having a little trouble with this stage.

Someone should make an audio input/output sheild for the Duemilanove with all the DAC on board for projects like this!
kylemcdonald (author) in reply to loneguitaristApr 20, 2010. 5:27 PM
Sorry, I don't have this pedal any more, I made it for a friend!

If I remember correctly, the perf board wasn't connected on the back and everything was manually soldered. So hopefully the diagrams/schematics on this page will explain anything missing from the pictures. The pictures were meant more as a layout guide for fitting the components in a smaller space.
jsd78 says: Apr 8, 2010. 9:33 PM
I was wondering what kind of preamp is necessary. I don't own a tuner that acts as a preamp (more like a filter). Is it possible to build a preamp that's not too difficult?
kylemcdonald (author) in reply to jsd78Apr 8, 2010. 10:51 PM
A preamp can be as simple as an opamp. But there are a ton of DIY guitar preamp designs, here's one of the first links that popped up on Google.
larsby says: Mar 11, 2010. 10:53 AM
Hi there,

love your work, I have one question about this though, the r1 on the in-part, what is it good for, why do you need it?
kylemcdonald (author) in reply to larsbyMar 11, 2010. 11:39 AM
Hi Larsby,

The r1 acts to "scale" the incoming signal. I generally think in terms of software rather than hardware, so you can imagine the chain on the input acting like this:

- r1 divides the signal (scales it down slightly)
- c1 centers the signal around zero (removes the DC component)
- r2 and r3 add a constant DC component back in -- shifting the signal up
1-40 of 92Next »
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!