I would use #mouse to match the internal send names like #notein, etc. :)
Actually, you can receive messages to [notein] using [r #notein] so I could imagine a similar set of mouse objects which work in the same manner ala [mouseup], [mousedown], [mousemove], & possibly [mousedrag]. We can look into the code on those objects and replicate how they work to avoid the missing receiver name.
Honestly, this should be something built in however I would first make sure there isn't any sort of major performance penalty (probably not). Chris's comment about "in 2019" is spot on...
On Mar 15, 2019, at 11:06 AM, pd-list-request@lists.iem.at wrote:
From: Jean-Yves Gratius <jyg@gumo.fr mailto:jyg@gumo.fr> To: pd-list@lists.iem.at mailto:pd-list@lists.iem.at Subject: Re: [PD] In 2019 is there a way to detect mouse down/up? Message-ID: <cc397066-5e73-1e69-5c7e-d55713c4d275@gumo.fr mailto:cc397066-5e73-1e69-5c7e-d55713c4d275@gumo.fr> Content-Type: text/plain; charset="utf-8"; Format="flowed"
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"
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
On 15/3/19 6:30 pm, Dan Wilcox wrote:
Chris's comment about "in 2019" is spot on...
This was intended to convey my ignorance of Pd's progress rather than any kind of criticism.
Cheers,
Chris.
I extrapolated your comment.
It's one of those reoccurring issues that I think we should simply resolve. The mouse functionality is already built in so it's not like we have to overhaul Pd's internals for this...
On Mar 17, 2019, at 4:30 AM, Chris McCormick chris@mccormick.cx wrote:
On 15/3/19 6:30 pm, Dan Wilcox wrote:
Chris's comment about "in 2019" is spot on...
This was intended to convey my ignorance of Pd's progress rather than any kind of criticism.
Cheers,
Chris.
Sign up to my newsletter to hear about tech I'm building. https://mccormick.cx/subscribe
Dan Wilcox @danomatika http://twitter.com/danomatika danomatika.com http://danomatika.com/ robotcowboy.com http://robotcowboy.com/
how do we set the mouse refresh rate so that there is not an overload of gui object checks(when you build fancy UI) to cause holes in the realtime audio comming out the speakers in 2019?
there is not an overload of gui object checks(when you build fancy UI) to cause holes in the realtime audio
in such case you might consider using seperate Pd processes for the GUI and audio part. what you actually want is *no* gui object checks during realtime audio computation ;-)
Gesendet: Montag, 18. März 2019 um 16:42 Uhr Von: "Billy Stiltner" billy.stiltner@gmail.com An: "Dan Wilcox" danomatika@gmail.com Cc: "Chris McCormick" chris@mccormick.cx, Pd-List pd-list@lists.iem.at, "Jean-Yves Gratius" jyg@gumo.fr Betreff: Re: [PD] In 2019 is there a way to detect mouse down/up? how do we set the mouse refresh rate so that there is not an overload of gui object checks(when you build fancy UI) to cause holes in the realtime audio comming out the speakers in 2019? _______________________________________________ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
On 15/3/19 6:30 pm, Dan Wilcox wrote:
I would use #mouse to match the internal send names like #notein, etc. :)
Wow, I didn't know about these internal receivers. Here's the full set of them:
~/dev/pure-data:[master]$ rgrep -E '"#[a-zA-Z]{2,}' -o src/ src/x_midi.c:"#midiin src/x_midi.c:"#sysexin src/x_midi.c:"#notein src/x_midi.c:"#ctlin src/x_midi.c:"#pgmin src/x_midi.c:"#bendin src/x_midi.c:"#touchin src/x_midi.c:"#polytouchin src/x_midi.c:"#midirealtimein src/x_gui.c:"#key src/x_gui.c:"#key src/x_gui.c:"#keyup src/x_gui.c:"#keyup src/x_gui.c:"#keyname src/x_gui.c:"#keyname src/g_editor.c:"#key src/g_editor.c:"#key src/g_editor.c:"#keyup src/g_editor.c:"#keyup src/g_editor.c:"#keyname src/g_editor.c:"#keyname
Cheers,
Chris.