Author Topic: Wiimote + GlovePie + Grand VJ  (Read 10957 times)

Offline vjkamej

  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
on: August 05, 2011, 04:58:04 PM
Ive been freelancing as a VJ for about 5 years now and my main Mojo has always been  the continuos innovation and improvement of the whole visual experience.

Now, I stumbled upon GlovePie a few months ago and discovered that via GlovePie I could use a Wiimote to controll live visuals on Arkaos GrandVJ (this is when I fell in  love is GlovePie)

Recently I got my hands on ANtiVj (Crustea)'s script to make the magic trick  but what I really want is to fully understand how GlovePie works so i can come up with a homebrew recipe and once its done be able to share it with colleagues and the entire world.

This is part of the script Im using right now:
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.D2 = Wiimote.Nunchuk.ZButton or Wiimote.Classic.ZL or Wiimote.Classic.ZR

midi2.C3 = Wiimote.RelAccX >= 20
midi2.D3 = Wiimote.RelAccY >= 20

Right now the scripts makes every button (except POWER) to work as an specific piano key that activates a clip.

All lines have a Piano key asigned (example: C0, D0, E0) because Grand VJ uses a Piano interface to activate video clips

The last line of the code was inserted by me to make Vertical acceleration work as another clip

Looking around I found out that GrandVJ has a midi mapping view option that lets you see the name of the midi signal you want to map, in my case Im after the clips X(midi1/C-1) and Y (midi1/B-2) position 

Now, the question is how to assign an specific midi signal to lets say: nunchuck joypad X or Y?

...should my code line reaad something like this?
midi1.B-2 = Wiimote.Nunchuk.JoyY
midi1.C-1 = Wiimote.Nunchuk.Joyx

Windows 7
Bluetooth driver: Toshiba Bluetooth Stacker (seems a better Bluetooth manager than blusoleiol)
GlovePie 0.43

Thanks in advance for the help

Offline vjkamej

  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Reply #1 on: August 05, 2011, 05:02:12 PM
I assume that "Wiimote.Nunchuk.JoyY" and "Wiimote.Nunchuk.JoyX" have to be part of the line but I still dont get how to address and specific MIDI event

Offline bg4m3r

  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Reply #2 on: September 01, 2011, 01:32:23 PM
I'm not entirely certain what it is you're asking for help with, but here's what I can see that could be part of your issue...the original script you're using appears to have been made in an older version of GlovePIE. There have been a lot of changes in the scripting and some of the older commands don't work anymore, or aren't needed. For example, you don't have to say wiimote.nunchuk.C anymore, you can just have Nunchuk.C

If you are just wanting to map inputs to the nunchuk stick, you don't have to use the JoyX, each direction can be mapped as Nunchuk.Up, Down, Left, or Right. You will probably need to define deadzones, as the stick probably won't perfectly recenter (midi1.B-2 = Nunchuk.Up >= 0.2). The stick movement range is 0.0 - 1.0 for up and right, and 0.0 - -1.0 for down and left.

Have you tried using the GUI? It's a little awkward at first, but it can come in handy. Also, here's some documentation to refer to:

I don't have any experience with midi devices and glovepie, but I hope this helps some!
« Last Edit: September 01, 2011, 01:33:58 PM by bg4m3r »