— EDIT: pics of the final controller now with MIDI in, expression pedal input (converts it to MIDI CC), a display and buttons to change presets on the fly!
Previous iteration:
— Back to original post:
Hi everyone!
I loved my Digitakt since we first met, but I quickly missed the ability to play piano and guitar to my beats. I recently got an OT, and the first thing I tried to do was to learn how to use those Pickup machines. In order to free up my hands and loop with my feet, I came up with a quick arduino sketch to solve the problem without having to buy a huge footswitch board. This is my first ever arduino project (besides the teaching examples), so if I can do it, anybody can. Some things stated in this post might sound obvious, but I am trying to write clearly for people with little to no experience with electronics, as has been my case putting together this circuit.
Disclaimer: although I have tried to follow the MIDI association standard for MIDI out reasonably (just missing the double hex inverter/buffer after TX and the ferrite beads, both are optional in the specs), with homemade electronics things could go wrong. I take no responsibility for anything that could happen to any equipment from the use of this circuit. That said, I have tried it with a Korg Monologue, a Focusrite 2i4 into Ableton, and the OT MKII, and it works perfectly fine in those 3 scenarios.
Here is a scheme of the circuit, original picture from https://www.arduino.cc/en/Tutorial/Midi
I have used the wonderful MIDI library from Francois Best to deal with the midi messages, which are sent on channel 14, same as the OT autochannel in my case. Instructions to install the library can be found in https://playground.arduino.cc/Main/MIDILibrary
-
When SW1 (leftSwitch in the script) is pressed, digital input 8 registers 5V voltage, and the board sends a MIDI NoteOn 61 message (C#, registered by the OT as ‘INAB rec’). I have set 500 ms of wait time until the next message can be sent for debouncing, or making sure you don’t send two notes after each other if you press the switch for too long.
-
SW2 (rightSwitch) does the same with digital input 10, and sends MIDI NoteOn 62 (D, registered by the OT as ‘INCD rec’).
Here is the (very simple and short) script:
octatrack_midi.ino (687 Bytes)
And pictures of the prototype board:
Here is a picture of the board next to the monologue, you can see the oscilloscope on while I press the switch. It works!
Hope this is helpful to some of you! I decided to post my experience with it after seeing some interest in DIY footswitches around here recently. I will post some pictures of the final enclosure once the momentary footswitches I ordered arrive!
EDIT: resized images for visibility.
EDIT 29/10/2018 after finishing the project:
Checking the code from @qlamerand as well as this link helped a lot with coding the behavior of the switches: http://www.gammon.com.au/switches
In case anybody wants the final sketch, here it is. Remember to modify it to suit your setup! Also, I do realize a lot of this can be accomplished with loops, but I explicitly coded every single switch for it to be more readable to anyone without experience in C.
octatrack_midi_4.ino (1.6 KB)