You are here

Cheap DIY Midi Controller

Login to Post to Forums

You must be logged in to the Eventide website in order to post to our forums. If you do not have an account, you will need to create one. You may also reset your password.

10 posts / 0 new
Last post
camn
Joined: Sep 19 2016
Posts: 425

Cheap DIY Midi Controller

camn
January 08, 2020 - 02:17 pm

Hey does anyone want to DIY a cheap midi controller?

Here it is.

It is an array of footswitches (up to 11?) that can all send a PC or CC message. I have it set up so pins 2-9 send PC messages 2-9, and pins 10-12 send CC toggles on #16, 17, and 18.

I would set this up with 1-7 switches calling presets (or tuner or Bypass) using the PC pins, along with a CC button for the hotswitch or some other CC value you might like.

PARTS NEEDED:
(1) An enclosure.  $5-10
(some) footswitches, momentary, NO $3/each
(1)An Arduino NANO clone – $4.00
(1) a power jack. – $1
(1) midi connector (or you could scavenge a wire and direct-wire it) ($2.00)
(1) 220Ohm 1/4watt resistor – $0.25
(1) midi cable

TOOLS NEEDED:
A Soldering Iron
A drill
A few hours time.

I wont go through the construction too detailed.. I dint actually build one of these. I just breadboarded it.
But, you drill out the enclosure for your switches, your power jack and your MIDI jack.

Then wire it like so:

PC Firing Footswitches
Pins 2-9 on one side, Ground on the other

CC Firing Switches
Pins 10-12 on one side, ground on the other

Ardruino TO MIDI
TX to 220Ohm Resistor to MIDI pin 4
Ground to PIN 3
5V OUtput from Ardruino to Pin 5

Power Supply
Postive to VIN on Arduino
Ground to Ground

Here is the code:

//midi.controller for eventide H9
//by Cameron Newell @the.nw.enterprise, http://thenorthwestenterprise.com/
//Library Source https://github.com/tttapa/Control-Surface
//Built for Ardruino NANO

#include

// Instantiate a MIDI interface
//USBDebugMIDI_Interface usbmidi(115200); // for serial monitor in ide
HardwareSerialMIDI_Interface serialmidi = {Serial, MIDI_BAUD}; //for normal operation

/* Instantiate PCButtons that read the inputs from a push button and sends out
a MIDI Program Change message when they are pressed.
Ex: pcBtn = {**PHYSICALPIN**, {MIDI_PC::**NAMEHERE**, CHANNEL_#},};
Must use PC name, reference here https://tttapa.github.io/Control-Surface-doc/Doxygen/da/da6/namespaceMID...
My setup matches PC to PIN Number
*/
PCButton pcBtn2 = {2, {MIDI_PC::Electric_Grand_Piano, CHANNEL_1},};
PCButton pcBtn3 = {3, {MIDI_PC::HonkyTonk_Piano, CHANNEL_1},};
PCButton pcBtn4 = {4, {MIDI_PC::Electric_Piano_1, CHANNEL_1},};
PCButton pcBtn5 = {5, {MIDI_PC::Electric_Piano_2, CHANNEL_1},};
PCButton pcBtn6 = {6, {MIDI_PC::Harpsichord, CHANNEL_1},};
PCButton pcBtn7 = {7, {MIDI_PC::Clavi, CHANNEL_1},};
PCButton pcBtn8 = {8, {MIDI_PC::Celesta, CHANNEL_1},};
PCButton pcBtn9 = {9, {MIDI_PC::Glockenspiel, CHANNEL_1},};

/*Hotswitch or other cc function
Will fire 127 on press and 0 on release. Use a momentary switch, like the others.
Assicn CC number from here:
https://tttapa.github.io/Control-Surface-doc/Doxygen/d4/dbe/namespaceMID...
https://www.midi.org/specifications-old/item/table-3-control-change-mess...
Default is cc#16, 17 and 18
*/
CCButton button10 = {10, {MIDI_CC::General_Purpose_Controller_1, CHANNEL_1},};
CCButton button11 = {11, {MIDI_CC::General_Purpose_Controller_2, CHANNEL_1},};
CCButton button12 = {12, {MIDI_CC::General_Purpose_Controller_3, CHANNEL_1},};

void setup() {
Control_Surface.begin(); // Initialize Control Surface
}

void loop() {
Control_Surface.loop(); // Update the Control Surface
}

brock's picture
brock
Joined: Jan 3 2010
Posts: 962
brock
January 09, 2020 - 09:17 am

And that, my friends, is what you call a great tutorial.  Clear, concise, complete.

camn
Joined: Sep 19 2016
Posts: 425
camn
January 09, 2020 - 09:58 am

I mean, I wish there were more pictures. But this is the only one I took:

 

camn
Joined: Sep 19 2016
Posts: 425
camn
February 02, 2020 - 10:56 am

So, I got around to actually making one if these. It was EASY. Anyone can do it... So if you want to learn to solder and get a specific midi controller... This is your joint. When I am back at a computer I will get some pictures up.

camn
Joined: Sep 19 2016
Posts: 425
camn
April 20, 2020 - 01:35 pm

Hey people.

I just built a pretty clean MIDI controller cuz I was bored at home. Here is a detailed writeup with many images.

http://thenorthwestenterprise.com/2020/04/21/another-h9-controller/

