All Projects → Hecsall → arduino-midi-footswitch

Hecsall / arduino-midi-footswitch

Licence: MIT license
USB MIDI Pedal built with Arduino

Programming Languages

C++
36643 projects - #6 most used programming language
c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to arduino-midi-footswitch

kikpad
KiKPad : the Midiplus SmartPad reinvented !
Stars: ✭ 31 (+29.17%)
Mutual labels:  usb, midi
Node Escpos
🖨️ ESC/POS Printer driver for node
Stars: ✭ 752 (+3033.33%)
Mutual labels:  usb, hardware
ws-ldn-12
ARM / STM32F7 DIY synth workshop
Stars: ✭ 62 (+158.33%)
Mutual labels:  usb, midi
Unimidi
Realtime MIDI IO for Ruby
Stars: ✭ 229 (+854.17%)
Mutual labels:  hardware, midi
Glasgow
Scots Army Knife for electronics
Stars: ✭ 1,374 (+5625%)
Mutual labels:  usb, hardware
Raspberry-MIDI-Controller
A python script that sends MIDI signals from the Raspberry (client) to a Computer (host)
Stars: ✭ 44 (+83.33%)
Mutual labels:  usb, midi
Node Elgato Stream Deck
A Node.js library for interfacing with the Elgato Stream Deck.
Stars: ✭ 359 (+1395.83%)
Mutual labels:  usb, hardware
midi-eye
Ruby MIDI input event listener
Stars: ✭ 24 (+0%)
Mutual labels:  hardware, midi
Usbserial
Usb serial controller for Android
Stars: ✭ 1,301 (+5320.83%)
Mutual labels:  usb, hardware
Lsusb
Most popular USB devices and lsusb reports
Stars: ✭ 19 (-20.83%)
Mutual labels:  usb, hardware
MinimumViableSynth
A virtual analog synthesizer with lots of knobs and buttons.
Stars: ✭ 22 (-8.33%)
Mutual labels:  hardware, midi
Tinyusb
An open source cross-platform USB stack for embedded system
Stars: ✭ 2,257 (+9304.17%)
Mutual labels:  usb, midi
midi-grid
DIY midi controller project
Stars: ✭ 60 (+150%)
Mutual labels:  hardware, midi
arduino
required (and optional) source files for the Arduino development environment, specifically the hardware/arduino sub-directory, to support xmega processors
Stars: ✭ 18 (-25%)
Mutual labels:  usb, hardware
libDaisy
Hardware Library for the Daisy Audio Platform
Stars: ✭ 164 (+583.33%)
Mutual labels:  hardware, midi
azalea
main board for the GreatFET project, also known as GreatFET One
Stars: ✭ 52 (+116.67%)
Mutual labels:  usb, hardware
Audioxtreamer
ASIO driver, Usb Driver, FX2LP Firmware, VHDL Fpga, Schematics & PCB Layout for the AudioXtreamer, a USB 2.0 32ch Audio/Midi interface for retrofitting into digital mixers/interfaces.
Stars: ✭ 22 (-8.33%)
Mutual labels:  usb, midi
Pyusb
USB access for Python
Stars: ✭ 1,377 (+5637.5%)
Mutual labels:  usb, hardware
Usb Midi Driver
USB MIDI Driver for Android 3.1 or later
Stars: ✭ 244 (+916.67%)
Mutual labels:  usb, midi
Github Tutorial
A very basic and flawed piece of code to show how Github GUI works.
Stars: ✭ 72 (+200%)
Mutual labels:  sparkfun

Arduino MIDI Footswitch

USB MIDI Pedal built with Arduino.

Disclaimer:
Please note, I'm not a C developer, so if the code looks ugly/poorly optimized you know why.
Everything I made was possible thanks to many info on the web, documentation and trial and error.
I'm not planning to actively support this project, I just thought it could be useful to have a small guide on how I made this, since I didn't find anything really straightforward at that point of time.
Hope this could come in handy for someone.

