Separating incoming motion capture data

johndyer's icon

Hi all, I was hoping someone would be able to lend me a bit of expertise. I'm new to Max and have a fairly decent grasp of playing with numbers in PD, but I'm having trouble extracting the numbers I need from an incoming stream of motion-capture data here.

I've attached a screenshot showing what I've got coming in. On the right, you'll see 3D data from Qualisys Track Manager (qtm). I'm currently working with three reflective markers, named "one", "two" and "Object", which you can see repeated in threes in the incoming data. There's also one message labelled "/qtm/data", that I don't think is relevant. The three numbers after the marker names represent the x y and z coordinates (in that order) of that marker. They're being sampled at 200Hz, so I would assume Max is receiving 3d coordinates for each marker at the same rate.

What I'm trying to do is separate those messages by marker name, and then by Cartesian dimension (x, y, z), ideally coming out with nine number boxes (three coordinates for each of three markers). I know the unpack object is involved, but I just can't figure out the right way to use it. I'd really appreciate any advice anyone could offer. Thanks.

stream.jpg
jpg
Scott Fitzgerald's icon

Look at the [route] object.

johndyer's icon

Thanks for the suggestion, I'll try that today and report back.

johndyer's icon

Got it working. At first I didn't understand the difference between the [route] and [unpack] objects, but it makes sense now. Thanks!

stream-2.jpg
jpg
mzed's icon

OSC-route, or the o.dot objects (both from CNMAT) might also be helpful:
http://cnmat.berkeley.edu/downloads/odot

johndyer's icon

I tried that before, but somehow messed up the installation. Thanks for the suggestion though, I think that would probably have been easier if I'd done it correctly.