Simple Arduino Midi Controler

So I made a simple midi controller since there was a discussion about midi in an arduinome, just wanted to see what would be involved.  It’s pretty simple to make a stand-alone version.

Here is the schematic, very simple (Potentiometers can be any size):

Here is the the code.  It’s stupid simple, it might be too simple.  I don’t know if the delays have to be there but I didn’t want to spam the serial port, also this is just for 2 controls.

// Super Simple Midi Contoler

int val = 0;
int val2 = 0;

void setup()
   Serial.begin(31250);       // Default speed of MIDI serial port

void loop()
   val = analogRead(1)/8;      // Divide by 8 to get range of 0-127 for midi
   MIDI_TX(176,1,val);         // 176 = CC command, 1 = Which Control, val = value read from Potentionmeter

   val2 = analogRead(0)/8;     // Control point 2


void MIDI_TX(unsigned char MESSAGE, unsigned char CONTROL, unsigned char VALUE) //pass values out through standard Midi Command

And here is a video:

Now go make your own controller with photoresistors, pressure sensors, touch sensors, whatever!


11 Responses to “Simple Arduino Midi Controler”

  1. December 9, 2009 at 5:34 am

    This is very useful!
    Thank you for sharing!

  2. 2 starfiretech
    December 9, 2009 at 8:49 am

    Happy to help, I’m working on a midi sequencer, that also sends a clock signal so it can be used for syncing.

  3. January 2, 2010 at 1:19 am

    Hey, I was wondering if the pots were noisy at all? I used a different method for an arduino midi controller (via simple messaging system and max) but the pots are really noisy.

    • 4 starfiretech
      January 4, 2010 at 8:57 am

      I can’t say that I noticed they were, but you could use an array and read in a few values, then average them out.

  4. 5 lucas azevedo
    January 8, 2010 at 2:57 pm

    what software are you using on the PC?
    are you connecting the midi cable to which computer port?
    i’m thinking about building a midi controller to use on lmms over linux, but perhaps i’ll use a PIC microcontroller instead..

  5. 6 starfiretech
    January 12, 2010 at 8:16 am

    I’m using ableton, but any thing that has midi capabilities will work. I’m using a midi 2×2 USB adaptor, this outputs actual MIDI communication.

  6. 7 lucas azevedo
    January 13, 2010 at 10:23 pm

    I see.. perhaps I could use a usb to serial converter cable instead of the midi converter, since MIDI communications is serial, right? I think that would be easier and faster for me, because I already have the usb to serial cable 😛

    • 8 starfiretech
      January 14, 2010 at 9:59 am

      Well there is a small freeware program out there that will take USB serial and convert it to midi that can be used by any software, only have to change the baud rate of the program and get the software. I’ll let you know when I’m not at work.

  7. July 12, 2010 at 5:55 am

    Thanks for sharing mate.

  8. 10 Chris
    August 17, 2010 at 9:53 am

    how would you go about exchanging the analogue input to a touch screen?

  9. February 9, 2011 at 6:26 pm


    thanks so much for the schematic and code examples.
    truly appreciated.
    is there any reason the code couldn’t be modified to send
    to analog output x, x being bounded by the number of analog outputs on the arduino being used?


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Please Donate!

December 2009
« Nov   Jan »

Top Clicks

  • None

%d bloggers like this: