275
edits
(Created page with "= Controlling Max-Msp with The Captury = == UDP == == OSC-Syntax == == Custom Port Configuration == == Subscribe to any Skeleton == == Grabbing the Bone Vector Coordinates =...") |
|||
(17 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
= Controlling Max-Msp with The Captury = | = Controlling Max-Msp with The Captury = | ||
== Overview == | |||
The following tutorial covers the process of connecting Max/Msp (short: Max) with "the Captury" tracking software and explains how use the out coming information. | |||
[[File:overview.png|400px]] | |||
== UDP == | == UDP == | ||
UDP (User Datagram Protocol) is an internet protocol which provides communication which no handshaking. It also let you define which port on the destination IP you want to address. In our case it is used to transmit messages in OSC format. | |||
In Max/Msp you set up an udpsend object. It need two parameters: IP address and port number (e.g.: "141.54.0.1." or "kosmos.uni-weimar.de" and "1065"). | |||
[[File:img01.png|400px]] | |||
== OSC-Syntax == | == OSC-Syntax == | ||
OSC-messages are build up like an path in your PC (e.g.: "/Animal/Dog/Dackel/Colour/ brown" or "/Animal/Dog/Dackel/Amount/ 45"). | |||
Under this path syntax you can send any datatypes (symbol, integer, float as given in the example). This message order is important. Because you can only find what has been sent under the exact path. | |||
You would not search the amount of Dackels under path ".../Colour". | |||
== Custom Port Configuration == | == Custom Port Configuration == | ||
Since we can change the port number on that we want to receive messages (in case you want to split up channels on one machine or distribute messages to different receivers), we can configure the port we want to receive messages on. | |||
In our case we use this feature to tell "the Captury" software where we want to receive any kind of messages. | |||
In Max we can make this work by calling the [udpsend] object with following message: "/configure/port $1" ($1 is the Max syntax style for variables). | |||
[[File:img02.png|400px]] | |||
== Subscribe to any Skeleton == | == Subscribe to any Skeleton == | ||
After we have been setting up the port we want to receive on, we can tell "the Captury" what we want to receive. We are doing this by calling the following message to [udpsend]: "/subscribe/John-Doe/blender/Root/vector 50. 0. 100.". | |||
Since subscriptions will expire after a while, we call this message every 10 seconds. Therefore we use the Max own metronome object called [metro] which will repeat to put out bangs and so trigger the message. The toggle [X] will turn ON the metro. | |||
[[File:img03.png|400px]] | |||
== Grabbing the Bone Vector Coordinates == | == Grabbing the Bone Vector Coordinates == | ||
The [udpreceive] object work the other way around. It can receive messages coming from a specific IP and port. | |||
After [udpreceive] we can route the out coming array of information by using the OSC-Syntax again. | |||
With the [route] object we can exactly determine what branch of the string we want to access, in this case we write "/route/John-Doe/blender/Root/vector" to get exactly what we asked for. Afterwards we unpack the containing floats, which represent the x, y and z value of our subscripted bone. | |||
[[File:img08.png|400px]] | |||
== Using the Data Stream from The Captury == | == Using the Data Stream from The Captury == | ||
In the Max domain - instead of patching cords - we can send and receive data as well. To do this we simply write [send] or [receive] and a unique name, which serves as a kind of address: in our case it is [s x-coord] (s as the short form for send is also possible). | |||
Now we can receive the values that have been sent and use them for very own purposes. In my example I display the data first - to have a kind of overview - to see which direction the information is heading to or where it is coming from. | |||
[[File:img06.png|400px]] | |||
Happy patching! | |||
For questions please contact me: benjamin[.] vossler[at] uni-weimar[.] de |
edits