Unsupported — We cannot guarantee that this software will work properly on Mac OS 10.8 and above. Please be careful.

Release: WiiMote Control, v20080111 (0.3)

Release Type: Production
Version: 20080111 (0.3)
Release Notes

This is a public beta of our updated WiiMote control patch. Since there isn't one for Leopard yet, I figure this will at least help you get started before it gets to production. This patch adds support for the nunchuk, and partial support for the Classic Controller. It also adds raw IR output support. All of these options are available under the inspector panel. Some of the classic controller buttons don't work or report bogus values. This is due to the underlying framework in use; I'm looking into this.

It's not stable, but I've made considerable efforts to make it stable. Please supply me with crash reports, as well as any other noticed odd behaviour.

Normally I'm not a fan of public betas, but we'll see how this one goes :)

Beta testers: This is identical to the 20080105 version, so you don't need to upgrade.

PreviewAttachmentSize
WiiMoteControlPatch-20080111.zip106.31 KB

tobyspark's picture
its working for me, picking

its working for me, picking up a wiimote for almost the first time. even got two tealights going.

the field of view on the IR tracking ain't so great, but thats a wiimote thing i guess!

will post more as i try and integrate into an installation that needs to be together for march.

toby

tobyspark's picture
ir output fixed; ir calibration thoughts

been working with the ir x+y. chris has tweaked the behaviour a little so the values hold when the sensor bar goes out of view, which is working for me.

the ir part doesn't always initialise, which is something that ideally could do with some love... framework at fault by the sounds of it.

i don't see any way of calibrating the ir output, so i'm about to make a calibration patch that i'll put up here that can be integrated if desired.

toby

cwright's picture
fun stuff

Not sure if calibration is necessary (though the circle-like output area is a bit lame, IMO. correcting that could be really helpful). If you find a reasonable method for doing this, and think it would be helpful across the board, let me know and I'll try to wrap it up in the patch itself.

Regarding getting IR reliably... hehe :) I'd love to burn more time on it, though that's not too likely in the very near future.

The framework code has fun comments like this:

// based on marcan's method, found on wiili wiki:
// tweaked to include some aspects of cliff's setup procedure in the hopes
// of it actually turning on 100% of the time (was seeing 30-40% failure rate before)

Unfortunately, as we know, it's still not 100% quite yet.. looking into this.

tobyspark's picture
yep, better ways to spend time

the needs some love comment wasn't a directive =]

i wonder whether its possible to reinitialise just that part and expose that as a 'disconnect' style input. or whether there's any way for the framework / plugin to know the IR didn't initialise, at worst has the IR changed in five seconds after it initialised.

random thoughts, as they come®

cwright's picture
re-init

I like the re-init idea... I'll have to think about that some more. It's totally possible.

I've considered the 5-second time out thing for some other aspects (a few betas ago, when it was really unstable, I was considering this for some weird disconnect bugs that are mostly resolved now anyway). Can't really think of any downsides, so I may play with that for the next release, if it works out.

Thanks for the ideas :)

tobyspark's picture
bare bones calibrator attached

bare bones.

toggle calibration flag on, waggle your wiimote around, toggle calibration flag off. it will scale the detected reach of the wiimote to the comp size. critically, it should remember the calibration when the comp is saved and loaded back in.

lots you could do down this line, pairing through a structure with a calibration display render patch.

PreviewAttachmentSize
SPK-XYCalibrator.zip31.32 KB

tobyspark's picture
initialisation failed

i'm getting occasional checkerboard viewer when loading the patch containing the wiimote. if its the same issue as spooky was suffering from, could that quick fix be rolled in? installation d-day approaches =]

toby

cwright's picture
granted

WiiMoteControl 20080301 beta - hope this helps :)

initi's picture
hi there, is somehow

hi there, is somehow possible to connect more than one wiimote controller in one time? thx

cwright's picture
beta

There's a newer beta which should allow this (though I've not tested extensively). You'll need to check the "I want to test new and updated patches" box in your profile to get access to it (it's still in beta, and somewhat unstable).

FilipeQ's picture
Re: Release: WiiMote Control, v20080111 (0.3)

Hi

Is there any possibility that i can get the source code for this beta.. I'm trying to extend it funcionalities i would like to get the coordinates of an IR emiter with the wiimote,and it would be nice to have something to build on.

Thanks Filipe Quintal

cwright's picture
Re: Release: WiiMote Control, v20080111 (0.3)

check out darwiin remote -- it's the underlying framework we use for this patch.

FilipeQ's picture
Re: Release: WiiMote Control, v20080111 (0.3)

Ok... i will do that then.. thanks

Giulietta Ravinelli's picture
Re: Release: WiiMote Control, v20080111 (0.3)

so - where exactly are the details about what the [IR X], [IR Y], and [RAW IR] outputs are ??? Even just a heads-up on what that [RAW IR] structure is all about would be nice -Anyone got a link? ( I just spent £30 on a Wii-remote...)

ciao

-giulietta-

cwright's picture
Re: Release: WiiMote Control, v20080111 (0.3)

[IR X] and [IR Y] are a single x/y pair derived from the IR track points. In simple terms, this is the "cursor" position. It's only valid when two or more track points are visible to the wiimote.

