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.
-
ok works,
ok midi note ableton 2 ctlout.pd
now i'm trying to connect a fiducial, to an on/off button in ableton -
@Wabot03 You probably need to use the addObject and removeObject messages.
I didn't use them, so I don't know their format.
Please post a print of messages from the first two outlets of [route addObject removeObject updateObject] unless you manage to make the On/off work by using those messages without help.
Hopefully it should be simple.....
David. -
-
@Wabot03 Probably.........
And then of course the toggles connected to Ableton on/off control for each fiducial if it works correctly.
David. -
can't understand, try to connect ctlout to toggle but dosen't on(off on ableton, triyng with sel 1 sel 0
-
@Wabot03 What message does Ablteton need (presumably midi) for on/off?
Maybe you just need to connect the toggle to a [* 127] and then to a [ctlout x]
David. -
I'm sorry, ableton recognize the ctlout 1, ctlout2 ... and the toggle is on and off.
But i can't switch on/off the ableton button (for example mute/solo) doesen't change, is still off -
@Wabot03 You probably have to assign a midi control in Ableton to the control you want to turn on/off.
https://help.ableton.com/hc/en-us/articles/209774945-Toggle-and-Momentary-MIDI-functions
David.