WiiDI is the term given to using a Wiimote with MIDI controls. Using GlovePie and a software called MIDIYoke, users can control MIDI parameters with Wiimotes.

Thanks to Altris for providing these. If you are looking for information on how to use GlovePie more effectively and create your own Wiijing setups, this is the place to look. We'll be updating this with new information regularly so check it out often! If you want to discuss this with Altris, he posts the guides in our Forums before they make it on here. Check the GlovePie section of our Forums for the latest and to make comments. Part 4 (scroll way down) discusses incorporating MIDI into GlovePie.

So first thing you need to do, or at least that I’ve found helpful, is to install a program called Midi Yoke which basically installs and gives you 8 different “fake” midi devices which allow you to send information from glovepie to Traktor or any other program. Now, you can do this with your own sound card in theory, but I’ve had no real success with that and midi yoke takes up pretty much no processing power and makes the process much much easier.

So the first step is to go to which when you put that in your browser it should download the program. Then simply run the installer, follow the instructs and reset your computer. This install is only for XP or 2000 (it may work for vista too, I haven’t tried that), but if you wish to run it on a mac or an older version of windows, you can find the installer on their website ( or by googleing Midi Yoke.

After you reboot, I would suggest switching your default Midi Device to being one of the Midi Yoke Devices as GlovePIE autmoatcially sends Midi information to the default device, and if you don’t use the default device then you have to switch things in GlovePIE everytime you add a new Midi command. So to do this, Click Start on the Taskbar, then Control Panel -> Sound And Audio Devices. At the top of the Sound and Audio Device Window, there will be a tab that says Audio, click on that. The bottom option should say Midi Music Playback, there will be a dropdown list in that section. Click on the list and select Midi Yoke NT: 1. You can select any one of them, but unless you are using Midi Yoke NT: 1 already like I am, it’s best to just keep things organized by using Midi Yoke NT: 1. Click okay to keep the changes and you only need to do one more thing to make sure Midi will work with GlovePIE and the Wiimotes and that is to enable Midi Yoke in whatever program you are using. Personally I am using Traktor, so to do that, you need to go to the Preferences section, click on the plus next to Hotkey & MIDI Setup (to expand it) then click on MIDI Interfaces. Then you should be able to see a list of midi devices, many of them being MIDI Yoke NT:1, MIDI Yoke NT:2, etc. I would check the box next to all of them just be safe and so they will all work if you want to use them at any point. To do that, just double click each device to get an x next to it. Then click okay to confirm the changes. Now you are ready to code and use Midi.

Programming to use midi really isn’t any different then using hotkeys, except for one huge difference. There is a lot more you can do with midi, and you have well over 100 different midi CC you can use to send information. So instead of being limited to the 26 characters of a keyboard, you have many more possibilities, not to mention you can start to control other things like Albeton or even Reason if you’d want to, or quite possibly even control things like Korg Synths or a Korg Kaoss Pad like I have!

But not to get ahead of ourselves, the first thing you have to do for midi is to understand how it is different then simply setting a key equal to a variable. While it functions the same, the format for doing it is a lot different. For example, you normally make a button equal to a letter by putting in this line of code:

l = Wiimote1.B
But in midi you declare a variable like this:

midi.ByteControl102 = Wiimote1.B

So you are setting the B button on Wiimote 1 to be equal to CC 102. You can do values from 1 to 127, although not all of them will work as some (if I remember correctly) may be used for other things as I’ve found with reason there are some channels which seem to be reserved. But, I have used some of these channels in Traktor without realizing that an they seem to work fine.

Then you can go into Traktor (if that is your program of choice) and go into the preferences menu -> Hotkey and MIDI Setup -> Midi Setup. Then add whatever function you want to control. Then, instead of finding the right CC to add, just click the learn button and do whatever it is that you wanted to do. That both gets the right CC but also tells you if it’s actually working correctly. If it does work correctly, simply click okay and start Djing it up.

There is also some other cool stuff you can do with Midi too though that goes beyond simply having more possibilities of things to assign. You can also use part of glovepie to assign the different things like roll or pitch to certain midi values. See, there are 127 different CC’s (minus the few you can use) and then there is a value for each CC that goes from 0-127. One example of this is I have been using a midi crossfader before using the Wiimotes. It sent a signal to Traktor which it easily interprets so for example, if my crossfader sent out the signal of 0, then that meant it was all the way left. If it sent out a signal of 127, it was all the way to the right, and if it sent out the middle value then it was in the middle. So you can do the same with the Wiimote as I’ve done for my crossfader script. So I have this little section of code in my script,

//Crossfader controled with twisting the wiimote left or right
//When A is pressed, the roll of the wiimote from 90 degrees to -90 is assigned midi values.

if (Wiimote1.A) then
var.C2 = MapRange(Wiimote1.SmoothRoll, -90 degrees,90 degrees, 0,127)/127

midi.ByteControl102 = Var.C2

So what this does is anytime I press down the A button, then it will assign a value to var.C2 which you can see is set to CC102 (I don’t know why in the other script they had the midi values at the end of all the code, but I’ve been following that tradition). So what happens is it takes the range of whatever I set, which was –90 degrees on the wiimote roll function (which is all the way left) to 90 degrees (which is rolled all the way right) and then assigns that to a range from 0-127 automatically. However, I didn’t code this by hand, I found a much easier way to do it. If your glovepie script isn’t running, you can type something like

var.C2 =

then click in the menu View -> Midi GUI -> Choose Manually. Then simply select whatever CC you want to access, so for example I’ve been using CC102 so I selected cc102. If you have that value assigned too, it should have an astrix next to it. Then start with the format box, I selected 0..127 because I was thinking of only the midi values but the 0..100% may work equally well. Then select the input device as Wiimote then select which wiimote (so I wanted 1 so I selected 1) then select which function you want to be used, so I wanted to use SmoothRoll as it gives me a bit smoother functioning, so I had to type that in since it’s not in the dropdown list, but you can type in any command for the wiimote or select one of the ones from the dropdown list. Since I didn’t select one from the dropdown list, I have to Convert my own Source Range, which basically means I put in the range I want to send midi signals from. So for me, I check the box Convert from source range, then type in –90 in the first box and 90 in the second. Now what that accutally does is pastes a line of code at the bottom of all your code, and this may be the confusing part but this is how I programmed mine :), the line of code looks like this