Update November 2019:
I've refactored the code to add a new "settings layer", read the Usage section for more info.

Update December 2021:
Changed pin numbers, also added a panel mount USB. Apparently, the Pro Micro USB is quite fragile and mine came off, so I bought another but this time I added a USB panel connector to relieve the stress off the Pro Micro plug. I highly suggest to do so.

Sections:

  1. Materials
  2. Hardware setup
  3. Software setup
  4. Rename the device
  5. Usage

Materials:

Hardware setup:

Going straight to the point, this footswitch will have:

  • 5 push buttons
  • 5 leds (one for each button), each one with a 10 KΩ 1/2W resistor
  • 1 Switch on the back, to select 3 different button "Layers" (like what the "Shift" key on your PC keyboard does, more or less)

Here is how I wired everything up on my SparkFun Pro Micro (click to open the larger image), if you use something different just remember to adjust pin numbers in the code later. (Black is GND, all the other colors are Data pins)

Arduino MIDI Footswitch Wiring

First I soldered everything in place, I used a small breadboard and some male plugs just to make everything cleaner and detachable, but you can solder directly on the SparkFun if you want to.

Soldered SparkFun

Then I put everything in an Aluminium Box with some holes for Buttons, LEDs, the switch, and the USB port.

Aluminium Box

Be sure to mask the bottom of the box (if made with metal) to avoid potential shorts, I used some electrical tape.

Aluminium Box

Connect some wires, put the SparkFun into the enclosure, and you are done with the hardware part!

Wires Wires Wires Aluminium Box with buttons

Software setup:

For the software part I'm assuming you already have Arduino IDE installed (mine is version 1.8.19).
In the Arduino IDE go to Sketch > Include Library > Manage Libraries.
Here search for the MIDIUSB library from Arduino, and install the latest version.

Only if you are using a SparkFun Pro Micro as I do
you will have to install the board in your Arduino IDE, to do so, follow this link and follow the instructions under "Installing the Arduino Addon" https://learn.sparkfun.com/tutorials/pro-micro--fio-v3-hookup-guide/installing-windows#windows_boardaddon

Ok, now we are ready to upload your code, finally.
Open the variables.h file, and if you made changes on pin wiring, be sure to edit the button_pins, led_pins or switch_pins variables according to your wiring.
Plug the USB cable from your Arduino/SparkFun to your PC, under Tools select the proper board and, if needed, select the proper CPU (SparkFun Pro Micro comes in 2 versions, 8MHz and 16Mhz, flashing the wrong one will cause the board to "soft brick", and you will need to reset it manually, learned this the hard way).
Now select the proper port and we can upload the code!

If everything is correct, it should be working. When you push a button the relative led should light up. To test the MIDI messages I used a lightweight free software called MIDI Tools, or you can directly use your DAW.

Arduino Footswitch

Rename the device:

This is an optional step. Normally, when you plug your footswitch, it will appear as "SparkFun Pro Micro" (or the name of the board you are using), so I decided to rename it. It's a very simple and fast step.

Follow the instructions created by nebhead at this link: https://gist.github.com/nebhead/c92da8f1a8b476f7c36c032a0ac2592a

I'll leave my own board file inside the other/ folder in this repo as an example.
In my case I named my folder footswitch and the device name is MIDI Footswitch.

After doing everything, restart your Arduino IDE and under Tools > Boards you should find a new "subcategory" with your newly created board inside.

Usage:

The MIDI footswitch changes his operational mode based on which position the rear switch is on.
So you have 2 "layers" of MIDI commands you can send, 5 on one layer and 5 on the other.
The first layer (switch up) have 5 static commands that all act as push buttons.
The second layer have 5 commands which behaviour can be customized using the third layer.
The third layer, is only a "settings" layer, pressing a button on this layer will turn on or off it's LED, changing the button behaviour.
LED OFF = the button acts as push button
LED ON = the button acts as Switch button

Useful links:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].