-
whale-av
@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.
-
whale-av
@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.
-
whale-av
@didipiman [list-replace] is a vanilla abstraction from the list-abs library, and contains other vanilla abstractions from the same library.
If you need the OSC messaging then I can upload stuff later, although the MrPeach library should get that going.
Here is what I have, and with [comport] installed it should work. There are bits you will not need. Open [dmx] and click "voir la console" .......... dmx.zip
David. -
whale-av
@didipiman This is a patch I made for vanilla for use at home with the Enttec Pro, but is missing some libraries on my system..... I might get some time to check what is missing later..... it definitely needs [comport] and anything else missing might be from "iem" or "list-abs" libraries.
Mine_dmx-home_vanilla.pd
David. -
whale-av
@didipiman What are the others? Maybe upload your patch to be checked?
David. -
whale-av
@didipiman [resample] as an abstraction........ resample.pd
[init] used to load parameters on [loadbang] and it will be possible to replace that with a [loadbang] of messages to initialise the patch as it is loaded.
David. -
whale-av
@Oscillcreate [pack] will hold the values it last received and output them again if you bang the left inlet.
But the error might come from the [1 $1( message box if you are not sending it a value that $1 requires.
So ....
Although the bang inlet could go directly to the left inlet of [pack] in the screenshot below.
David.
-
whale-av
@gentleclockdivider [sel 1] after [< 61] or [<= 60] probably.
David. -
whale-av
@LaoiseDavern I assume that you meant to type 48000.
A 300ms delay is much more than should be necessary, and 80ms should be sufficient with an onboard soundcard. 44100 should work properly.
What is your operating system?
Is the driver for the soundcard correct?
Any other information that you can give? Pd version etc.
David. -
whale-av
@Oscillcreate You can set a slider using the set message [set $1( in place of the direct feedback, but I am not sure that will do what you want as the counter is still running.
If you need more help then please upload the patch using the up arrow above the box you are typing into.To keep patches tidy you can use sub-patches to hide parts, or if you have a part that you are copying many times abstractions are great.... especially if you change something as you can change them all at once.
However it is a bit of a learning curve to start using abstractions effectively...... https://forum.pdpatchrepo.info/topic/9774/pure-data-noobYou can also use messages via [send] and [receive] instead of cords, and GUI's like the slider can have send and receive addresses assigned in their "properties" page.
David.