This tutorial will show you how a MIDI device (for example a Akai MPD26) can control PixelController using PureData. PureData will translate the MIDI signal to an OSC message and send it to PixelController.
PixelController is my Open Source Led Matrix project, originally used to control my PixelInvaders panels, now it support multiple output devices.
- PureData Extended (I use v0.43.1-extended-20120614)
- a MIDI device
Step 1: Setup PureData
Make sure your MIDI device is connected to your machine and start PureData. Select “Preferences/MIDI Settings” (or “Media/MIDI Settings”) from the menu to setup your MIDI device. Select your MIDI device from the input setting:
Step 2: Load Converter Sketch
Load the Midi2OSC.pd (this file is part of the PixelController package) sketch:
Step 3: MIDI Setup
Right click on “pd midiSetup” and the MIDI setup dialog opens:
Turn on a slider or knob to see its controller id (“Controller input”). Now you can assign this id to an event, for example “SLIDER_MIX” use id 15. Repeat this step until all desired controls are assigned.
Step 4: Setup Network Setings
If PixelController is running on localhost, just press on the white message box:
If not, replace “localhost” with the target IP and press the white message box.
Advanced: How does it works?
If you want to extend the functions, you must first define a new ID (step 3). Now open the “pd midiWork” sketch:
- Nr 1: Check MIDI id (as defined in step 3).
- Nr 2: Some math, map the MIDI value 0..127 to a valid range
- Nr 3: Send out OSC Message, where the name matches a valid PixelController message
Thats it, enjoy.