I use the TUIO patch for Pure Data. I would like to assign 8 different fiducial to each volume cursor in Ableton and the Ableton clip launcher. I use loopMIDI and Windows 10.
thanks in advance
-
PD, Tuio, loopmidi and ableton
-
So there's the TUIO <--> Pd communication layer, and the Pd <--> Ableton layer.
My main point of advice is to break the task down -- don't try to handle all of it at once.
The TUIO piece -- I would spend some time [print]-ing messages to understand what are the data coming from the TUIO controller. (I haven't used this patch, so I don't know the data format that a fiducial sends into Pd.)
The Ableton piece -- find out what are the MIDI messages you need to send to Ableton to accomplish the actions you want. Then, test them by hand in Pd by sending those messages to [ctlout] or other MIDI output objects.
At the end of those tests, you should have a clear understanding of the source data from TUIO, and of the MIDI messages that those need to be translated into. At that point, the translation is relatively easy (but, the translation will be hard if you don't have a clear idea of "this message 'xyz, 0.5' needs to translate to controller 58, value 63"). Do the research first, to simplify the final work.
hjh
-
this is the patch, The camera recognizes the fiducials, but I can't assign them to different MIDI values in Ableton. That is, each fiducial controls the same fader in Ableton.
-
@Wabot03 said:
this is the patch, The camera recognizes the fiducials, but I can't assign them to different MIDI values in Ableton. That is, each fiducial controls the same fader in Ableton.
- I don't have a TUIO, and I don't have the TuioClient object, so I have no idea how it behaves.
- I don't know the MIDI messages that Ableton is expecting.
- And, the patch you sent doesn't show any MIDI output objects, so I have no idea what you've tried.
So all I can do is (to the best that I can figure out from the available information) clarify what you need to do -- but you need to do the research. You need to figure out what are the messages coming from TUIO, and you need to figure out what MIDI messages should go to Ableton.
I can't do that for you. (Maybe somebody else on the forum could.)
TUIO side: I'd concentrate on the updateCursor messages. These are sending four numbers:
- First #: no idea
- Second #: no idea
- Third and fourth #s: X and Y
BTW your unpack should be [unpack f f f f], NOT $1 $2 $3 $4.
You'll need a chain of [route] objects:
[route updateCursor] // input is "updateCursor a b c d"
|
[route ****] // replace **** with a correct value for "a"
| // input is "a b c d"
[route ++++] // replace ++++ with a correct value for "b"
|
[unpack f f]^^ and here you have X and Y.
One of those [route] objects will distinguish the different fiducials. Then you can use many fiducial IDs in the same [route]:
[route 1 2 3 4] etc
But "1 2 3 4" will be different depending on the messages coming from TUIO. I have no visibility into that; you will have to find those numbers for yourself.
Then you need to scale those values on to the range 0 to 127 and send by MIDI.
hjh