[RAW IR] is a structure of up to 4 IR triplets (the track points mentioned above) -- you usually don't need to deal with this, but if you're doing something unorthodox (tracking individual IR points, for example) you might need it. an IR triplet consists of a X coordinate [0-1023], a Y coordinate [0-767], and a S (size) value from 0 to 4 or 8 or something (i don't recall off the top of my head).

Giulietta Ravinelli's picture
Re: Release: WiiMote Control, v20080111 (0.3)

aargh - can somebody give me a walk through on how to get this patch to connect to my new wiimote? I'm starting and stopping the QC composition, I've tried connecting with the Daarwiin remote application, and I've been deleting the device from the buetooth settings panel.,...etc etc - how do I connect the thing??? How do I get QC to see my WiiMote ??? p.s. yes i do have a downstream consumer billboard patch, showing me all the booleans from the Wii +/-,1/2,A/B buttons - and the Darwiin app runs fine...] is there an equivalent to the Darwiin App's "[Find Wiimote]"?? yours in frustration....

-Giulietta-

2009 intel core 2 duo mini, 10.5.6

cwright's picture
Re: Release: WiiMote Control, v20080111 (0.3)

Removal from the bluetooth settings isn't necessary.

in general, try to connect as soon as the composition starts -- if you wait more than 10-20 seconds, you usually won't be able to connect without restarting QC. (This was fixed earlier in 10.5.x, but somewhere around 10.5.5/10.5.6 the bluetooth stack was changed, and it got broken again. I haven't been terribly interested in fixing it).

I seriously doubt darwiinremote "runs fine" -- I just downloaded the app and fired it up. randomly disconnected after half a second. reconnected after a while. Then it wouldn't accept connections again for a while. etc.

the app has some conveniences that the QC plug really can't really handle -- background-threading, for example, is tricky in QC because of how timing can work out. We also can't just randomly fire discovery events with the current model (fixing this requires a fundamental plugin rewrite, and I've been too lazy to deal with this).

In closing, all I can say is that I've had it work reliably for me (motion sensing, IR, and extensions) in 10.4.x, 10.5.0-10.5.6, and it just takes patience and lots of QC-restarts. :/

franz's picture
Re: Release: WiiMote Control, v20080111 (0.3)

Giulietta Ravinelli's picture
Re: Release: WiiMote Control, v20080111 (0.3)

anybody know if this patch will get any values from a Wii-fit balance board? [before i spend £70 i don't have] TIA Giulietta. [this is slightly off topic, i know]

cwright's picture
Re: Release: WiiMote Control, v20080111 (0.3)

it doesn't -- the wii balance board uses a different protocol/controller setup. Eventually I'd like to add this, but the underlying framework is very stale right now. (So don't spend the money unless you want to play wiifit ;)

dust's picture
Re: Release: WiiMote Control, v20080111 (0.3)

OSCulator new version can pair wii fit, then you send the data via midi osc etc...

initi's picture
Re: Release: WiiMote Control, v20080111 (0.3)

hi there, i am just wondering if somebody did quartz composition for wiimote head-tracking using ir led glasses like johnny lee.. ? http://www.youtube.com/watch?v=Jd3-eiid-Uw if yes, is possible to share it, plz? thx a lot

dust's picture
Re: Release: WiiMote Control, v20080111 (0.3)

i have some code laying around some where on my leopard machine that does this. i will look for it a little later i did this for a project last year for interactivity class we where using isadora but i did a qc global midi cc conversion to get the info into isadora so i don't know if it will be much help.

the way johnny does it is he takes the fov of the wii mote creates a right triangle with the center point of the fov - half your y screen dimensions that is supposing the wii mote is on top of your monitor. then uses that trig to figure out rotation. x y and z are pretty simple. just add wii mote IR in patch settings and the use your wii mote backwards and strap the ir bar to your head.

to get a suedo z depth you calculate a distance between the first and last ir. so that is simple when the distance gets bigger that means the z depth is changing when it gets smaller then z is going the other way. you will have to fake it with your own setting or do fancy trig to calculate the real world from fov. i think johnny said he is subtracting 45 from the height of the monitor.

then x and y are simple they are the values you are getting from the wii mote all ready. getting rotation is tricky. once i get a wii mote i will have a patch done up. i am currently doing head tracking with face recognition, and AR but the wii mote can be more accurate once you get the math right.

initi's picture
Re: Release: WiiMote Control, v20080111 (0.3)

yes, i tried it the same with your patch "haarkit" but it's not working properly for me now. i am just beginner,). however, i have the same opinion, it's about f.o.v. of wiimote, which is placed on the center of monitor. tracking ir light in coordination X, Y is easy to do for me, but the problem is calculate the Z depth depending on distance between 2 ir light placed on glasses http://libwiiact.net/images/2/27/Ir_glasses.jpg to make them zooming properly. how to make it??) if somebody has some idea would be great. best. http://initi.sweb.cz//haarkit_cube.zip

dust's picture
Re: Release: WiiMote Control, v20080111 (0.3)

Giulietta Ravinelli's picture
Re: Release: WiiMote Control, v20080111 (0.3)

"but the problem is calculate the Z depth depending on distance between 2 ir light placed on glasses"

@ initi:

assuming your glasses are perpendicular to the wiimote camera axis, you can use simple trigonometry . You'll need to measure the field-of-view angle of the wii camera both horizontally & vertically and find out the corresponding integer values returned at the horizontal & vertical edges.

knowing this you can work out the angle bisected by the two led points.

Then measure the real distance in cM between the two ir-leds on your glasses. an inverse-tangent should do it from there. kinda. ;-)

http://en.wikipedia.org/wiki/Trigonometry

ciao

-G-

Installation Instructions

Place the plugin file in
/Users/[you]/Library/Graphics/Quartz Composer Patches/
(Create the folder if it doesn't already exist.)