YOU GUYS SHOULD BUILD YOUR OWN CONTROLLERS ITS AWESOME

Attachment
camn
Joined: Sep 19 2016
Posts: 425
camn
June 11, 2020 - 02:21 pm

Wow that picture takes up everything

camn
Joined: Sep 19 2016
Posts: 425
camn
June 16, 2020 - 07:37 pm

Hey people I have made a bunch of these now, and polished up my process a little. Here is a more current How-To.

 

http://thenorthwestenterprise.com/2020/06/12/a-midi-controller-for-the-eventide-h9-smoothest-yet/

alamondm
Joined: Sep 25 2019
Posts: 8
alamondm
July 22, 2020 - 02:19 pm

I'm wanting to give this a shot in building. I have a arduino pro mini. Do I need to change anything in the code. I'm pretty new to the arduino. I have managed to build a switch for my hx stomp using one. It was trial and error but at the end of the day I got it working. Thanks for sharing with everyone.

camn
Joined: Sep 19 2016
Posts: 425
camn
July 22, 2020 - 03:47 pm

It should work without much change in a pro mini!

There is one problem with this code...
The #include line stripped out the library. You need to #include the control surface library, and that line should look like this

#include Control_Surface.h

Only with a less than/greater than around the library. These forums strip it out :(

On my blog I have cleaner code examples
http://thenorthwestenterprise.com/category/guitars/

camn
Joined: Sep 19 2016
Posts: 425
camn
August 06, 2020 - 04:56 pm

ok people. cleanest codeset yet. 

Incluses a spot for an expression pedal (or multiples) as well as a VOLUME BOOST with an LED toggling it's state. This might break with a Preset switch, but will reset if you hit it a couple times.

Lets see if I can get it to paste correctly. If not, download here:

http://thenorthwestenterprise.com/files/Expanded_Published.ino

 

//midi.controller for eventide H9

//by Cameron Newell @the.nw.enterprise, http://thenorthwestenterprise.com/

//Library Source https://github.com/tttapa/Control-Surface

//Built for Ardruino NANO EVERY

 

#include <Control_Surface.h> // Include the library 

 

// Instantiate a MIDI interface

USBDebugMIDI_Interface usbmidi(115200); // uncomment this for serial monitor in ide

//HardwareSerialMIDI_Interface serialmidi = {Serial1, MIDI_BAUD}; //uncomment this for 5-pin operation- this sends on TX **may need to rename Serial1 vs Serial

//USBMIDI_Interface midi; // uncomment for native MIDI over USB

//HairlessMIDI_Interface hair (); // uncomment this for Hairless

 

/* Instantiate PCButtons that read the inputs from a push button and sends out a MIDI Program Change message when they are pressed.

Ex: =   {**PHYSICALPIN**, {**PCHEXVALUE**, CHANNEL_#},}; 

HEX is fine http://www.midisolutions.com/MIDI%20Solutions%20MIDI%20Delay.pdf

This setup matches PC to PIN Number

*/

PCButton pcBtn2 = {2, {0x02, CHANNEL_1},};  //PC#2

PCButton pcBtn3 = {3, {0x03, CHANNEL_1},};  //PC#3

PCButton pcBtn4 = {4, {0x04, CHANNEL_1},};  //PC#4

PCButton pcBtn5 = {5, {0x05, CHANNEL_1},};  //PC#5

PCButton pcBtn6 = {6, {0x06, CHANNEL_1},};  //PC#6

PCButton pcBtn7 = {7, {0x07, CHANNEL_1},};  //PC#7

 

/*Hotswitch or other cc function will fire 127 on press and 0 on release by default. This is overridable. Use a momentary switch, like the others.

Assicn CC number from here, precede HEX with 0x

https://www.midi.org/specifications-old/item/table-3-control-change-mess...

Ex: = {PHYSICALPIN, {**CCHEXVAL**, CHANNEL_#},{ VALUEWHNPUSHED, VALUEWHENRELEASED }};

*/

CCButton button08 = {8,  {0x10, CHANNEL_1},};  // CC#16

CCButton button09 = {9,  {0x11, CHANNEL_1},};  // CC#17

CCButton button10 = {10, {0x12, CHANNEL_1},};  // CC#18

CCButton button11 = {11, {0x13, CHANNEL_1},};  // CC#19

 

/* Instantiate a latched push button that sends MIDI CC messages for a BOOST function

This still uses a momentary physical switch. Assign to Volume in H9 control

Default values overriden. Adjust to boost strength preference

 */

CCButtonLatched boost = {12, {0x07, CHANNEL_1},{ 127, 80 }};  // CC#7 - VOLUME BOOST

const pin_t BoostLed= {13};  // The LED to display the state of the boost button.

 

/* Instantiate an analog input for an Expression pedal

This ia an analog POT with 5v, Ground and Signal. **may jitter**

 */

CCPotentiometer potentiometer = {A0, {0x0B, CHANNEL_1},}; // CC#11, pot wired to pin A0

 

void setup() {

Control_Surface.begin(); // Initialize main Control Surface code

pinMode(13, OUTPUT);  // assign Led pin as output pin

}

 

void loop() {

Control_Surface.loop(); // Update the main Control Surface

digitalWrite(BoostLed, boost.getState() ? HIGH : LOW); // Update the LED state to reflect the toggled switch state. Match name of led to name of button

}