Revise the WorkFlowPerformance example code to include UDP communications with Max.
Audio to Max will have to be accomplished with cables.
Pass the following sorts of data to Max:
X, Y coordinates of events
Timestamps of events
Audio buffer sample number corresponding to events
I think I can pass the timestamp of a drawing action as a packet along these lines:
eventcue, timestamp, {reduced point set}, timeoffset
eventcue = a character token, e.g., 'd'
timestamp = number in milliseconds
reduced point set = {(x, y, sample)}
timeoffset = time in milliseconds from beginning timestamp
Curly brackets indicate a repeating format. The data passed is the reduced pointset created by the RDP algorithm after the drawing in completed. Drawing starts with a mousePressed event and ends with a mouseReleased event. The points are dense to begin with, RDP thins them out. I don't think it would be easy to timestamp each reduced point. Leave that for a future exercise. I suspect that the unreduced points, which can be timestamped, will be too dense a set to be particularly useful. I can pass the duration of a drawing action, which is the final timeoffset value. The first timestamp value is mostly of use for ordering a set of drawing action data packets.
Bezier curves can be passed in a similar way, using the timestamp and timeoffset from RDP pointset. Pointsets for Bezier curves are points along a polygon representation of a curve.
This is not a trivial problem, but I also don't think it's particularly complicated either.
Bezier curves can also be represented as objects available to trigger, but this can get complicated as they wink in and out of existence.
To Do Oct 25, 2024
I think I can pass the timestamp of a drawing action as a packet along these lines:
Curly brackets indicate a repeating format. The data passed is the reduced pointset created by the RDP algorithm after the drawing in completed. Drawing starts with a mousePressed event and ends with a mouseReleased event. The points are dense to begin with, RDP thins them out. I don't think it would be easy to timestamp each reduced point. Leave that for a future exercise. I suspect that the unreduced points, which can be timestamped, will be too dense a set to be particularly useful. I can pass the duration of a drawing action, which is the final timeoffset value. The first timestamp value is mostly of use for ordering a set of drawing action data packets.
Bezier curves can be passed in a similar way, using the timestamp and timeoffset from RDP pointset. Pointsets for Bezier curves are points along a polygon representation of a curve.
This is not a trivial problem, but I also don't think it's particularly complicated either.
Bezier curves can also be represented as objects available to trigger, but this can get complicated as they wink in and out of existence.