Midi foot controllers are a game-changing piece of equipment for guitarists and musicians alike.

Maybe you don’t want to spend $150+ on a foot controller.

Maybe you haven’t found a foot controller that does everything you desire.

Wouldn’t it be cool to build your own?

In this article, we’ll be building a DIY midi foot controller that was inspired by an article on the very cool and helpful site, ‘Randumb Page’. The article there was good, but I wanted to make it even more clear and easy-to-follow.

Let me know what you think of this build in the comment section below!

Make sure to share this article on social media if find it helpful, awesome, or both!

Recommended course: The DIY MIDI Controller Course. If you want to become a master at making your own custom controller, this is the book for you! Packed with 11 action-packed chapters that include downloadable images, schematics, sample code, and libraries. Even if you’re a hobby musician that doesn’t know anything about circuitry or programming, this book breaks it down to an understandable sense.

An Overview Of What We’ll Be Making:

What we’ll be making is a very functional midi foot controller.

It is made using my favorite board of all time, the Arduino Uno.

Basically, you’ll be making a very customizable midi foot controller.

The enclosure can be made out of just about anything. I’ll leave that up to your interpretation. Also, let me know if building custom enclosures is something you’d be interested in learning more about in the comment section below.

Materials:

Arduino Uno

5 Switches

3 potentiometers (for volume and wah)

LCD to display info information such as volume level, stompbox status, and your current patch name.

3 10k resistors

1 LED

MIDI – IN , and MIDI OUT ports.

Spare wires

<– Let me save you some time! Click the orange shopping cart on the left to add all of the materials to your cart on Amazon.com.

Step 1: The Circuitry

The first step is to get everything wired-up correctly.

Refer to the super-handy diagram above. Everything is color coded to make your life a bit easier.

Is the image not big enough for you to read? Click here for a larger version.

Step 2: Uploading the Code

Connect your Arduino Uno to your computer via usb as normal.

Open up the Arduino IDE software. (If you don’t have it, you can download it here)

Copy & paste the code from down below into your software. Compile the code and you shouldn’t get any errors.

Project Code

