# Is there a way to use a MIDI controller as a sensor in the Game Engine?

I'd like to use a MIDI enabled device, in this case a mixer with knobs and faders, as a controller for the game engine, to do a live projection and change some parameters in real time.

The only things I found on the web are dealing with reading midi files (like this) and not live interaction. Someone managed to get something going with a midi-to-keyboard mapper, but that defies the point of using a MIDI device, which sends a lot more informations than a keyboard does.

Is there a way to do this, short of coding it from scratch?

• BlenderArtists and Blender.org forums have a few mentions of people doing live midi input and VJ work using GE and midi controllers. It might be an idea to contact the guys in this thread and this thread and exchange ideas and come back and write up a nice answer. Jun 17 '13 at 13:48

There is a script extension, Blender HID Mapper, that does the following:

Create a HID Mapping script similar to the provided template and run it. Then you can control blender with your MIDI device like specified in your mapping.

Just install the most recent version of the script from this site, then write your mapping as you desire. The first link above also has a sample mapping script that you can work off of.

• Excellent script. I used amidi -l to find the name of my device and I'm now watching the console output to map it. Thanks Jul 1 '13 at 15:33

Blender has nothing out-of-the-box to support MIDI, however people have used many different input devices with blender including OSC & MIDI.

If you are interested to use this you may be able to follow tutorials on using MIDI with Python, then just import the module from within Blender.

In short, its not specifically supported but theres nothing stopping you from using external interfaces from Python.

• I accepted your answer even tho I think it sounds easier than it is. Searching around the net, there's a lot of enthusiastic talk about it and many dead links, but I couldn't find anyone who actually got a MIDI device to work as a live controller (at least in the last 5 years or so), some links would be good. Also, it looks like coding it would require a good understanding of Python and not just following tutorials. Jun 18 '13 at 13:08
• You could try using OSC, from what I can tell this is now more popular then MIDI and used for similar purposes. Jun 18 '13 at 13:24
• Cheers, I tried using OSC but it was adding one layer more than I could handle. Jul 1 '13 at 15:43