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?
Thanks
purr data multitouch
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?
Thanks
@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)...
Cheers~
Just looking for a control surface, or something more complicated?
Control surface, exposing my patch for multitouch. Normally I am using mobmuplat for android.
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.
data:text/html;base64,PHN2ZyBzdHlsZT0idG91Y2gtYWN0aW9uOiBub25lOyIgd2lkdGg9IjQ1MCIgaGVpZ2h0PSI0NTAiPjxyZWN0IGlkPSJhIiB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCI+PC9yZWN0PjxjaXJjbGUgaWQ9ImFjIiByPSIxMCIgc3Ryb2tlLXdpZHRoPSIxIiBzdHJva2U9IndoaXRlIiBjeD0iMTAwIiBjeT0iMTAwIiBwb2ludGVyLWV2ZW50cz0ibm9uZSI+PC9jaXJjbGU+PHJlY3QgaWQ9ImIiIHdpZHRoPSIyMDAiIGhlaWdodD0iMjAwIiB4PSIyMjAiPjwvcmVjdD48Y2lyY2xlIGlkPSJiYyIgcj0iMTAiIHN0cm9rZS13aWR0aD0iMSIgc3Ryb2tlPSJ3aGl0ZSIgY3g9IjMyMCIgY3k9IjEwMCIgcG9pbnRlci1ldmVudHM9Im5vbmUiPjwvY2lyY2xlPjwvc3ZnPgoKPHNjcmlwdD4KdmFyIGEgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjYSIpOwp2YXIgYiA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIiNiIik7CnZhciBhYyA9IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoIiNhYyIpOwp2YXIgYmMgPSBkb2N1bWVudC5xdWVyeVNlbGVjdG9yKCIjYmMiKTsKCmEub25wb2ludGVyZG93biA9IGZ1bmN0aW9uKGUpIHsKoCCgIGEuc2V0UG9pbnRlckNhcHR1cmUoZS5wb2ludGVySWQpOwqgIKAgYWMuc2V0QXR0cmlidXRlTlMobnVsbCwgImN4IiwgZS54IC0gMTApOwqgIKAgYWMuc2V0QXR0cmlidXRlTlMobnVsbCwgImN5IiwgZS55IC0gMTApOwqgIKAgYS5vbnBvaW50ZXJtb3ZlID0gZnVuY3Rpb24oZSkgewqgIKAgoCCgIGFjLnNldEF0dHJpYnV0ZU5TKG51bGwsICJjeCIsIGUueCAtIDEwKTsKoCCgIKAgoCBhYy5zZXRBdHRyaWJ1dGVOUyhudWxsLCAiY3kiLCBlLnkgLSAxMCk7CqAgoCB9Owp9OwoKYS5vbnBvaW50ZXJ1cCA9IGZ1bmN0aW9uKGUpIHsKoCCgIGEucmVsZWFzZVBvaW50ZXJDYXB0dXJlKGUucG9pbnRlcklkKTsKoCCgIGEub25wb2ludGVybW92ZSA9IG51bGw7Cn0KCmIub25wb2ludGVyZG93biA9IGZ1bmN0aW9uKGUpIHsKoCCgIGIuc2V0UG9pbnRlckNhcHR1cmUoZS5wb2ludGVySWQpOwqgIKAgYmMuc2V0QXR0cmlidXRlTlMobnVsbCwgImN4IiwgZS54IC0gMTApOwqgIKAgYmMuc2V0QXR0cmlidXRlTlMobnVsbCwgImN5IiwgZS55IC0gMTApOwqgIKAgYi5vbnBvaW50ZXJtb3ZlID0gZnVuY3Rpb24oZSkgewqgIKAgoCCgIGJjLnNldEF0dHJpYnV0ZU5TKG51bGwsICJjeCIsIGUueCAtIDEwKTsKoCCgIKAgoCBiYy5zZXRBdHRyaWJ1dGVOUyhudWxsLCAiY3kiLCBlLnkgLSAxMCk7CqAgoCB9Owp9OwoKYi5vbnBvaW50ZXJ1cCA9IGZ1bmN0aW9uKGUpIHsKoCCgIGIucmVsZWFzZVBvaW50ZXJDYXB0dXJlKGUucG9pbnRlcklkKTsKoCCgIGIub25wb2ludGVybW92ZSA9IG51bGw7Cn0KPC9zY3JpcHQ+
@jancsika Sorry, not asking you to build it for me, but since I'm on Ubuntu 18.04 I have 1 missing deps (libgls2), I am currently too busy to compile Purr Data.
Will get back to you.
Did you install it from here:
https://launchpad.net/~dr-graef/+archive/ubuntu/pd-l2ork.bionic
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.
@jancsika I have an win 10 hp laptop with multitouch and in a chrome browser can indeed move both circles at the same time, if that helps
@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.
@jancsika it works! very very cool.
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!