Hi,
I want to be able to tap on a specific area of the laptop (Asus) touchscreen and get its absolute position.
I only know objects that give mouse relative position ([mouse_region], [gemmouse], [cursor]...).
One interesting object that could help me is [hid] but I can't test it since it doesn't seem to work on my version of Pd. I'm using pd-extended 0.43.4 on windows 8.1 x64.
Is there a way to make [hid] work ?
Are there other objects which could help me ?
Thanks !
-
Get the absolute x/y position of a laptop touchscreen
-
I think [mousestate] (and other like [cursor] or [mouse_region]) uses relative position: when you move your mouse then raise it and place it on another spot, the position of the cursor on screen doesn't change.
With [cursor] I can detect taps and then control the refresh of the position by tapping but between 2 taps I need to slide my finger to indicate that the cursor has been moved (not my goal).In other words I'm looking for an object that can help me get the position of my finger on the touchscreen, not the position of the cursor on screen.
-
@Adrien Does this work?
You have to click on any open pd window, so you have to have the areas of the screen on which you wish to click as any pd window (including the terminal window, but not the background or any other program. It should report the true "screen co-ordinates though.
tap_dancing.pd
David.
-
@whale-av Thank you. However, I still need to slide my finger. If I tap in two spots of the touchscreen there is no change. I'd like the position of the finger on the touchscreen.
Adrien -
@Adrien Hello again....... you mean one tap.... and then another tap..... same finger? Not two fingers at once?
I have no machine to test with, so please excuse any dumb questions.....
There is a free Android multitouch app that can send osc messages with screen positions. The final solution might be an android emulator on your machine, but you could google around for some other program that will do the same in windows.......David.
-
@whale-av Exactly ! And with one finger (to start). Ok, thank you for the idea.
Adrien -
@Adrien Have a look at TouchDesigner. It can grab screen touch information and send osc messages...... free for non-commercial use........ https://www.derivative.ca/wiki088/index.php?title=Multi_Touch_In_DAT
David.
-
@whale-av From what I read it looks great ! Thanks, I keep you in touch.
Adrien -
You could make a tcl object do this I think