greatest-ape / OctaSine

Frequency modulation synthesizer plugin (VST2, CLAP). Runs on macOS, Windows and Linux.
https://www.octasine.com/
GNU Affero General Public License v3.0
649 stars 18 forks source link

Clicking and dragging envelope points does not work reliably #91

Open kzantow opened 2 years ago

kzantow commented 2 years ago

Describe the bug Hovering/clicking points in the envelope does not always work properly. Most times clicking and dragging a point works, but especially in cases where there are multiple close together with overlapping graphics (like a sustain level of 0 and a short release) the UI does not always select the most appropriate point, or any point at all when trying to edit the envelope.

NOTE: this is sporadic and infrequent when attempting to edit envelopes.

Also NOTE: it appears to work once a point gets the hover style, but hovering over the envelope point with the mouse doesn't always get the hover style, it seems like the left side of the point is where the problem is more likely.

What did you try to do I have not found an exact way to reliably replicate this. Probably the closest is: make the smallest possible envelope (shortest attack, decay, sustain 0, shortest release), attempt to edit the envelope.

Expected behavior The closest point moves when I click and drag within a particular distance.

Software (please complete the following information):

P.S.: I implemented this in my own plugin (STFU: https://zeeks.app/) using a distance formula and found this to be very reliable. I'm happy to share the code/algorithm/approach if that would help at all (it's C++ and just a very simple distance formula).