Go Down

Topic: Making a MIDI controller out of an organ pedal board (Read 913 times) previous topic - next topic



I want to make wooden organ pedals (27ish keys) send out a MIDI signal to the MIDI IN jack (5 pin DIN) of a digital piano, so that the organ pedals pressed trigger the sound bank of the digital piano at the wanted pitch (optionally also send out a MIDI to USB signal). Ideally it would register the velocity of key-pressing. However, only if this ability could be turned off, otherwise registering velocity is not important. It should be polyphonal, being able to play multiple notes at the same time (the digital piano has a 256 note polyphony chip). The plan is to attach magnets and reed switches to the organ pedal board, so that the switches are turned off when a pedal is pressed and turned on when it isn't (or vice versa). In the pressed down state it would send a note on MIDI message and a note off MIDI message when it returns to its resting position. I know that this doesn't include the velocity, which I only recently considered adding. Likely, this would require a second set of reed switches.
As I am new to making things like this, I have trouble to figure out how turn the reed switch signals into MIDI messages. From what I have seen, it seems possible with an Arduino board. Https://www.arduino.cc/en/Tutorial/MidiDevice seems to cover it sort of, but it looks like I would run out of connections on the board with 20-30 keys. I do not know if polyphony would be possible with that setup either. Also, velocity and the ability to turn this on or off are not included.
Perhaps it is better to not make it as complex (if it is?), but maybe it is doable for a beginner. I am quite new to programming (I have some experience with the basics), so nothing too complicated there would be best, I think. Although I am definitely prepared to learn more, I don't want to take too big of a step. Registering velocity is least important to me, so I am willing to sacrifice it to make things easier. Perhaps it is something for a later project.
I'm not expecting a complete description on how to do this with an Arduino board, but rather would appreciate hearing your opinion on if it could be done with an Arduino board (and which might be best), or if maybe you would suggest another method. As the amount of information to be found on the Arduino website is somewhat overwhelming, maybe you have some tips where to look to further the design? Any advice on how to tackle such a project is welcome as well. Thanks for reading this!


When I Googled "Arduino MIDI pedals" I found a number of projects that seem very similar to what you want to do. So it's certainly possible. If you're definitely going to want velocity then you need to design that in from the start because it needs specific switching associated with each note. Without velocity a simple on/off switch will do.



I've never done anything with MIDI...

Like any project, break it into parts and take it one step at a time.   For example, you can send MIDI commands under software pure control (without the pedal board or any input).  Similarly, you can read the pedals/switches and send the information to the serial monitor to make sure you're reading the switches correctly.

There is a MIDI USB library, but you'll have to check to make sure it works as a MIDI controller.  And/or you might need a USB shield (add-on board) since the normal USB port is a USB device (not a USB controller).  Or, maybe someone will chime-in with the answer.

The "big challenge" with velocity is the electro-mechanical part (probably a pot for each pedal).   

And, I don't think there's an Arduino with enough analog inputs.  (The Uno has 6 analog inputs and the Mega has 16.)     You can "expand" the number of analog inputs with an analog multiplexer chip but that's more circuitry and a bit more programming.   (The Arduino's ATmega chip actually has only one internal analog-to-digital converter and built-in multiplexer for the multiple analog input pins.)

And you'll need to use the Mega just to get enough digital I/O pins, unless you use a matrix or multiplexing.

It should be polyphonal, being able to play multiple notes at the same time (the digital piano has a 256 note polyphony chip).
That should be no problem...  Just different/more MIDI commands.    As far as I know there are no "chord" commands...   You have to send the notes one after the other (however many milliseconds that takes).


That should be no problem...  Just different/more MIDI commands.    As far as I know there are no "chord" commands...   You have to send the notes one after the other (however many milliseconds that takes).
Yes, polyphony depends on the capabilities of the piano *receiving* the MIDI messages.

I did something like this a while ago, although I didn't need to handle as many pedals:


Personally, I wouldn't bother with a MIDI library, BTW. That might be useful if you were receiving MIDI, but I think it's simpler just to construct the three byte sequence for note on/off and send them to the serial port with write().


Thank you for your responses. This gives me a good starting point to work from, I will have some reading up to do. It seems using this many pedals is quite uncommon.


It's not that strange from the Arduino/MIDI point of view because electronically you can treat it as a music keyboard and they often have 49, 61 or up to 88 keys. It's only the mechanical arrangements that are different because the "keys" are rather large and on the floor.



Have a look at my project here.

You can replace the contact switches with your own if you want. Just keep adding extra multiplexer chips for more inputs. You can also download the code from that page.

Go Up