Hello again,
In my bid to find a no external way for mouse control with only click and change events from structs.
And in my efforts to produce a knob replacement I've came up with this ydrag.pd, which is an abstraction but alas rises to the top and obscures the knob graphics.
But when amalgamated into the same struct as what may be my knob replacement gridknob-wip.pd it seems to work quite well.
the ydrag.pd is actually 10 polygons
each is a 20x20 unit square wave shape 200 units wide (-100 to 100) and stacked at 20 units on top of each other (-100 to 100). keeping point 0,0 at the middle which helps when scaling.
lots to still do and again thanks to @ingox and @jona for the matrix idea.
-
No mouse external - some success
-
So here is my answer to my previous post
struct-polygon-circle.pd
it seems compatible with all pd varieties and creates a reasonable circle (nice in purr data) and of course you only need to copy/pasted the resulting polygon data into a template subpatch with a struct containing the same float px/float py variables for it to show up in the graph.
So I will use this method for my rotary knob widget that should work in any pure data variation -
And this is were I'm up to with the knob widget
gridknob-wip.pd@jancsika a minor problem in purr data when scaling via a donecanvasdialog message in win10-64bit is a change to edit mode
-
@Balwyn Amazing und so very creative work!
There is a method to prevent nodes from being dragged. Get the array on click and set it with the original values on change. i used this method in pixelgrid.pd to get the change values and afterwards set the pixel back. But this is work for the CPU (even more for a whole array), your method is much cleaner and more elegant. Also i guess that the addition/deletion of nodes cannot be prevented with the plot method.
I like your grid very much, just want to add that for a knob with min/max values, it can also be done with a regular vslider as @Jona suggested to me: gridknob-wip_slider.pd.
What vslider can't do is the endless knob in your first version (and getting both x and y offset of course). And it is great and amazing to see that it is entirely possible with structs!
-
@ingox, I had to smile at the slider idea https://forum.pdpatchrepo.info/topic/10146/scalar-knob
-
@balwyn i didnt remember that it was your idea but i remember the scalar knob thread. i thought it can be useful if you want to use a lot of knobs in a patch, because the more polygons you have the longer it takes to close the patch. still, i like your solution very much, and for an endless knob for example i think your solution is the best way to do it in vanilla.
-
Just for fun: an endless y-pad based on a vslider
ypad.zip
-
@ingox nice
-
here is a bit of an update of the knob widget, which is not yet a fully working widget, but does input and output 0-100 so could be used in a sub-patch with messages as properties and math for range. Its not the prettiest circle but colour and thickness help.
gridknob-wip.pd
g-knob-help.pd
Then getting even more sidetracked I realised concentric circles of polygons offered the same mouse events as the grid and in fact would only need as many as the radius/10 would require. But pushing the limits I offer this. Warning it does get quite loud, and has visual hints of Daleks
radiant-knob.pd
radiant-knob-dance.pd -
@balwyn i like the knob dance and the custom layouts of the knob.