midi.ByteControl102 = MapRange(Wiimote1.SmoothRoll, -90,90, 0,127)/127

now what that is doing is setting CC102 to the wiimote roll from –90 degrees to 90 degrees. But the thing is I only want that to happen when I press the A button and roll the Wiimote, so what do I do? I copy the section half of the code,

MapRange(Wiimote1.SmoothRoll, -90,90, 0,127)/127

And put that in my function that I pasted earlier

if (Wiimote1.A) then
var.C2 = MapRange(Wiimote1.SmoothRoll, -90 degrees,90 degrees, 0,127)/127

then delete the line

midi.ByteControl102 = MapRange(Wiimote1.SmoothRoll, -90,90, 0,127)/127

See, then if I press the A button, it will set var.C2 equal to the Wiimote’s midi value for it’s roll. Which by doing this, since the last line of my code that I pasted earlier is

midi.ByteControl102 = Var.C2

I am really making CC102 equal to the Midi value of the Wiimote’s roll. Thus if I roll my wiimote to the left while holding down A my crossfader goes left, and if I roll it right, then it goes right. There is some other tweaking that has to go on too, as you are using a direct control for the midi stuff, but it allows you to move things more smoothly. Also, you can see that midi allows you use things like knobs, crossfaders or anything else more smoothing instead of having to increment them by small jumps, which is all you can do with the keystrokes. This is really helpful too because traktor is already setup to work with midi so once you have your few lines of code and add whatever it is you want to control in traktor, then you are all set. And yes, it took me a while to figure all of this out, but now I’m hoping to do things more complex, like using the roll function to control treble and bass, and use different angle ranges to get me to control the correct function. For example, if I have the Wiimote at a 15-30 degree angle pointed upward, and press A, then I start controlling the Bass with the roll of the wiimote. If it’s 30-45 degrees upward then I control the low mid, 45-60 would be the high mid and 60+ would be the treble. So now with one button I could control crossfading, all of the EQ pretty flawlessly…as long as I can get the angle down right :). The other interesting thing with stuff like a Kaoss Pad, or as others have said, using more complex motions, things like that become possible (although hader to code) as you can use different things like the angle, the roll, the pitch, or the accelerometer and convert them into midi signals and then send that information to whatever it is you are controlling. So theoretically you could come up with the data it takes to program a figure 8, and have that trigger some effect or just simply be your unique way of starting a track as it would actually be ‘theoretically’ possible. But waaaay more work then I want to attempt at the moment :). So look forward to the next HowTo having a whole bunch of different things people have thought to do with the wiimote, as unless you guys have other questions, these are most of the basic things you can do with GlovePIE! But if people are still struggling with different things, ask your questions and I’ll start creating new HowTo’s of different things.