Now that your wiimote is talking to your computer, it's time to
configure some softwares to listen to what it says! You will be using
GlovePie,
a program that was originally created to work with the
Essential Reality P5 Glove-- classic! This software developed
by Carl Kenner has the role of converting any type of signal (from
a mouse, Joystick, a P5 glove) into another signal (MIDI, variables...)
using a simple scripting language and/or a GUI.
A)
Start up GlovePie. I don't recall if it even needs an install,
but I remember having some problems when running it off my desktop,
then moving it to my Programs folder, then running it again.
Anyway, when you open it up it displays an empty script editor,
basically you type in the commands you want your control module
(in this case, the wiimote) to execute and hit "Run".
There's an autogenerate, but I have not really experimented with
it yet.
Raw coding is intimidating, but fortunately there are loads of
scripts provided with the install: for example, go to the "File"
dropdown menu, then open "WiimoteScripts/WiiMouse 0.1.PIE",
and click on RUN, and you can now control your mouse cursor with
your Wiimote.This is what I used to make sure that the wiimote is
actually working-- up untill now, the only proof you have that it
works is a stupid dialog box. If you run "WiiMouse 0.1.PIE"
and your cursor drifts up to the top left of your screen-- your
wiimote has not been detected properly. Go back to some previous
steps, try again! I sometimes use "WiimoteIdentifier.PIE"
to check if it sees any wiimotes, but it seems like it can "see"
the wiimote without "hearing" the data. If you are dancing
your mouse around the screen with your wiimote, you are almost done!
B) Load the Wiimote to Midi script into GlovePie.
Antivj.com
has the newest version of the script
here, or you can copy, paste and RUN the script below. After
you copy and paste this code into GlovePie, be sure to save it for
later-- call it something like "WIItoMIDI.PIE". Be sure
to uncomment/comment out the appropriate sections to disable key
commands from your wiimote if you are planning to use it more...
unconventionally. This script ( beta0.1), you get the value of X,
Y and Z slope value from your Wiimote, which are converted into
#CC values 30, 31 and 32, variables from 0 to 127. Sometimes this
seems to make sense to me, sometimes not. Are we done yet?
/********************************
Wiimote to midi, beta 0.1
Use your Wiimote to control Ableton live, Arkaos midi..
contact: crustea@gmail.com
www.antivj.com
********************************/
/********************************
Wiimote's buttons
********************************/
//Keyboard notes
//To send "keyboard events" instead of "midi notes",
uncomment this part, and comment "Midi notes" part above.
//Values before the "=" caracter are the keyboard events
that you emulate.
/*
Up = Wiimote.Up or Wiimote.Classic.Up
Down = Wiimote.Down or Wiimote.Classic.Down
Left = Wiimote.Left or Wiimote.Classic.Left
Right = Wiimote.Right or Wiimote.Classic.Right
Q = Wiimote.A or Wiimote.Classic.a
W = Wiimote.B or Wiimote.Classic.b
One = Wiimote.One
Two = Wiimote.Two
Home = Wiimote.Home or Wiimote.Classic.Home
Minus = Wiimote.Minus or Wiimote.Classic.Minus
NumPadPlus = Wiimote.Plus or Wiimote.Classic.Plus
X = Wiimote.Classic.x
Y = Wiimote.Classic.y
v = Wiimote.Nunchuk.ZButton or Wiimote.Classic.ZL or Wiimote.Classic.ZR
L = Wiimote.Classic.L
R = Wiimote.Classic.R
C = Wiimote.Nunchuk.CButton
*/
//Midi notes
//To send MIDI notes, uncomment this part (done by default), and
comment the "Keyboard notes" part
//The value before the "=" caracter is the midi note.
midi2.C0 = Wiimote.Up or Wiimote.Classic.Up
midi2.D0 = Wiimote.Left or Wiimote.Classic.Left
midi2.E0 = Wiimote.Right or Wiimote.Classic.Right
midi2.F0 = Wiimote.Down or Wiimote.Classic.Down
midi2.G0 = Wiimote.A or Wiimote.Classic.a
midi2.A0 = Wiimote.B or Wiimote.Classic.b
midi2.B0 = Wiimote.Minus or Wiimote.Classic.Minus
midi2.C1 = Wiimote.Home or Wiimote.Classic.Home
midi2.D1 = Wiimote.Plus or Wiimote.Classic.Plus
midi2.E1 = Wiimote.One
midi2.F1 = Wiimote.Two
//midi2.A2 = Wiimote.Nunchuk.CButton
//midi2.B2 = Wiimote.Classic.x
//midi2.C2 = Wiimote.Classic.y
//midi2.D2 = Wiimote.Nunchuk.ZButton or Wiimote.Classic.ZL or Wiimote.Classic.ZR
//midi2.E2 = Wiimote.Classic.L
//midi2.F2 = Wiimote.Classic.R
/********************************
Setup for gravity values
********************************/
// these are the magic line, which converts X, Y
and Z rotation values to Midi #CC 31, 32 and 33.
var.xOffset = 1
var.yOffset = -28
var.zOffset = 2
var.xRot = Wiimote.RawForceX + var.xOffset
var.yRot = Wiimote.RawForceY + var.yOffset
var.zRot = Wiimote.RawForceZ + var.zOffset
midi2.Control31= (EnsureMapRange(var.xRot, 26,-26,
0,1))
midi2.Control32= (EnsureMapRange(var.yRot, 26,-26, 0,1))
midi2.Control33= (EnsureMapRange(var.zRot, 26,-26, 0,1))
//Old code: (MapRange(var.xRot, 26,-26, 1,127)-1)/127
/********************************
Setup for acceleration values
********************************/
//Just a test for now, comment the line above to disable X acceleration
to midi note
midi2.C3 = Wiimote.RelAccX >= 15
|