Wednesday 30 September 2015

MIDI for the Arduino - Reading MIDI CC Messages

Be a Control Freak


In this installment of the MIDI for the Arduino series, we will look at using MIDI CC messages to control our Arduino board.

Before You Start

If you are new to this series you will first need to build the MIDI Input circuit described HERE.

You will also need to install the Arduino MIDI library as described HERE.

What is MIDI CC?

The 'CC" in MIDI CC stands for Continuous Controller or Control Change. Like everything on the internet, there is much debate over the correct term. I like to think of the physical knob as a Continuous Controller and the data it produces as Control Change messages. Everybody wins!!

See The Light

To demonstrate this topic, we will build up a little LED light show that can be controlled by incoming CC data. Don't be fooled by the simplicity of this project. With the right interface circuit, you could run full size stage lighting using this concept.

Build It

Download the software HERE and upload it to your Arduino. ** NOTE - Make sure you disconnect the wires from your Arduino's RX and TX pins before you send the program. If you don't, you will get an error message and the upload will fail. **

Now watch the video and follow along. Have fun!


15 comments:

  1. saludos! great video! como se llama e programa que usa para programar los leds con arduino via midi?

    ReplyDelete
  2. Hello. This is a great video! I love the whole series. Is there a way to modify the code to make make a pin go HIGH when a MIDI MMC code for Record (0x006) is received and LOW when the code for Stop (0x01) is received? I am trying to make a "recording" light turn on, every time the Record Transport is pressed.
    Thanks in advance.
    -Nick

    ReplyDelete
    Replies
    1. Hello Dave... any chance on sharing any knowledge on making the "recording" light? I made a mistake in the last posting; the Record code is (0x06). Any help would be greatly appreciated. Thanks -Nick

      Delete
    2. Hi Nick. MMC commands are actually Midi "System Exclusive" format and not Midi CC so this tutorial isn't what you need. I haven't done a Sys-ex tutorial yet but you should be able to figure it out in the Arduino Midi library docs. It's not much different than CC. Good luck.

      Delete
  3. This comment has been removed by the author.

    ReplyDelete
  4. wooooowwww, i just bought a little music sheet paper tape programable music box whit 30 notes, you can whatch many videos in youtube, with this music box you have to make a music sheet tape manually, drilling every note whit a hole in the paper tape, like an oldies pianolas, very hard job, i whant to make a drilling machin, like a old dot matrix printer, just connect a keyboard to the arduino by midi conection, and do the arduino with midi cc, control every one of 30 solenoids of any driller for make a hole in the line note on the paper tape, when this is just going forward, and get the tape whit the music sheet automatic when i play the keyboard. could you please help me whit the arduino, i whatch the arduino only have aroun 12 outputs, i think need an extra circuit to have 30 outputs, and the code to control this.
    do you like this? help me please, i am Manuel and do not speak english well.

    ReplyDelete
  5. Manuel, the tutorial on multiplexers may help you drive more outputs ... http://www.notesandvolts.com/2016/07/arduino-midi-controller-multiplexers.html

    Dave does a great job of covering the topic...

    ReplyDelete
  6. What is this "value * 2"?

    ReplyDelete
    Replies
    1. Value is always between 0 and 128. Multiplying with 2 makes it between 0 and 255

      Delete
  7. Hi dear friends.
    How to make, when I want read for example two commends?

    ReplyDelete
  8. Hi,
    this is so awesome!!! Would it be possible to redesign it to "listen" to midi notes and not the cc signal? THX! :)

    ReplyDelete
    Replies
    1. yes, you can make it an instrument playing the notes as lights

      Delete
  9. hola, disculpa arduino interpreta únicamente el valor del pico (127) o puede interpretar una valor constante durante un tiempo?

    ReplyDelete
  10. You should take part in a contest for one of the best blogs on the web. I will recommend this site!

    Player.me
    Information
    Click Here
    Visit Web

    ReplyDelete
  11. Any change on sharing in your google drive also the .mid file (music + lights) you show at the end ?

    ReplyDelete