Re: [PD] two sliders on top of each other (XY-Controller)?
(Replaying to the pd-list as well.) I have used it with no problems. I believe the -1 is there so you can detect if the mouse is no longer dragging, kind of like active / inactive events. Just add a filter on the output like [moses 0]. I'm not sure why you see errors. At the very least, you should be able to copy and modify the internals to suit your needs. Chris did most of the work already... > On May 13, 2022, at 2:37 AM, Peter P. wrote: > > Thanks Dan, > > this looks promising! Have you tried the abstraction yourself? It seems > it outputs a -1 whenever the mouse pointer has stoppend moving? And it > throws > 1040template-marker: no such template > upon creation... > > cheersz, P > > * Dan Wilcox [2022-05-13 08:31]: >> Not a direct answer but: Try the droidparty [touch] abstraction: >> >> https://github.com/chr15m/PdDroidParty/tree/master/droidparty-abstractions >> <https://github.com/chr15m/PdDroidParty/tree/master/droidparty-abstractions> >> >> It uses data structures to make a draggable xy slider(set), vanilla-only. >> >>> On May 12, 2022, at 7:23 AM, pd-list-requ...@lists.iem.at wrote: >>> >>> Message: 2 >>> Date: Thu, 12 May 2022 13:54:07 +0200 >>> From: "Peter P." >> <mailto:peterpar...@fastmail.com>> >>> To: pd-list mailto:pd-list@lists.iem.at>> >>> Subject: [PD] two sliders on top of each other (XY-Controller)? >>> Message-ID: <20220512115407.oh2xglvqq3a4y...@fastmail.com >>> <mailto:20220512115407.oh2xglvqq3a4y...@fastmail.com>> >>> Content-Type: text/plain; charset=us-ascii >>> >>> Hi list, >>> >>> jus tried if two sliders placed on top of each other could work as a >>> simple XY-contoller. They do not, but more interestingly it is the lower >>> of the two slider that receives the mouse clicks while the upper is >>> visible. Is this intentional? >>> >>> Could GUI objects be transparent in color as well as for clicks in any >>> way? >>> >>> I know about the canvas-objects reporting their positions (and it would >>> be cool if they would report mouse-downs and -ups as well), but don't >>> like the fact that I have to be in edit mode to move them. >>> >>> It seems there is no other vanilla way for xy-controllers then... >>> >>> thanks! >>> Peter >> >> >> Dan Wilcox >> @danomatika <http://twitter.com/danomatika> >> danomatika.com <http://danomatika.com/> >> robotcowboy.com <http://robotcowboy.com/> >> >> >> > >> ___ >> Pd-list@lists.iem.at mailing list >> UNSUBSCRIBE and account-management -> >> https://lists.puredata.info/listinfo/pd-list > Dan Wilcox @danomatika <http://twitter.com/danomatika> danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/> ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] two sliders on top of each other (XY-Controller)?
Not a direct answer but: Try the droidparty [touch] abstraction: https://github.com/chr15m/PdDroidParty/tree/master/droidparty-abstractions <https://github.com/chr15m/PdDroidParty/tree/master/droidparty-abstractions> It uses data structures to make a draggable xy slider(set), vanilla-only. > On May 12, 2022, at 7:23 AM, pd-list-requ...@lists.iem.at wrote: > > Message: 2 > Date: Thu, 12 May 2022 13:54:07 +0200 > From: "Peter P." mailto:peterpar...@fastmail.com>> > To: pd-list mailto:pd-list@lists.iem.at>> > Subject: [PD] two sliders on top of each other (XY-Controller)? > Message-ID: <20220512115407.oh2xglvqq3a4y...@fastmail.com > <mailto:20220512115407.oh2xglvqq3a4y...@fastmail.com>> > Content-Type: text/plain; charset=us-ascii > > Hi list, > > jus tried if two sliders placed on top of each other could work as a > simple XY-contoller. They do not, but more interestingly it is the lower > of the two slider that receives the mouse clicks while the upper is > visible. Is this intentional? > > Could GUI objects be transparent in color as well as for clicks in any > way? > > I know about the canvas-objects reporting their positions (and it would > be cool if they would report mouse-downs and -ups as well), but don't > like the fact that I have to be in edit mode to move them. > > It seems there is no other vanilla way for xy-controllers then... > > thanks! > Peter Dan Wilcox @danomatika <http://twitter.com/danomatika> danomatika.com <http://danomatika.com/> robotcowboy.com <http://robotcowboy.com/> ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] two sliders on top of each other (XY-Controller)?
* Roman Haefeli [2022-05-12 14:42]: [...] > I've learned to appreciate it as a feature. It's counter-intuitive, > because one would expect that what is seen can be manipulated. I see > that aspect. But on the other hand, the current behavior allows for a > lot of neat tricks to create fancy GUI widgets. Like, XY-sliders perhaps? ;) Thanks Roman! P ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] two sliders on top of each other (XY-Controller)?
On Thu, 2022-05-12 at 14:07 +0200, Christof Ressi wrote: > > > but more interestingly it is the lower > > of the two slider that receives the mouse clicks while the upper is > > visible. Is this intentional? > > This is a fundamental issue with Pd's GUI. The first matching object > in > the list receives the event. Since objects are drawn in ascending > order, > the backmost object will receive the event. I find this very > annoying, I've learned to appreciate it as a feature. It's counter-intuitive, because one would expect that what is seen can be manipulated. I see that aspect. But on the other hand, the current behavior allows for a lot of neat tricks to create fancy GUI widgets. Roman signature.asc Description: This is a digitally signed message part ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] two sliders on top of each other (XY-Controller)?
but more interestingly it is the lower of the two slider that receives the mouse clicks while the upper is visible. Is this intentional? This is a fundamental issue with Pd's GUI. The first matching object in the list receives the event. Since objects are drawn in ascending order, the backmost object will receive the event. I find this very annoying, but I don't see how we can change that without breaking a zillion existing patches... Christof ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
Re: [PD] two sliders on top of each other (XY-Controller)?
On 5/12/22 13:54, Peter P. wrote: Hi list, jus tried if two sliders placed on top of each other could work as a simple XY-contoller. They do not, but more interestingly it is the lower of the two slider that receives the mouse clicks while the upper is visible. Is this intentional? yes. for example see the [pd example discrete] in the hslider help-patch. Could GUI objects be transparent in color as well as for clicks in any way? i'm not sure i understand the question. as for transparent colors, it seems there's no definitive answer. canvas-widgets (for lack of a better word) can be made transparent if they have no (fill) color at all (like ordinary [object] boxes), but iemguis always have a fill color (and the color picker has no "no color" either). also iirc, *some* iemguis might actually use the object color to hide things (most notably the vu-meter, although you are probably not talking about that). afaik, there definitely isn't any "alpha" channel available in Tcl/Tk (so no semi-transparency) I know about the canvas-objects reporting their positions (and it would be cool if they would report mouse-downs and -ups as well), but don't like the fact that I have to be in edit mode to move them. nobody does. in any case: i don't really think that the [cnv] is the proper object for this though (it's main purpose is creating solid colored rectangles; and having them respond to mouse interaction, will make them quite CPU-hungry). the iemgui *library* (available via deken, but i don't know whether it still works with recent Pd) has an [iem_event] object that i think does what you want. something like this might be a good addition to Pd-vanilla. It seems there is no other vanilla way for xy-controllers then... data structures, obviously. gfmasdr IOhannes OpenPGP_signature Description: OpenPGP digital signature ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
[PD] two sliders on top of each other (XY-Controller)?
Hi list, jus tried if two sliders placed on top of each other could work as a simple XY-contoller. They do not, but more interestingly it is the lower of the two slider that receives the mouse clicks while the upper is visible. Is this intentional? Could GUI objects be transparent in color as well as for clicks in any way? I know about the canvas-objects reporting their positions (and it would be cool if they would report mouse-downs and -ups as well), but don't like the fact that I have to be in edit mode to move them. It seems there is no other vanilla way for xy-controllers then... thanks! Peter ___ Pd-list@lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list