H9 Midi Controller – DIY

Home Forums Products Stompboxes H9 Midi Controller – DIY

Tagged: , , ,

  • This topic is empty.
Viewing 1 reply thread
  • Author
    Posts
    • #112981
      dmessick
      Participant

      The DIY MIDI controller pictured below for the Eventide H9 was the result of not being able to find any MIDI controllers that had the functionality I was looking for. The H9 is very versatile with MIDI control mapping so I wanted a controller that would let me choose to send either Control Change or Program Change MIDI messages for any of the 4 switches. I had a three button auxiliary switch controller that worked great, but wanted to free up that jack on the H9 for the expression pedal. I’ll post below a wiring diagram and the code and if anyone has any questions feel free to send me a message. 

      The pedal build is relatively simple. It’s four (you can add more or less) momentary switches connected to a Teesny LC microcontroller, that outputs the signal to a 5 pin MIDI connector. 3 other components are used for the power supply to step it down from a typical 9v connector to 5v for the Teensy board. Including the box it was probably around $30 for the entire build. If you’re interested in specifics PM me and I’ll give a rundown on everything that was needed for this build as well as a copy of the code I used that you can use or modify to fit your needs.



      [​IMG]

    • #141318
      dmessick
      Participant

      Below is the code and wiring diagram I used to program a different MIDI CC message for each switch. All you have to do is upload this code to the Teensy LC microcontroller. I used this site as a reference for how to do that, it’s about as easy as updating software on your phone. Use the arduino software to install the code below on the chip via a USB cable. Then wire up the switches, MIDI jack, and power supply.

       

      The way the code works is the chip is always checking for the buttons to be pressed. When a button is pressed, it sends a MIDI message to the H9. The H9 Control app is where you tell the H9 what you want each MIDI message to do. For example, the switches programmed below send the following MIDI messages: c0, c1, c2, and c3. On the H9 control app, I’ve told the H9 I want c0 to bank down, c1 to toggle the tuner, c2 for tap tempo, and c3 for the performance switch. You can also program switches to activate specific presets, similar to the strymon “favorite” switch. These messages are sent as PC instead of CC, a simple change to the code. Most of everything I learned for this was from this page.

       

      Code:

      #include <Bounce.h> // necessary for button press noise

       

      #include <MIDI.h> //Midi library

       

       

      //Serial port 1 for MIDI connector

      #define HWSERIAL Serial1

       

      // midi channel 1 for H9

      const int channel = 1;

       

      // cc values

      int cc_off = 1;

      int cc_on = 127;

       

      // map buttons to cc and pc, define as integers

      int cc0 = 0;

      int cc1 = 1;

      int cc2 = 2;

      int cc3 = 3;

       

      //pc isn’t used in this code but can sub for cc if desired.

      int pc1 = 0;

      int pc2 = 1;

      int pc3 = 2;

       

       

      Bounce button1 = Bounce(2, 10);

      Bounce button2 = Bounce(5, 10);

      Bounce button3 = Bounce(6, 10);

      Bounce button4 = Bounce(8, 10);

       

       

       

      void setup()

      {

       

      //buttons are connected to pins 2, 5, 6 and 8 on Teensy

      pinMode(2, INPUT_PULLUP);

      pinMode(5, INPUT_PULLUP);

      pinMode(6, INPUT_PULLUP);

      pinMode(8, INPUT_PULLUP);

       

      //MIDI uses serial 31250

      Serial.begin(31250);

      MIDI.begin();

       

      }

       

       

      void loop()

      {

      //check for buttons to be pressed

      button1.update();

      button2.update();

      button3.update();

      button4.update();

       

      // if button 1 is pressed, send cc0

      if (button1.fallingEdge())

      {

      MIDI.sendControlChange(cc0, cc_on, channel);

      }

       

       

      //if button 2 is pressed, send cc1

      if (button2.fallingEdge())

      {

      MIDI.sendControlChange(cc1, cc_on, channel);

      }

       

       

      //if button 3 is pressed, send cc2

      if (button3.fallingEdge())

      {

      MIDI.sendControlChange(cc2, cc_on, channel);

      }

       

      //if button 4 is pressed, send cc3

      if (button4.fallingEdge())

      {

      MIDI.sendControlChange(cc3, cc_on, channel);

      }

       

      }

       

Viewing 1 reply thread
  • You must be logged in to reply to this topic.