Kinect MIDI Controller (KMIDIC) – On a Mac!

Posted: April 26, 2011 in Ableton Live, Electronic, Hardware, Kinect, KMIDIC, Launchpad, MIDI Controller, Music, PMIDIC, Processing, Software

Instead of making a stop motion video of my giant Lego man (you can see him in the video below) like I was planning to do, I ended up playing with Processing again. Basically I didn’t really have the right space to setup my stop motion, and I really needed to have a green screen to do what I wanted to do. But its all good, no time wasted as I was very productive anyway!

Firstly, heres the video of my creation today:

Now an explanation…

In summary, I am waving my hand around in the air like an idiot and it is controlling the music coming from my computer. The hardware and software components that are at play here are Microsoft Kinect -> Processing -> Ableton Live and Novation Launchpad. I had a chat to my friend DJ Gustavo Bravetti and he had some good tips for me on how to setup Ableton clips to make the transitions smoother and sound more musical. When I have time, I’ll set up a whole song and give a better performance!

A bit more detail…

Basically, the Kinect is sending the location of my hand to Processing which is in turn sending MIDI note on messages to both Ableton Live and the Novation Launchpad. In this version, I have separated the grid into 4 quadrants, each on playing a different MIDI note that is going into 2 channels in live. The first channel has an arpeggiator triggering an Impulse drum kit, and the second channel has an arpeggiated synth. The lights on the Launchpad are also set to light up each of the quadrants as they are triggered.

For those wanting to delve into the code, its not highly commented, but you should be able to get the idea of what I’m doing. Any issues, just leave a message here or send me an email on benxtan [at] gmail [dot] com.

Processing source code and Live set are available here (UPDATED):

You will need to install Processing, and the rwmidi and libfreenect libraries in the libraries folder of your Processing sketches.

Here are some links if you are after more information.

Software Links:

Hardware Links:

Once again, if you are a musician or music business in Australia, its free to sign up to so go do it! I’m giving you free stuff, so help me out here ok? 🙂

  1. Rolf says:

    very nice, comprehensive work….I have been working with the Kinect/Processing for only a few months, creating a musical instrument for disabled people. It’s working quite nicely but I have not had any success in sending output velocity (controller7). No matter what I send, the loudness stays the same. Grateful for any suggestions…

    • benxtan says:

      Hi Rolf,
      Thanks for your interest. I haven’t tried outputting velocity yet but I’ll try it and let you know what I find. Are you using the same midi and kinect library that I am?

  2. Hi Guys. I’m not sure if it’s even possible but if so I would greatly appreciate info. I should say that I don’t understand programming much but I was wondering how difficult would it be to set up kinect to control Tempo with your right hand and velociy/Dynamics(CC1-modwheel) with your left hand. We are doing a project in Exeter where I will be conducting whole Requiem using Osculator (Wii remotes) but I always wondered if we could use kinect instead. PS please feel free to email me. Thank you

  3. Zachary says:

    Great video, and thanks for the info! I love this concept… however I’m very new to it & am not a developer… I’ve downloaded the files, but am really unsure how it is supposed to work. Is it as simple as connecting the Kinect & runnng Processing? or do I need to install something else on the Mac first or do anything to the Kinect? … Also I am unsure about the Processing library folder. Is it the one that I would find in viewing the contents of the app? I’m not sure about the “libfreenect” file either as there seems to be a couple different downloads on that link… Sorry if I’m asking too many stupid questions, but I am a total beginner with this. Any help would be appreciated.

    • benxtan says:

      Hey Zachary,
      It might a bit tricky for a non-developer to set it up without any instruction.
      I’ve had a bunch of people asking me for instructions now, so I’m going to have to write up some instructions and put it up online.
      Heres a first draft:
      (Screenshots to come later)

      How to get KMIDIC running on a MAC and get it to send MIDI to a virtual MIDI device

      1) Add a virtual MIDI device.
      You only need this if you want KMIDIC to send MIDI messages to software (e.g. Ableton Live) as opposed to hardware.
      Set up a MIDI bus like so –
      a) Open “Audio Midi Setup” using Spotlight (Command + Space)
      b) If you can’t see a “MIDI Studio” window, click on View > Show MIDI Window
      c) Double click on “IAC Driver”
      d) Click on the “+” button to add a port. The default name is “IAC Bus 1” but you can rename if you wish.

      2) Download and install Processing (

      3) Download and install RWMidi (
      Note: Libraries go in /(Your Processing sketchbook location)/libraries/
      You can get and set (Your Processing sketchbook location) in Processings preferences.
      You should now have /(Your Processing sketchbook location)/libraries/rwmidi

      4) Download and install libfreenect (
      You should now have /(Your Processing sketchbook location)/libraries/openkinect

      5) Download and unzip the latest version of KMIDIC (
      Latest version is (
      This goes into /(Your Processing sketchbook location)/

      6) Open Processing and open the the KMIDIC project.

      7) Get the ID of the MIDI device you want KMIDIC to output to.
      In Processing, run KMIDIC by clicking on the Play button on the top left corner or press Command + R.
      Look at the output in the console.
      Do you want KMIDIC to talk to software or hardware?
      If your answer was software, then remember the MIDI bus you created in Step 1?
      Look for it (IAC Bus 1 Apple Inc.) in the Output Devices list and get the index number (e.g. [0]) to the left of it.

      8 ) Set the ID of the MIDI device you want KMIDIC to output to.
      In Processing, click on the first tab (Kinect _MIDI_Controller_vx.x) and look for the line that says: int midiOutputDeviceId = 0;
      Set the value to the index of the output MIDI device you want to use.
      For example, if the index was [1], you would change the code to say: int midiOutputDeviceId = 1;
      Now KMIDIC is set up to send MIDI message to that device.
      If you had a hardware device plugged in, like a synthesiser, you could easily make KMIDIC send MIDI to it by changing this ID.

      9) Hit RUN!

  4. Eben says:

    5) Download and unzip the latest version of KMIDIC (
    Latest version is (
    This goes into /(Your Processing sketchbook location)/
    is this as in the same as the previous processing/libraries??

    6) Open Processing and open the the KMIDIC project.
    i open processing and open KMIDIC but which file do i open in processing????


    do you place all .pde files ect all in libraries without the main folder keeping them togeather??

    cos when i try run any of them it says

    unsatisfied link error/users/eben/documents/processing/libraries/openkinect/library/libkinect.jnilib:

    [0] Real Time Sequencer Sun Microsystems

    Output devices:
    [0] Real Time Sequencer Sun Microsystems
    [1] Java Sound Synthesizer Sun Microsystems

    Output Device: Real Time Sequencer Sun Microsystems
    Exception in thread “Animation Thread” java.lang.UnsatisfiedLinkError: /Users/ebengreaves/Documents/Processing/libraries/openkinect/library/libKinect.jnilib:
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(
    at java.lang.ClassLoader.loadLibrary(
    at java.lang.Runtime.loadLibrary0(
    at java.lang.System.loadLibrary(
    at org.openkinect.Context.(
    at org.openkinect.processing.Kinect.start(
    at Kinect_MIDI_Controller_v0_2$KinectTracker.(
    at Kinect_MIDI_Controller_v0_2.setup(
    at processing.core.PApplet.handleDraw(

    Any help would be awsome bro.



    • Eben says:

      dragged everythn into processing and it cant find kinect still.
      any chance you could export it as an application???

    • benxtan says:

      Hey Eben,
      1) To get your /(Your Processing sketchbook location)/ directory, look in preferences.

      Inside this directory will be all your projects.
      Each project goes into its own folder, e.g. Kinect_MIDI_Controller_v0_2.
      Leave the folder name as is, don’t rename it.
      Inside that folder will be all the .pde files.

      Also create a folder inside /(Your Processing sketchbook location)/ called libraries and put all the libraries inside it.

      2) When you open, use this file kinect_midi_controller_v0.2pde

      • toot! says:

        I’ve followed your directions and I get this when I try to run:

        Exception in thread “main” java.lang.RuntimeException: java.lang.ClassCastException:$MidiInDeviceInfo cannot be cast to de.humatic.mmj.spi.CoreMidiProvider$JSMDevInfo
        at processing.core.PApplet.runSketch(
        at processing.core.PApplet.main(
        Caused by: java.lang.ClassCastException:$MidiInDeviceInfo cannot be cast to de.humatic.mmj.spi.CoreMidiProvider$JSMDevInfo
        at de.humatic.mmj.spi.CoreMidiProvider.getDevice(
        at javax.sound.midi.MidiSystem.getMidiDevice(
        at rwmidi.RWMidi.getOutputDevices(Unknown Source)
        at Kinect_MIDI_Controller_v0_2$MIDIDeviceUtils.getOutputDeviceName(
        at Kinect_MIDI_Controller_v0_2.(
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(
        at java.lang.reflect.Constructor.newInstance(
        at java.lang.Class.newInstance0(
        at java.lang.Class.newInstance(
        at processing.core.PApplet.runSketch(
        … 1 more

        Any ideas? I’d be really interested to try this out.

      • benxtan says:

        Hmm…not sure what that means. Is there any other output in the console?

  5. Tom says:


    firstly I want to say thank you for sharing this hard with us!! I have just started with this whole world of programming and I am somewhat overwhelmed. Alongside working my way through Pure Data and Processing tutorials I am also trying to get my Kinect to work as a midi controller for Ableton Live.

    I have followed all your instructions and everythingseems to be done correctly, except for this error message:

    “Exception in thread “Animation Thread” java.lang.NullPointerException
    at org.openkinect.processing.Kinect.enableDepth(
    at Kinect_MIDI_Controller_v0_2$KinectTracker.(
    at Kinect_MIDI_Controller_v0_2.setup(
    at processing.core.PApplet.handleDraw(
    at processing.core.PGraphicsJava2D.requestDraw(

    Do you have any idea what this could be?

    I have ableton set to receive midi from my new Midi bus but I don’t see any incoming information.

    Any help would be much appreciated!

    If there is any way I can help you please let me know. I am not living in australia but I am morethan happy to help promote your work in any way you can.

    Thanks again!!


  6. […] it all at website Benxtan further details and […]

  7. Basel says:

    Hello Benxtan,

    I am trying to get a Kinect V1 to work with Ableton live on my MacbookPro mid 2010 running macOS Sierra Version 10.12.6, and this has been very difficult so far!

    Tried Processing (Managed to get a signal which proved that the laptop detects the Kinect). But then I tried KMIDIC and failed with a problem that says: A library relies on native code that’s not available. Or only works properly when the sketch is run as a 32-bit application.

    I know this is an old page, but I would really appreciate some guidance on how to get the Kinect to work and send signals to Ableton live, and I’m not a programmer, ant have no previous experience with coding.

    Thanks a lot!

    • benxtan says:

      Hey there! Firstly thanks for checking out KMIDIC.

      I don’t have access to a Kinect anymore so I can’t test it but maybe you could try an older version of Processing? What version are you running now?

      There are older versions here –
      I posted this in 2011 so I’d try v1.5.1

Leave a Reply

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

You are commenting using your 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