Hi youaresound thanks a lot for your reply and sorry it took me so long to answer.
I'm working with Pd 0.48.1 vanilla, the other changes were simple externals through deken.
I have tried better your colibrí patch, it's very good and useful. Thank you for sharing.
I want to click on a gop slider and move it, but I don't need it either, more out of curiosity, so I'll be trying things out or looking for alternatives.
Some years ago I made a patch for something similar.
It's not very well done, but it works. You can adapt it to your needs.
It works with [shell] and xdotool, like mentioned above.
Thank you both for your suggestions. I will try them this afternoon.
I usually use [shell] with xdotool to move the pointer to the position I indicated, but I was curious if there would be something new and ready to download through deken.
TuioMouse seems to be a better solution than [shell]+xdotool.
I also tried to send mouse messages with Pd-msg, for example [mouse 100 100 0 0 0(, but they didn't worked on the GOP.
Although they did work outside the GOP area. I don't know if I'm explaining it clearly, I sure don't.
Well, thanks again!
This is a patch for use two different mouse on pd at the same time. It's only a simple example, but worked pretty well for me. Expand it with your needs.
It works only with linux (maybe there are alternatives for OS X) because you need two programs; xinput and xdotool. You need also pd working on graphical mode with the X server.
I use [MouseState] for one mouse (the visible pointer) and [hid] for the another (not visible on screen).
Also need modify some things on the patch before run it. First exec "xinput" on the terminal and note the ID number of your second mouse.
Use that number and replace the "your_ID" included on the three xinput messages with it.
This message [xinput float your_ID( makes your second mouse stop controlling the pointer and this another [xinput reattach your_ID 2( make it works again.
Anyway, with that mouse "hide" [hid] continues receiving the mouse coordinates. Try it. Of course, need also search and open your device on [hid] and send [stdbuf -o0 xinput test your_ID(.
I have make this second mouse (the left side of the patch) to work like a relative rotary encoder. Also this method avoid the repeated bangs when using relative x/y on [hid].
The right side part of the patch works with [Mousestate] and the first "visible" Mouse. You need change the sliders properties limits with your screen "y" size (mine is 900, so 899). Then press "Q" and "W" for test it, xdotool makes the work here.
Why I have make something like this? Because I like control a lot of things with the less possible devices (and if they are common devices better) and make randoms, without need adjust the analog usual midi pot every time it change its value, with the imprecision involved.
How I always say, sure this can be done better, my pd skills are very limited, but maybe this patch could be useful for someone.
Ah, don't forget send [killall xinput( before close the patch for stop xinput and avoid problems.
Thanks for reading!
Thanks Gilberto, you are a master.
I add the same patch with a "rotary encoder" simulation, maybe can be useful for somebody.
It works with the "y" coordinates (if needed add another for the "x") and you must change the expr object.
Change it according to your screen size, on the example shows "899" because I'm working with a 1600x900 screen.
Sure the encoder can be done better.
Anyway like real encoders, if you go fast it would not work properly. Better for slow or smooth works with the mouse.