I have a Surface Pro 3 (very neat device when running linux btw). Pure data runs wonderfully, but lacks the multitouch capabilities. I was wondering if Purr data could be tweak more easily to support this?
@EEight It appears the pointerevents API supports multi-touch events. So at least the GUI toolkit used by Purr Data supports multi-touch.
Probably the most user-friendly way of supporting it would be to add multi-touch capability to Pd's C API. That way you could be sliding a slider while simultaneously clicking a toggle. But adding that functionality happens to also be the most difficult and crash-prone from a development perspective.
Currently, I'm doing an end-run around that C API with data structure events for
[draw]. So I could add a message to that class that supports multi-touch notifications. Then you'd at least be able to draw a rectangle and then pick up multi-touch events inside the rectangle.
If you're interested, put an issue up on the tracker and we can go from there:
@jancsika Super, thanks for brainstorming on this. Looks a bit complex! Let's wait to see if more people ask for it.
In the meantime, I will look for alternative (no idea right now if anyone can suggest a multitouch software for basic GUI (slider, button, toggle etc) with OSC (or any output protocol)...
Just looking for a control surface, or something more complicated?
I took a look at the spec for multi touch. Given the current way I've implemented data structure events I think it's as easy as binding a function callback to three or four event listeners.
I don't have any multi-touch screens. But I can go ahead and implement it and then you can let me know if it's a workable interface.
@jancsika I have a feeling that this feature request won't be that useful:
If others pders are interested then we can buy you a surface, I would definitely chip in ;p
Open stage control
Here's a GUI that I made in 15 minutes yesterday. Works on mobile too (open stage control create a http server).
I'm pretty sure I don't need any hardware to do this. AFAICT it's just a matter of adding a few lines of code for pointerdown, pointermove, pointerup, etc. events and seeing if that meets your needs.
The top row of your example could be implemented in Purr Data using
[draw rect] and two
[draw circle] objects. (Or replace the two circles with one
[draw path].) The other row could be implemented, too, but I'm not exactly sure what they do.
@jancsika Oh, I may not even have to compile a binary for you to test this:
Just use the data url below. You should see two simple rectangles with circles in them. You should be able to touch and drag the circles in each rectangle at the same time.
This is just a test, so there are no bounds on the circles to keep them from extending outside the rectangles.
I'm posting this from a Chromebook with no dev environment, so I can only create a data url for you. You should be able to copy the long line below and then paste it into a url bar of a browser running on your surface tablet. Let me know if that doesn't work.
Did you install it from here:
Regardless, you should be able to paste that data url into any browser on your Surface Pro. Let me know if you can touch in both rectangles at the same time to move around each of the circles.
@Balwyn Thanks, that helps. I think I can indeed just add the new pointer events and get multi-touch for data structures essentially for free.
That's one of the great things about the web-- I can just throw a url up and anyone anywhere can run it and report back. No binaries needed.
You know, one option would be to just replace the "guts" of mousemove, mouseup, drag, etc. with the pointer events API I used in the data url example. Then things may just work for use cases like the one you're describing.
Then I can add fancier methods if people want to also get tiltX, bbox of the digit touching the screen, pointerId, etc.
Oops! Looks like something went wrong!