#include <LiquidCrystal.h> LiquidCrystal lcd(7, 6, 5, 4, 3, 2); #define LED 13 // LED pin on Arduino board #define switch1 8 // 1st Switch #define switch2 9 // 2nd Switch #define MIDI_COMMAND_CONTROL_CHANGE 0xB0 //Variables int switch1LastState = 0; int switch1CurrentState = 0; int switch2LastState = 0; int switch2CurrentState = 0; //Potentiometer controlls (Analog) int volumePot = A3; int volumePrev = 0; int volumeCurrent = 0; int levelPot = A4; int levelPrev = 0; int levelCurrent = 0; int wahPot = A2; int wahLevelPrev = 0; int wahLevelCurrent = 0; // the format of the message to send Via serial typedef union { struct { uint8_t command; uint8_t channel; uint8_t data2; uint8_t data3; } msg; uint8_t raw[4]; } t_midiMsg; void blinkLed(byte num) { // Basic blink function for (byte i=0;i<num;i++) { digitalWrite(LED,HIGH); delay(100); digitalWrite(LED,LOW); delay(100); } } void setup() { pinMode(LED, OUTPUT); pinMode(switch1, INPUT); pinMode(switch2, INPUT); pinMode(volumePot, INPUT); pinMode(levelPot, INPUT); pinMode(wahPot, INPUT); lcd.clear(); lcd.print("ranDumb-MIDI"); // Starting message delay(5000); Serial.begin(115200); blinkLed(3); // Setup sucess indicator } void loop() { t_midiMsg midiMsg; // MIDI message for Switch 1 switch1CurrentState = digitalRead(switch1); // reading Switch 1 switch2CurrentState = digitalRead(switch2); // reading Switch 2 // SWITCH 1 CONTROL START if (switch1CurrentState == 1){ // If Switch is true if(switch1LastState == 0){ // If Switch1 was not pressed continously midiMsg.msg.command = MIDI_COMMAND_CONTROL_CHANGE; // this sends Channel info along with Control Change message midiMsg.msg.channel = 1; // Data 1 midiMsg.msg.data2 = 1; // Data 2 midiMsg.msg.data3 = 0; lcd.clear(); lcd.print("sw1 Msg1"); /* Send MIDI Message */ Serial.write(midiMsg.raw, sizeof(midiMsg)); blinkLed(2); } } if (switch1CurrentState == 0){ // If Switch1 was false if(switch1LastState == 1){ midiMsg.msg.command = MIDI_COMMAND_CONTROL_CHANGE; // this sends Channel info along with Control Change message midiMsg.msg.channel = 1; // Data Not Channel midiMsg.msg.data2 = 1; // Velocity midiMsg.msg.data3 = 127; /* Velocity */ lcd.clear(); lcd.print("sw1 Msg2"); /* Send note on */ Serial.write(midiMsg.raw, sizeof(midiMsg)); blinkLed(2); } } switch1LastState = switch1CurrentState; // SWITCH 1 CONTROL END // SWITCH 2 CONTROL START if (switch2CurrentState == 1){ if(switch2LastState == 0){ midiMsg.msg.command = MIDI_COMMAND_CONTROL_CHANGE; midiMsg.msg.channel = 1; // Data midiMsg.msg.data2 = 2; // Velocity midiMsg.msg.data3 = 0; /* Velocity */ lcd.clear(); lcd.print("Sw2 Msg1 "); /* Send note on */ Serial.write(midiMsg.raw, sizeof(midiMsg)); blinkLed(2); } } // SWITCH 2 Second State Control if (switch2CurrentState == 0){ if(switch2LastState == 1){ midiMsg.msg.command = MIDI_COMMAND_CONTROL_CHANGE; midiMsg.msg.channel = 1; midiMsg.msg.data2 = 2; midiMsg.msg.data3 = 127; /* Velocity */ lcd.clear(); lcd.print("Sw2 Msg2 "); /* Send note on */ Serial.write(midiMsg.raw, sizeof(midiMsg)); blinkLed(2); } } switch2LastState = switch2CurrentState; // SWITCH2 CONTROL END volumeCurrent = analogRead(volumePot)/8; // levelCurrent = analogRead(levelPot)/8; wahLevelCurrent = analogRead(wahPot)/8; if(volumePrev != volumeCurrent) { midiMsg.msg.command = MIDI_COMMAND_CONTROL_CHANGE; midiMsg.msg.channel = 1; midiMsg.msg.data2 = 7; midiMsg.msg.data3 = volumeCurrent; // Velocity Serial.write(midiMsg.raw, sizeof(midiMsg)); blinkLed(2); // Printing Switch number and data MIDI data that is sent to the LCD screen lcd.clear(); lcd.setCursor(0,0); lcd.print("Volume"); lcd.setCursor(0,1); lcd.print(volumeCurrent); volumePrev = volumeCurrent; blinkLed(4); }// End Of Volume Control Loop /* // I don't have the Level control so I just Quoted out this part of the code . //Level control loop if(levelPrev != levelCurrent) { midiMsg.msg.command = MIDI_COMMAND_CONTROL_CHANGE; midiMsg.msg.channel = 1; midiMsg.msg.data2 = 0x0C; midiMsg.msg.data3 = levelCurrent; Serial.write(midiMsg.raw, sizeof(midiMsg)); blinkLed(2); // Printing Switch number and data MIDI data that is sent to the LCD screen lcd.clear(); lcd.setCursor(0,0); lcd.print("Level"); lcd.setCursor(0,1); lcd.print(levelCurrent); levelPrev = levelCurrent; blinkLed(4); }// End Of Level Control Loop */ // Wah Control Loop if(wahLevelPrev != wahLevelCurrent) { midiMsg.msg.command = MIDI_COMMAND_CONTROL_CHANGE; midiMsg.msg.channel = 1; midiMsg.msg.data2 = 0x0B; midiMsg.msg.data3 = wahLevelCurrent; /* Velocity */ /* Send note on */ Serial.write(midiMsg.raw, sizeof(midiMsg)); blinkLed(2); // Printing Switch number and data MIDI data that is sent to the LCD screen lcd.clear(); lcd.setCursor(0,0); lcd.print("Wah"); lcd.setCursor(0,1); lcd.print(wahLevelCurrent); wahLevelPrev = wahLevelCurrent; blinkLed(4); }// End Of wah Control Loop }

Step 3: The Boot-loader

In order to make the Arduino show up like a proper midi device, you will need a boot-loader.

An alternative to this would be to use serial-to-midi software. That is a bit lame and not as fun, so I’d recommend going with the boot-loader option.

First, download the corresponding USB Midi Firmware file. (aka the boot-loader) There’s even some useful sample code provided as well. This project basically takes the code and tweaks it to be more suitable for a DIY midi foot controller.

Unfortunately, it seems like the website with those firmware files went down. These days, I use Hiduino anyway. Give it a shot! If you’re confused at all with it, Hiduino is covered in-depth in my DIY MIDI Controller course.

Follow this guide from Arduino. It will walk you through everything you need to know about uploading the midi hex file to your Arduino.

Step 4: Testing Time!

If you have successfully made it to this step, congrats! The hardest part is over.

Everything should now work perfectly.

Beware of Loose Connections!

If you notice your knobs are outputting some random midi signals, it could be because of a loose or faulty connection. Arduinos tend to continually search for inputs if they aren’t connected correctly.

Final Notes:

So There you have it!

Hopefully your DIY midi foot controller is functioning perfectly.

If you have any questions, leave a comment below.