DigitalWhiteByte ·
Another small example of how to implement a "Mouse Over Area", geometrically customized. 😀
From the original SynthMaker forum (2004–2014), with its members’ names and dates.
DigitalWhiteByte ·
Another small example of how to implement a "Mouse Over Area", geometrically customized. 😀
aliasant ·
DigitalWhiteByte wrote: Another small example of how to implement a "Mouse Over Area", geometrically customized. 😀
SM crashes for me when I try to load this. Maybe you have a Live Audio out thats not compatible with my pc?
MegaHurtz ·
cool 🙂
DigitalWhiteByte ·
aliasant wrote: DigitalWhiteByte wrote: Another small example of how to implement a "Mouse Over Area", geometrically customized. 😀
SM crashes for me when I try to load this. Maybe you have a Live Audio out thats not compatible with my pc?
In this schematic, there is not any primitive external. 🙁 I uploaded it anyway, in the previous post.
DigitalWhiteByte ·
MegaHurtz wrote: cool 🙂
Now the next step, be able to create an algorithm with SynthMaker to obtain the triangulation of a any polygon, so as to have the area of any shape. But on this I would need help of some expert in graphics. 😉 Or a beautiful, new Primitive ... Malc? 😇
MegaHurtz ·
expert graphix guy 😀
aliasant ·
Sorry. After crashing several times and emptying recovery folder.... I realized I had Reaper running in the back.... Not sure why that was a problem but it was. 😊
aliasant ·
I have asked Malc for a primitive before that can output the alpha channel / inversed alpha from a bitmap or the output from eg. Draw Ellipse primitive.
Both would be nice and shouldnt be that hard or? Its quite possible that Im asking for something stupid again since I havnt really thought it thru, as usuall.
There is another way to do that. Just create an image in 2 colors and if the mouse hovers over a pixel that has color "A" then True. Havn tested that yet but Im gonna waste some time on it now.
Oops. Someone already made it for us. It was the "Thumbs Up" if you guys remember that. I cant remember who made it but here is a small mod of it that I had. (I know Im of track but my other option is to do something real like paying a couple of bills.....)
DigitalWhiteByte ·
MegaHurtz wrote: expert graphix guy 😀
do you think this can be a faster algorithm?
http://www.ecse.rpi.edu/Homepages/wrf/R ... npoly.html
int pnpoly(int nvert, float *vertx, float *verty, float testx, float testy) { int i, j, c = 0; for (i = 0, j = nvert-1; i < nvert; j = i++) { if ( ((verty[i]>testy) != (verty[j]>testy)) && (testx < (vertx[j]-vertx[i]) * (testy-verty[i]) / (verty[j]-verty[i]) + vertx[i]) ) c = !c; } return c; }
Argument | Meaning nvert = Number of vertices in the polygon. Whether to repeat the first vertex at the end is discussed below. vertx, verty = Arrays containing the x- and y-coordinates of the polygon's vertices. testx, testy = X- and y-coordinate of the test point.
DigitalWhiteByte ·
aliasant wrote: There is another way to do that. Just create an image in 2 colors and if the mouse hovers over a pixel that has color "A" then True. Havn tested that yet but Im gonna waste some time on it now.
Wow, this system is really simple. 😀 I modded your version a little, to get on or off the area.
aliasant wrote: (I know Im of track but my other option is to do something real like paying a couple of bills.....)
I share your point of view, but do not have any information about any structural SynthMaker update 😝 , then while playing with what we have 😕
MegaHurtz ·
DigitalWhiteByte wrote: MegaHurtz wrote: cool 🙂
But on this I would need help of some expert in graphics. 😉
Ali Tha Man!!
aliasant ·
🙂 Nice.
A simple way to use this on a full build is simply, take a snapshsot of your plugin. Open that image in Photoshop or similar. Make a new layer on top and draw/paint the areas you want the mousepointer to react on and save as a transparent .png. Load that into the bitmap and then hide the bitmap by pressing the Eye icon on the bitmap module.
Perfect mouse area done in less then 2 minutes. I think you should be able to add more areas to that same png by using different colors/area instead of the alpha but I havnt tried that yet.
I think maybe maybe it was my favourite guy mwvdlee that made that module in the first place.
Wrote something here? To have a post removed or your name hidden, write to [email protected].