How do I extract OSC information from KVL_Kinect_Tracker

    Feb 12 2013 | 5:45 pm
    Hello everyone, I'm planning on using the KVL_Kinect_Tracker for a school project to sonify space and I am having trouble getting the OSC data from the tracker into MaxMSP so I can sparse out the data. I'd like to separate x, y, and z axises so that I can perform various effects with that information. It would be great if you could help! Thanks

    • Feb 12 2013 | 5:55 pm
      You have two options:
      1) open the KVL patchers within Max and use a [receive] and [route]:
      2) use OSC with a [udpreceive] and [route]:
      For the second option, be sure to edit the 'kinect_tracker_config.json' to include your OSC destination in the clients list:
      {"" : 7300} - send messages locally via port 7300 {"" : 8080} - send messages to any other IP/port
      Make sure you turn on OSC sending with the textbutton included in the interface, and use [unpack] or a $1 etc. message box to parse the data after the [route] object.
      I used this for a project recently, sending the data from one machine to another with no problems, let me know if you have any other issues.
    • Feb 12 2013 | 7:18 pm
      Hi asgsound,
      I'd recommend running it as a standalone (Medd's 2nd option). Edit the client ip and port you want to send to in 'kinect_tracker_config.json' (again as Medd wrote). If you want to run the KVL Kinect Tracker on the same machine as you're doing your max patching, just use "" is the ip (use the quotes), and any port you want to listen on.
      Let's say you're sending to port 7300. You'll receive a variable length list in multiples of 6 elements, depending on how many blobs are detected by the tracker.
      -where i and j are in pixel space - x, y, z are in real space (dist in meters)
      After routing the OSC url (by the way you can alter this url in the JSON config file), you need to pass the list through a [zl iter 6] to chop it up into chunks per blob. Then use unpack, route, zl, etc. to get the data you want. Here's an example:
      If you want to run the tracker as a max patch, you can receive information as done above, or you can just receive via [r kinect.blobs], as Medd showed in his first example. All this is described in the info.rtf file that comes with the tracker, btw. Hope that helps.
      best, Zachary
    • Feb 12 2013 | 8:34 pm
      Awesome, thanks for the help guys. I will test out both options tomorrow to see what works best for what I'm doing.
      best, Alex