Hello,
Is there a way in a Pd [vanilla] patch to detect a mouse-down and mouse-up event in non-edit mode? So for example to build a GUI which works like a hardware keyboard key. Pressing it down mean on, letting go means off.
Cheers,
Chris.
On 14.03.19 03:46, Chris McCormick wrote:
Hello,
Is there a way in a Pd [vanilla] patch to detect a mouse-down and mouse-up event in non-edit mode? So for example to build a GUI which works like a hardware keyboard key. Pressing it down mean on, letting go means off.
weirdo keyboard that is used with an arrow that is controlled by a mouse. for hardware keyboards, i prefer [key] and [keyup].
having said that, you can use data-structures to create an area that reacts responds to clicks.
keep in mind that it is not touch sensitive.
gfasdmr IOhannes
Hi,
On 14/3/19 4:36 pm, IOhannes m zmoelnig wrote:
On 14.03.19 03:46, Chris McCormick wrote:
Is there a way in a Pd [vanilla] patch to detect a mouse-down and mouse-up event in non-edit mode? So for example to build a GUI which works like a hardware keyboard key. Pressing it down mean on, letting go means off.
weirdo keyboard that is used with an arrow that is controlled by a mouse. for hardware keyboards, i prefer [key] and [keyup].
Maybe slightly less weirdo on a touch screen.
I won't compromise the aesthetics of what I am building with a hardware keyboard.
having said that, you can use data-structures to create an area that reacts responds to clicks.
Excellent, I did not know that struct outputs a click event, thank you.
I am hoping for some way to also receive the mouse-up event. I will see about a patch to struct.
keep in mind that it is not touch sensitive.
What do you mean by this? It only responds to mouse events and not touch events? Even on platforms where touch emulates a mouse click? This is quite confusing.
Thank you for your time.
Cheers,
Chris.
On 14.03.19 10:42, Chris McCormick wrote:
keep in mind that it is not touch sensitive.
What do you mean by this? It only responds to mouse events and not touch events?
no. that's not what i meant.
it was a(n admittedly stupid) joke on the discrepancy between a mouse-based interface (where you only get a boolean value of whether a button is clicked or not) and the expectation of a (musical) "hardware keyboard" that typically gives you "touch sensitive" data in the form of 'velocity'.
fgamsdr IOhannes
Not the best solution, but you may be able to monitor a slider for value changes to emulate a click-down, click-up situation... so you'd be tricking a click-drag :)
fdch.github.io
On Mar 14, 2019, at 11:02 AM, IOhannes m zmoelnig zmoelnig@iem.at wrote:
On 14.03.19 10:42, Chris McCormick wrote:
keep in mind that it is not touch sensitive.
What do you mean by this? It only responds to mouse events and not touch events?
no. that's not what i meant.
it was a(n admittedly stupid) joke on the discrepancy between a mouse-based interface (where you only get a boolean value of whether a button is clicked or not) and the expectation of a (musical) "hardware keyboard" that typically gives you "touch sensitive" data in the form of 'velocity'.
fgamsdr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
hid can receive mouse information? isn't a vanilla solution, but i'm curious
Em Qui, 14 de mar de 2019 09:33, Fede Camara Halac camarafede@gmail.com escreveu:
Not the best solution, but you may be able to monitor a slider for value changes to emulate a click-down, click-up situation... so you'd be tricking a click-drag :)
fdch.github.io
On Mar 14, 2019, at 11:02 AM, IOhannes m zmoelnig zmoelnig@iem.at
wrote:
On 14.03.19 10:42, Chris McCormick wrote:
keep in mind that it is not touch sensitive.
What do you mean by this? It only responds to mouse events and not touch events?
no. that's not what i meant.
it was a(n admittedly stupid) joke on the discrepancy between a mouse-based interface (where you only get a boolean value of whether a button is clicked or not) and the expectation of a (musical) "hardware keyboard" that typically gives you "touch sensitive" data in the form of 'velocity'.
fgamsdr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management ->
https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
You can receive mouse and mouseup information in Vanilla by using [receive .x55dca8289140], where ".x55dca8289140" is a hexadecimal ID unique to the given canvas. However, the only way I know of retrieving that ID is using [hcs/canvasname], which is back to using externals.
If you accept externals then [iemguts/receivecanvas] is definitely the best way to go. ________________________________ From: Pd-list pd-list-bounces@lists.iem.at on behalf of Jos? de Abreu abreubacelar@gmail.com Sent: 14 March 2019 12:38 To: Fede Camara Halac Cc: pd-list@lists.iem.at Subject: Re: [PD] In 2019 is there a way to detect mouse down/up?
hid can receive mouse information? isn't a vanilla solution, but i'm curious
Em Qui, 14 de mar de 2019 09:33, Fede Camara Halac <camarafede@gmail.commailto:camarafede@gmail.com> escreveu: Not the best solution, but you may be able to monitor a slider for value changes to emulate a click-down, click-up situation... so you'd be tricking a click-drag :)
fdch.github.iohttp://fdch.github.io
On Mar 14, 2019, at 11:02 AM, IOhannes m zmoelnig <zmoelnig@iem.atmailto:zmoelnig@iem.at> wrote:
On 14.03.19 10:42, Chris McCormick wrote:
keep in mind that it is not touch sensitive.
What do you mean by this? It only responds to mouse events and not touch events?
no. that's not what i meant.
it was a(n admittedly stupid) joke on the discrepancy between a mouse-based interface (where you only get a boolean value of whether a button is clicked or not) and the expectation of a (musical) "hardware keyboard" that typically gives you "touch sensitive" data in the form of 'velocity'.
fgamsdr IOhannes
Pd-list@lists.iem.atmailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Pd-list@lists.iem.atmailto:Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
You can receive mouse and mouseup information in Vanilla by using [receive .x55dca8289140], where ".x55dca8289140" is a hexadecimal ID unique to the given canvas. However, the only way I know of retrieving that ID is using [hcs/canvasname], which is back to using externals.
Good information, thanks Liam! Does the Canvas ID change when re-opening the patch or will it remain the same "forever"?
It's the pointer value printed as hex, so it will change (most likely :-)
Gesendet: Freitag, 15. März 2019 um 10:49 Uhr Von: "Peter P." peterparker@fastmail.com An: pd-list@lists.iem.at Betreff: Re: [PD] In 2019 is there a way to detect mouse down/up?
- Liam Goodacre liamg_uw@hotmail.com [2019-03-15 10:45]:
You can receive mouse and mouseup information in Vanilla by using [receive .x55dca8289140], where ".x55dca8289140" is a hexadecimal ID unique to the given canvas. However, the only way I know of retrieving that ID is using [hcs/canvasname], which is back to using externals.
Good information, thanks Liam! Does the Canvas ID change when re-opening the patch or will it remain the same "forever"?
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Not sure it can be considered as a vanilla solution, but you should edit tcl/pdtk_canvas.tcl file and add one line in the proc pdtk_canvas_mouseup (line 216) :
proc pdtk_canvas_mouseup {tkcanvas x y b} { set mytoplevel [winfo toplevel $tkcanvas] pdsend "$mytoplevel mouseup [$tkcanvas canvasx $x] [$tkcanvas canvasy $y] $b" pdsend "MOUSE mouseup [$tkcanvas canvasx $x] [$tkcanvas canvasy $y] $b" } (see attachment)
Then you'll always need to have a receiver (named "MOUSE") in your patch, else you will receive error messages in pd console. If you click on a bang object in your patch, you can then listen to the MOUSE receiver and wait for the message "mouseup"
On 14/03/2019 13:32, Fede Camara Halac wrote:
Not the best solution, but you may be able to monitor a slider for value changes to emulate a click-down, click-up situation... so you'd be tricking a click-drag :)
fdch.github.io
On Mar 14, 2019, at 11:02 AM, IOhannes m zmoelnig zmoelnig@iem.at wrote:
On 14.03.19 10:42, Chris McCormick wrote:
keep in mind that it is not touch sensitive.
What do you mean by this? It only responds to mouse events and not touch events?
no. that's not what i meant.
it was a(n admittedly stupid) joke on the discrepancy between a mouse-based interface (where you only get a boolean value of whether a button is clicked or not) and the expectation of a (musical) "hardware keyboard" that typically gives you "touch sensitive" data in the form of 'velocity'.
fgamsdr IOhannes
Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Hi,
On 15/3/19 5:37 pm, Jean-Yves Gratius wrote:
Then you'll always need to have a receiver (named "MOUSE") in your patch, else you will receive error messages in pd console. If you click on a bang object in your patch, you can then listen to the MOUSE receiver and wait for the message "mouseup"
Thanks, I made a plugin based on this idea:
https://github.com/chr15m/pd-push-and-hold
Install push-and-hold-plugin.tcl into your externals path so that it's loaded at startup. Then you can use the push-and-hold object to connect up a GUI object.
I uploaded it with deken so hopefully it will be available tomorrow.
Cheers,
Chris.
Hello,
On 17/3/19 8:24 pm, Chris McCormick wrote:
Thanks, I made a plugin based on this idea:
I also tried to figure out how to add mouse tracking (down/move/up) to the IEM cnv object but failed. Having those events in non-edit mode would enable users to build more interesting user interfaces directly in Pd. I ran into some of the same complications as Dan.
Cheers,
Chris.
Great stuff.
@ Chris : Thanks for the gui-plugin, good example for learning how they work. Just out of curiosity : do you have a touch screen ?
Jean Yves
On 17/03/2019 13:24, Chris McCormick wrote:
Hi,
On 15/3/19 5:37 pm, Jean-Yves Gratius wrote:
Then you'll always need to have a receiver (named "MOUSE") in your patch, else you will receive error messages in pd console. If you click on a bang object in your patch, you can then listen to the MOUSE receiver and wait for the message "mouseup"
Thanks, I made a plugin based on this idea:
https://github.com/chr15m/pd-push-and-hold
Install push-and-hold-plugin.tcl into your externals path so that it's loaded at startup. Then you can use the push-and-hold object to connect up a GUI object.
I uploaded it with deken so hopefully it will be available tomorrow.
Cheers,
Chris.
On 18/3/19 6:16 pm, Jean-Yves Gratius wrote:
Just out of curiosity : do you have a touch screen ?
No but my Raspberry Pi does.
Cheers,
Chris.
Hello,
Is there a way in a Pd [vanilla] patch to detect a mouse-down and mouse-up event in non-edit mode? So for example to build a GUI which works like a hardware keyboard key. Pressing it down mean on, letting go means off.
Whenever I use Supercollider I am very amazed by its MouseX and MouseY unit generators. I would like to learn about a vanilla solution that can output mouse coordinates in non-edit mode as well. Excuse me if this has been asked before and thank you for any ideas!
On 14.03.19 10:21, Peter P. wrote:
I would like to learn about a vanilla solution that can output mouse coordinates in non-edit mode as well.
For a vanilla solution to get mouse click and motion coordinates see: https://forum.pdpatchrepo.info/topic/10854/xy-abstraction-to-get-mouse-click....
It does not detect mouse up (currently not possible in vanilla afaik) and has a bug when you click in the lower left corner. The bug can be resolved, but i haven't find the time to do it yet.
best, ingo