Wiimote (OSC) Controlled Video Mixer Using Pure Data & GlovePIE

Last month I wrote a video mixer in Pure Data to provide live visuals for one of my sets. I thought it would be fun to control the video mixer with a Wiimote, that I could give to my friends to fuck around with while I was playing my music. This is the result. Although planning the idea for a month I left it to a couple of days before to put it together, so it is rather rudimentary, but it works, and it’s damn fun. It’s ¬†a good starting point for anyone wanting to do a similar thing.

Here’s a very quick clip of the results:

It consists of a GlovePIE script to convert the Wiimote input into Open Sound Control (OSC) messages. The OSC messages are recieved by the Pure Data (Pd) patch, which outputs the video. So a block diagram of the system would look something like:

Wiimote->Bluetooth->Glovepie->OSC->Pure Data

GlovePIE is a great program the I’ve used before to convert Wiimote movement to MIDI messages. Here I’m using it to convert Wiimote movement and button presses to OSC messages, which is a much more flexible and easier to use protocol than MIDI. So I’ve written a simple script to provide control of the Pd patch using OSC. The ‘1’ and ‘2’ buttons select the video clips to mix between, from a random pool of clips I cut up from public domain footage (archive.org). Holding the ‘A’ button and tilting the remote mixes between the two videos; 45 degrees to left displays just the first video, 45 to the right displays only the second, and the centre is the half/half mix. Holding the ‘B’ button and titling the remote controls the gain effect, which provides the trippy colours you can see in the youtube clip.

The Pure Data patch is extremely simple, but it provides a good base to extend upon. The OSC messages are unpacked in the “osc” subpatch. The is the place you will want to focus on if you want to modify how the control works, or for example add MIDI control instead of OSC. The “load” subpatch is where the file loading takes place, and this is where you’ll want to look to adapt the patch to your own needs. Currently the patch is designed to load a random clip, that are named 1.avi, 2.avi… to 40.avi. This isn’t a very elegant way of loading a file, as requires the files to be named accordingly, but it is extremely simple. It can easily be adapted to other naming schemes, e.g. “clip1.mov” and greater or lesser numbers of clips. But if you want to get clever, or remove the random selection, here you want to do your work. Thanks goes to *someone* (can’t find the original post) on the Pure Data Forum for providing the basis of the patch, and the extremely useful FLOSS Manual.

oscvidmixer

In the future I hope to greatly expand the system, incorporating it more closely into my set, and extended its capabilitys to include many more visual effects. Better yet I hope somone else extends it for me!

You can download the GlovePIE script here and the Pure Data Patch here*.

*UPDATE: Sorry the PD patch file is corrupted, and I can’t seem to find the original. Oh well, you can still put it together from the picture. Sorry!

 

2 Responses to Wiimote (OSC) Controlled Video Mixer Using Pure Data & GlovePIE

  1. Hi,
    good article, i’ve try test it but the zip with PD patch seems to have problem and it is not possible extract the file.
    Can you please provide a new link?
    Thanks,
    Rudy

  2. Yeah sorry it seems to be corrupted, and because it was made on my old PC I can’t seem to find the file. At least you can still create the patch from the picture!

Leave a Reply