Creating a midi expander from an Arduino with individual guitar piezo elements.

Now, I'm new to the Arduino world. A friend of mine just recently introduced me to this brilliant device. I have a few ideas floating around that I know are possible, it's just a matter if finding the way to do it. I have a decent background in electrical components. I build my own guitar effects pedals and amplifiers. I also have a smidge of a background in programming. I took a class that involved writing C++ and I didn't do terrible in it. The friend that introduced me to Arduino is in his third year of Electrical Engineering classes, and offered to help out.

The idea: I have individual piezos for each string that I installed into my guitar. They work beautifully for producing audio. They don't pick up any interference from the strings alongside, like I planned. They are isolated in the saddles right below the strings. Anyway, I have a signal and ground wire coming from each piezo. I want to know if one arduino board can take this analog audio signal and convert it to a separate midi signal from each string and send out these midi signals to an interface that I would connect to my computer where I have thousands of midi patches.

I haven't purchased a board yet. I was thinking about an Uno, but don't know if the 8 bit microprocessor would be enough to control this project. I'm not sure if anyone here has used any of the Diligent 32bit platforms, but they look decent and are supposed to just be an amped up version of the Arduino. I have also seen all the shields available, and I'm thinking the midi shield made by Sparkfun is most likely a must.

Basically, I have no clue where to start. I really am intrigued by the possibilities, I hope someone can offer some guidance. I looked for something similar, but nothing on the forums here really covered what I was looking for. Any help is greatly appreciated, and I look forward to getting to know the community here.

Have a great day!

  1. Please don't crosspost -,122640.0.html

  2. There is only one ADC on an Arduino, and the analogue inputs are connected to it, through a multiplexor, when requested. You would have to continually switch between inputs and take a reading (or two and discard the first, for best results), and then process. I don't think that will work too well for a guitar to midi converter.

I thought the two posts looked very similar, so I thought they'd be happy together.


My apologies. I didn't know if it fit better into Project Guidance or Audio, so I just tried both.

And basically, what you're saying is the only way this would work smoothly is with six Arduinos. One for each signal, correct? That might not be feasible, but polyphony is a must. If I was able to get ahold of six Arduinos, is there a way to merge each of them into one midi signal after it is processed? Sparkfun has a midi shield with a thru port as well.

According To Pete, 3 videos that you should watch... According to Pete - DIY Guitar Pickups - News - SparkFun Electronics

Thanks for sharing that. He's doing some interesting things with the piezos. I already have all of the piezo work completed. I have six installed, each to a specific string, isolated from interference. I want to take the analog signals (from each piezo lead) and convert them to midi signals with the Arduino. That's the point I'm stuck at right now. I don't know if that's even possible. If it is, I don't know where to begin. It should be downhill after that. I can work on making a midi shield to input into my computer to Ableton/Max. I just need some help getting started.

I am also interested in something along these lines. I am not sure if it is possible, but I may give it a go to see how far I get. I'm going to start by getting some GraphTech GHOST saddles for my Strat at some point in the next few months.

This post discusses the same thing.,10982.0.html

These are my thoughts:

The first problem seems to be that the Arduino actually only has one ADC, and uses an internal multiplexer to switch between its analogue inputs. It can only sample one at a time. I guess that this may not be fast enough for our purpose.

I wonder if there is a cheap-ish chip that has eight separate ADCs. That might be more suitable. The first couple that I have found seem to have the same problem -- one actual ADC, multiplexing between the inputs. Maybe the answer is to use six separate ADCs external to the Arduino.

Next, comes the properly difficult part. Working out the mathematics and algorithms that will convert the pitch voltages to note data. I suspect that the microcontroller on an Arduino might not be fast enough, or might not have enough memory for this. Still, I'm interested enough to give it a go. It may be that one of the upgraded Arduino models might be more suitable.

A Fast Fourier Transform should pick out the frequencies of the main harmonics in the note being played. The fundamental frequency (which is what we are interested in) should be the biggest one.

I gather that (to avoid latency problems when picking up the lowest notes) some of the commercial MIDI guitar arrangements analyse the attack of the waveform envelope instead in some way.