• Home
Blue Orange Green Pink Purple

Posts Tagged ‘wiifit’

You can use the search form below to go through the content and find a specific post or page:

mai 10

[how to] wii balance-board > glovePIE > midi > virtools

I wanted to use the wiifit into virtools, so first I looked for a BuildingBlock, but I didn’t find BB in order to use the WiiFit Balance-board. If you have one please tell me ^^ ! So Instead I tried (successfully) to use GlovePIE and send informations to Virtools via MIDI.

Before, I want to say that their are others methods, but I use Vista X64 and the drivers must be signed (ok you can change that too ^^ ). For example you can use the balance-board with GlovePIE and PPJoy to create a joystick, but it’s a chore on x64 :( . So this example is not THE solution !

So, what do we need to do that ?
- a Wii Balance-Board & Virtools ;)
- Something to connect your balance-board using bluetooth (I use BlueSoleil), If you had already try (and succeed :) ) to connect a wiimote it’s the same thing.
- GlovePIE 3.0 , for information Carl Kenner only give 2.9 link because 3.0 has serious bugs with the wiimote. But the 2.9 doesn’t have the Balance-Board support. This is the file found somewhere else.
- MidiYoke , in order to virtualize a MIDI Port and get informations into Virtools (or any other software using MIDI Input).

Actually the process is very easy. Even if I spent some times on this (in order to find the right solution), I’m sure you will spend few minutes !

Step 1. install MidiYoke
Installation is fast but you will need to reboot after.

Step 2. connect the Balance-Board
When you use a wiimote, you can synchronize it with the Wii (or your computer) by pressing 1+2. But the Wii-BB doesn’t have external button to synchronize. So in order to be detected as bluetooth device you will have to open the battery gate and push the red button (keep it pressed until the device is fully connected).

a - detect the balance board

b - get services (as Human Interface Device)

c - connect the device

d - now it’s ok you can release the red button !

Step 3. launch GlovePIE 3.0 and create a script

Launch GLovePIE and load this script. (it’s a mix between different scripts ^^). It is very easy ot understand (I think) and you’ll can change it easily after.

First we have to check if the board works. You can see that at the end of the script their is a debug line :

//GlovePIE Debug
debug = “X: “+ var.Xinit +” Y: “+ var.Yinit

When you will run the script the debug informations will appear on the upper-right corner of the GlovePIE window. So now run the script !
If everything is right you must have numbers on the debug window (different from 0.00).

(If it doesn’t work try to reconnect reload GlovePIE or retry from step 1, actually some times my balance board disconnect itself, don’t know why.)

Now you can climb proudly ( :D ) on the board and the numbers must change. In order to initialize the wiifit you have to stay on the board and use your mouse: left click (I chose the mouse because mine is wireless and it’s easier to stay static on the balance-board).
If you want to change that you just have to modify this lines :

line 10. If mouse.LeftButton = true
line 17. mouse.LeftButton = false

and put a keyboard action instead or anything else.
Move on your board and check the variations of values.

Step 4. send what you need
On this script you have two main values that I wanted to use (values between -1 and 1 just like any other joystick, for other reasons).
:

var.Xinit // left/right from -1 to 1.
var.Yinit // foward/backward from -1 to 1

this two values are calculate from the main properties of the board, so you can get all this informations about the board :

//sensors values
Wiimote.BalanceBoard.RawFrontLeft
Wiimote.BalanceBoard.RawFrontRight
Wiimote.BalanceBoard.RawBackLeft
Wiimote.BalanceBoard.RawBackRight

//weight
Wiimote.BalanceBoard.Weight
Wiimote.BalanceBoard.WeightBack
Wiimote.BalanceBoard.WeightFront
Wiimote.BalanceBoard.WeightLeft
Wiimote.BalanceBoard.WeightRight

//use as Human Joystick (doesn’t work very well on mine)
Wiimote.BalanceBoard.JoyX
Wiimote.BalanceBoard.JoyY

In order to send midi value you have to convert value in order to get variation between 0 and 127. Now let’s see how we can send informations.

midi2.Channel1.FirstNote = ((var.Xinit+1)*127)/2
midi2.Channel2.FirstNote = ((var.Yinit+1)*127)/2

Use the midi2, that correspond to the virtual midi-port, you can use up to 16 channel (if you don’t select channel it will be the channel 1), and use the First Note value (actually you can use 4 notes, but I didn’ find how to get them into Virtools, so I use different channels instead). Here I send the Left/Right value through Channel 1 and Foward/Backward through Channel 2. In this case 0 to 127 equal -1 to 1, so 63 is the value sent when nothing happen.

That’s all for GlovePIE !

Step 5. launch Virtools

Ok, now we only 2 building blocks :) and that’s all ! Actually I’m not very used to MIDI in Virtools (and MIDI at all :D ). Set the Midi input to 0 with the BB “Set Midi Input Port” , and after you just have to read datas with the BB “Read Midi” (both BB are in the category Controller > Midi). On the last BB edit the parameter Channel to 0 for the Channel 1 of GlovePIE and 1 for 2, 2 for 3 … And get the Output Note value. In this example I get the value from the two different channels using two BB Read Midi. (don’t forget to run the GlovePIE script :) )

That’s all ! As I said it was very easy, now do what you want to do with this values !

Soon I’ll show you what I made with the Balance-Board !

  • Categories
    • blog (1)
    • how to (2)
  • Last Comments
    • Danille Cruce dans [how to] wii balance-board > glovePIE > midi > virtools
    • Jonathan Taylor Thomas Interview dans [how to] wii balance-board > glovePIE > midi > virtools
    • entrar aqui dans [how to] wii balance-board > glovePIE > midi > virtools
    • acne medication options dans [how to] wii balance-board > glovePIE > midi > virtools
    • Dick dans [how to] wii balance-board > glovePIE > midi > virtools
  • Blogoliste
    • labs.paindepices
  • Archives
    • juillet 2010
    • mai 2009
  • Search






  • Home

© Copyright work in progress - toni da luz. All rights reserved.
Based on a FTL Wordpress Themes

Back to Top