Hello again
I have been puzzled why there are only click and change events reported from structs in run mode and found this quite limiting and ended up using the iemguts and cyclone libraries for mouse events.
Then less than a week ago @ingox uploaded the vanilla xy-pad which explained how to unpack the pointer and when the change event occurred. So after a bit of trial and error and chasing my tail trying to match the x/y co-ordinates with the mouse pointer, I realised that correct co-ordinates were the offset right side of a rectangle. So using this info I then found it hard to click in the right spot to get a reliable change event. I then found that, by using the offset corner as the centre then drawing a cursor box all the way around the centre the cursor responded much better to the mouse change. What also amazed me was the small amount of code required to achieve this.
Cheers
Balwyn
-
xy-pad using only the events from a struct
-
@Balwyn thats great. i was experimenting with ingox with the data structures, and i was inspired by the s-controlsurface patch from the s- abstractions https://github.com/chr15m/s-abstractions/tree/master/trunk which reminds me of your patch. both patches work very well. a problem is that a struct only has a 10x10pixel draggable area, so i didnt manage to build a vanilla multislider which i wanted to (i build one with iemgui). that was a reason why we wanted to build the pixelgrid, to define an area in pd vanilla where we get the mouse position as an output. sadly its very cpu intensive for bigger areas.
-
@Balwyn Great work!
-
@jona What a great resource! Chris McCormick's s-controlsurface is even more efficient (and better)
-
Heres a basic version of our multislider. its inspired by the yv.multislider https://www.mail-archive.com/pd-list@iem.at/msg19705.html and the s-controlsurface. Like i mentioned it uses iem_event from iemgui for the mousetracking.ds_array_test7.pd
-
@Jona I did something similar last year, I've modified to make it vanilla by replacing the [mouseup] event from [receivecanvas] with a constant [metro 200] firing a counter to the number of elements, but that's not really the answer is it?
sliderbank-vanilla-test.pd
sliderbank-vanilla.pd -
here is an update that starts the [metro] when the mouse is clicked, then stops the [metro] after a specified delay
sliderbank-vanilla.pd