Controlling sound and lighting with wiimotes

    Jul 31 2013 | 1:41 pm
    I'm trying to manipulate live audio recording through the use of Wiimotes, e.g. when you talk and move the wiimote downwards, the pitch of your voice goes down along. At the same time, I want the lighting in the room to react on this as well, like the lower the pitch the more red the room becomes.
    I'm currently using MAX 5 / Windows 7.
    After a lot of searching on the Internet, I'm kinda dazzled by the amount of different options to accomplish this type of thing.
    What are your thoughts on this? Should I be using a OSX with MAX 6 together with aka.wiiremote? Or maybe OSCulator? Is MAX even capable of controlling lighting? Or should I continue with using GlovePIE?
    I hope you can clarify this a bit for me, as I'm starting to get lost!
    Thanks for reading,
    Greets Rowan.

    • Jul 31 2013 | 2:00 pm
      Hi changing your PC and OS just for wiimote success might be a bit heavy-handed ;)
      Stick with Max 5 and try the tk.wii external and the Toshiba Bluetooth stack. I must stress that I haven't used this since updating to Max6 (many "older" externals are not 64-bit compatible), but when I did it was very intuitive and solid.
      You will get recommendations for other externals and Bluetooth drivers but they will be OS/context/taste dependent.
      I used GlovePIE for Wiimote extensively back in the day (kinda miss it), and it requires a virtual MIDI port such as MIDI-Yoke. But GlovePIE is no longer supported AFAIK, definitely never tried it under Win7.
      HTH Brendan
    • Jul 31 2013 | 2:11 pm
      ps and btw
      have you considered Arduino + accelerometers for a possible DIY solution? Much less of a hassle, if very slightly more expensive. I could write you (or direct you to) a simple Arduino program to send accelerometer values to Max, it would be a fragment of urine :$
      Worth considering? Brendan
    • Jul 31 2013 | 3:05 pm
      Hi Brendan,
      Thank you for your quick and helpful reaction!
      After installing the Toshiba bluetooth drivers, connecting the Wiimote and opening your tk.wii patch, the MAX window says: tk.wii>>Found Wiimote. deviceid=0 handle=2324
      After this, I do not see anything happening when moving the wiimote, or pressing its buttons. Also, the lights are still flashing?
      I haven't considered Arduino, having only heard of its capabilities and having no experience with it. Would this be a simpler and/or better solution to control sound and lighting through MAX?
      Awaiting your reply,
    • Jul 31 2013 | 3:54 pm
      Hi from what I remember, you should establish that the wiimote is correctly connected under your OS first; ie follow the Bluetooth stack interface instructions closely, so that the lights stop flashing after successful connection. Then launch the Max patch containing the tk.wii external (I can't recall if there is a helpfile/subpatch in that external - and I'm not on my own PC right now).
      Again, this all relates to using the external under XP and Vista.
      If you're still stuck, try searching through this forum, for "tk.wii" "wiimote win7" etc.
      There are other wireless gesture-control solutions, of which Arduino is just one. I think you need to define the parameters of your interaction environment a little more clearly and solidly before deciding on the choice of technology - a rookie mistake :P
      Half the problem is that there are numerous options, each of which has numerous challenges across numerous platforms and contexts. You can see that option anxiety is futher exacerbated by an exponential number of possible pitfalls. I like Arduino. It's simple and solid and only does what I tell it to, when I ask.
      sorry not to be more directly helpful
    • Jul 31 2013 | 5:35 pm
      Great advice, you're being very helpful.
      I'd like to be more clear on what I want to do:
      The user is facing a wall of 3x2 meters, at a distance of 3 meters. While pointing both his arms straightforward holding the wiimotes, a piece of sound is heard. While moving his right arm down, the sound is pitched downwards and the lighting should color the room red. While moving his right arm up, the sound is pitched upwards and the lighting should color the room blue.
      The sound module I already have in MSP, I thought it would be easy controlling the fader that controls the pitch using a wiimote. Though now I am uncertain if I can achieve this even with tk.wii, which is responding now. Also, I have still got no clue if MAX can communicate the information to the lighting, or what I would need for it.
      Feeling a bit lost now, greets Rowan.
    • Jul 31 2013 | 7:04 pm
      Hi Rowan so, you have the Wiimote accelerometer and button data inside Max now? That's good, although you mention WiimoteS (plural) and you need to discover for yourself if tk.wii supports multiple Wiimotes; again, searching here with specific keywords will help immensely.
      Post your "soundplayer" patch here and we can demonstrate how to control pitch.
      As for lighting, not my bag I'm afraid but I believe all you need to do is output MIDI to a hardware DMX (?) controller, again, searching here will give you loads of help cos I've seen this type of topic/question many times.
      Best regards Brendan
    • Jul 31 2013 | 8:03 pm
      Thanks Brendan, you've been a big help.
      The tk.wii patch has an option for a second wiimote, after connecting these both to the toshiba bluetooth controller, I synced them to the tk.wii patch. Motion Plus also really smoothes the tracking!
      Both x- and y-values are outputted as floats between 0 and 1, so it should be no problem linking these to my soundplayer.
      As for lighting, I believe you are right.
      Thanks again, greets Rowan.