Arduino MIDI Footswitch

Hi Everyone,
Here’s something I put together this weekend with an Arduino. It’s a footswitch box that simply sends part changes to the Beat Buddy. If you have a song with lots of parts and you want to transition to them with ease, this is the footswitch for you.

I created this for jamming with a multi-part slayer-inspired BeatBuddy song I made (find it here:

Download the Arduino sketch here:

Here’s a breadboard mock-up of it with 1 button :

Here’s my ugly floor switch box (buttons are temporary whilst I wait for momentary footswitches to arrive)…


You can add as many buttons as you like (unitl you run out of digital I/O pins).

Here’s a demo:


Hi. Cool idea! I like it and i want to do my own but would you share the scheme?
Kind regards,

Schematics ain’t my thing, but I think it’s like this…

Just repeat the buttons on D3,D4 etc…

Refer to other schematics on Arduino midi connection as I may have got the pins wrong in this diagram

Edit: I replaced the schematic with a corrected version. Also, see here:

1 Like

Many thanks! I will try to do my own during xmas break.
Kind regards,

looks great . .wanting to do similar . . in looking at sketch I see you are cc 113 . is this just an example for a transition or are you always transitioning on each button in your video?
Honestly I wasn’t thinking of one loop, but one chunk for each button if that makes sense. Thank you so much for the post and sketch. Share as much as you’d like :slight_smile:

To improve the use of footswitch I recommend to use “OneButton-Library” (

“This Arduino libary is improving the usage of a single button for input. It shows how to use an digital input pin with a single pushbutton attached for detecting some of the typical button press events like single clicks, double clicks and long-time pressing. This enables you to reuse the same button for multiple functions and lowers the hardware invests.”

Yes, it’s all transitions so you can jump from part to part in a song.
Theres much better ways to do the code rather than in the loop e.g. using interrupts. I just threw this together in a few mins. I spent more effort soldering and cutting the case.

There’s always better ways.

Looking at gathering pieces to do similar . .i dont think the buttons for BB functions will be an issue and I am using LED and LCD to signify what I am on . . working on a head unit for song display and selection but haven’t got that figured out . .I would like to create a text file using line, or CSV, or JSON or anything to read song tile and program change # from a text file on an SD . .reading the file contents not an issue . but making it usable has been a challenge I havent gotten my head around. The file contents simply like:

Song 1, 119
Song 2, 76
Song 3, 45

The unit would rotary encode to select a song on the text file, then pressing the encoder would send the associated program change and display the song title on an LCD. Most examples I have seen use a hard coded menu or simply read the file contents line by line. Hopefully I’ll get it there. The goal is to rack mount the BB and keep it wired and out of the way without messing with it. Text file on SD would allow the songlist to be edited and simply saved to card.

Love your project and good to see things like this

this is a cool project… I might go this route if I can find time to tinker. thanks for sharing!

Could you point out a simple code snippet of how to read two buttons with interrupts when you get a chance?

Should I use the OneButton library listed above?

Thanks for finally getting me off my butt to build one of these.

I’ve also made an Arduino MIDI controller with 9 buttons. I’m using it slightly different than you are, I’m not actually controlling BeatBuddy with it, but QuantiLoop. The hardware is essentially the same as yours, but with different output in MIDI commands.

Since I’m using a (slightly) different approach, I thought that maybe someone would find it useful so I post my code here also. I think it’s rather easy to modify the code to output whatever MIDI commands, so you can adapt the script for using with BB.

Basically, this script sends on/off messages upon pressing momentary switches. (920 Bytes)

any ideas of a rough cost? and I guess it would still work the same in an “in-line” module?

I did it with raspberry… and i’ve added a looper… so i had a midi beatbuddy controller + looper synched.