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
-
[cyclone/MouseState]
-
Thanks but with [MouseState] the position values change when sliding the finger and not tapping.
For instance if I tap on the upper left corner of the touchscreen and then I tap on the lower right corner (without sliding my finger), I'd like to get 2 different positions. -
@Adrien I think that [mousestate] only provides coordinates when they change and it seems then that a tap does not send them. Does it work if you roll your finger slightly when you tap?
Or maybe if you send a new poll message, or a bang (get current position), to [mousestate] by linking the left outlet of [mousestate] back to its input you will get the information?
David.
-
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