I use the TUIO patch for Pure Data. I would like to assign 8 different fiducial to each volume fader or clip laucher in Ableton.
I use loopMIDI to connect pure data to abletonTuioDemo.pd
thanks in advance- i cant understand the unpack f f f f f f f
-
tuio and abelton, send midi
-
@Wabot03 Messing about years ago....... comedy.zip
Open simple.pd
The patch will move a white square on the Gem window for one fiducial.[unpack f f f f f ] does just what its name suggests ...... each float from a list of floats drops from a separate outlet.
So, trying hard to remember..... first there is a [route updateObject] which strips updateObject from the start of the incoming list and rejects messages that start with some other tag (which will come out of its rightmost outlet).
That is because the messages we are interested in start with updateObject (a symbol)
They are in the format .... updateObject a n x y z
So "a" is the session ID, but I didn't need it, so the leftmost outlet of unpack is not connected. Put a [print] on it if you want to know what it is."n" is the object number.... counted from the first fiducial to be in camera shot (starting 0 or 1 I don't remember).
You are going to need that "n".
x y z are xposition, yposition, and angle (rotation) and you might need to scale the values as I have done to suit your midi messages.So....
After [route updateObject] you will need first a [list split 1] to remove "a" and then feed its right outlet to [route 1 2 3 4 5 6 7 8]Each output from that [route] will give you x y z for each fiducial.
Then you need [unpack f f f ] to split out x y z from the remaining list.
David.[object_window] was an attempt (it's not connected in the patch) at smoothing the jittery incoming data and deciding whether to forget fiducials that had gone out of shot for a while. You might need that or something like it.
-
I can assign a different note to each fiducial, but I can't assign each ID's Y of each ID to different ctlout."
exemple:
fiducial 1 ID y axis ->to ctlout1
fiducial 2 IDy axis -> to ctlout2...and so on
-
@Wabot03 Pretty sure this is what you need........
We have to use [list split 1] to remove the sessionID because we don't know what it is (we don't know its value)... so we cannot use [route]
It (sessionID) could be ignored using [unpack] but then the rest of the message would need to be repacked in order to re-associate x y r with the objectID......... and that is unnecessary and a pointless exercise.
David.