clone45 / voxglitch

Modules for VCV Rack
GNU General Public License v3.0
98 stars 16 forks source link

Groovebox allows manual MEM selection when CV is attached #198

Closed jimallman closed 1 year ago

jimallman commented 1 year ago

I'm using a sequential switch to send voltages to Groovebox's MEM input, for slight variations in rhythm as a song progresses. I notice that while this is happening, I can still push MEM buttons manually and both buttons will light up. It seems the CV input is still controlling the current MEM slot, since I can click on (and light up) an empty MEM without changing the Groovebox's output.

The next time CV input changes MEM, it notices and dims all other buttons, so that's nice.

I'd be happy with either behavior.

jimallman commented 1 year ago

I will survey some of the (many) existing modules that have CV-or-manual inputs. Maybe there are some UI conventions that keep things clear for the user.

clone45 commented 1 year ago

Thanks Jim! I've been interviewing all day today for jobs, so my brain hasn't been on the modules, but I'll pick things up this weekend and squish some of these bugs.

CV input trumps manual input (but then it should probably block the button LEDs)

This would be my preference! However, I've been running into difficulties when it comes to stopping a custom button from toggling on-click: https://community.vcvrack.com/t/stopping-an-svgswitch-from-switching-on-click/18649

I might have to do something drastic, such as painting an invisible widget above the button that can consume the mouse-click. Yikes. But I'll figure it out!

jimallman commented 1 year ago

I've been interviewing all day today for jobs, so my brain hasn't been on the modules

No worries! I'm just making issues so these bugs don't get lost in the couch cushions.

Good luck with your interviews! Feel free to ignore these until the dust settles.

jimallman commented 1 year ago

This would be my preference! However, I've been running into difficulties when it comes to stopping a custom button from toggling on-click: https://community.vcvrack.com/t/stopping-an-svgswitch-from-switching-on-click/18649

I've been spelunking in the Rack (and GLFW) source code, trying to grok the event system in Rack. As far as I can tell, events only propagate from outer to inner elements (widgets), and never "bubbling up" from inner to outer. So the cleanest approach will depend on how your VoxglitchSwitch widget is actually constructed... Hm, maybe overriding SvgSwitch::onChange would suppress both the state change and the light?

clone45 commented 1 year ago

Hm, maybe overriding SvgSwitch::onChange would suppress both the state change and the light?

It's definitely worth a shot!

jimallman commented 1 year ago

Is there more documentation of the Rack code somewhere? So far I've found source code with almost no comments, and an auto-generated API website that has nothing more. The bare-bones tutorials for plugin development don't go into details like the event system, so it's been slow digging.

I eventually found the start of event recursion -- always from parent to children, with all events being passed in from the hosting GLFW window to a main APP and its properties (essentially our root widget). There's got to be an easier way.

clone45 commented 1 year ago

There is absolutely zero documentation! It's super frustrating. I think that someone wrote a book at some point, but I never took a deep look at it.

clone45 commented 1 year ago

At the moment, I've disabled the MEM selection buttons when a CV is attached. I might circle back sometime to see if I can allow both CV and manual selection, but for now, I'm keeping things simple. :)