CNMAT / Music-and-Computing

Materials built for MUS158A, MUS158B (B is only io area of patchers)
Other
6 stars 3 forks source link

basic-multitouch-canvas.jzml does not output freshest state #72

Open equilet opened 7 years ago

equilet commented 7 years ago

I'm not sure if this is an issue with packing up OSC data on the lemur side of things, but when I lift my hands from the ipad and place a single finger back on, I would expect for the /touch/move/x array to be cleared albeit the first finger, e.g., [0.5, 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]

ramagottfried commented 7 years ago

If I remember correctly there are /touch/move /touch/down and /touch/up values (or some names like that) -- so the /move/x seems ok to me, i.e. the last move was the first finger. Keeping the last item helps with tracking movement relative to start or previous end points.

the /pressure or /fingerwidth (I forget the name exactly), and then /finger_stack values tells you which fingers are currently down.

equilet commented 7 years ago

The issue is that the array contains stale data from prior touches/moves. Not critical at this point, we can look at it together. I'd rather learn something about the lemur system and I have some ideas about interesting alternative ways to relay status anyway; slightly different from the model used here.

ramagottfried commented 7 years ago

actually, the values themselves are the most recent positions but the type of position changes (down/move/up). I thought it could be interesting to have all three values for when you lift your finger, you'd have the start point, last move point, and up point and could do something with that.

so, the old state info you're seeing is not actually in the jzml part of the system, it's the o.union loopback update patch that stores all the different movement types. they have different addresses so you can keep them separated easily.

equilet commented 7 years ago

Ah, gotcha. That's great - I can (have already) account for it in my update for the course this week, and we can look for a best practice regarding o.io when we catch up.