I'm working on a module that would really benefit from having endless encoders for the main functions of it.
Does anyone know if this is possible in the Module Designer? Doesn't appear to be from the docs but I could be missing something.
There are other ways to accomplish it, but call me curious!
Endless Encoders
Re: Endless Encoders
There aren't any endless encoders in the VMD library but you could knock up something yourself.
I'm interested to know why you want them though as endless encoders are generally just a workaround for combining preset functionality with non-motorized hardware controls. In software you can in effect have "motorized" controls so there's no need.
I'm interested to know why you want them though as endless encoders are generally just a workaround for combining preset functionality with non-motorized hardware controls. In software you can in effect have "motorized" controls so there's no need.
-
- Posts: 31
- Joined: Mon Mar 08, 2021 12:28 am
- Contact:
Re: Endless Encoders
I've investigated this a bit with this as well. As Colin said, there are no rotary encoders in VMD. The desire, to answer Colin's question, is to emulate actual hardware. I've seen motorized faders, but I've never seen a motorized knob. I feel like it helps the illusion to mimic actual hardware, but it's just an aesthetics thing.
In any case, the knob control has a SetValue, but there's a catch: calling SetValue seems to trigger Notify/Knob_Changed, which is often not desirable (or at least I've found it to be). I haven't seen an built-in way to turn this off, but I was thinking of a workaround which I had planned to do something like this in a future module:
In any case, the knob control has a SetValue, but there's a catch: calling SetValue seems to trigger Notify/Knob_Changed, which is often not desirable (or at least I've found it to be). I haven't seen an built-in way to turn this off, but I was thinking of a workaround which I had planned to do something like this in a future module:
- Have a class `boolean updatingUi = false`
- Whenever you update the knob, set `updatingUi = true`
- Wrap the `Knob_Changed` handler in an `if (!updatingUi)`
- Set `updatingUi = false` after the knob update is done
Re: Endless Encoders
I've used the update flag technique several times in LSSP to suppress notifications caused by SetValue() but it's a bit messy.
I noticed just a few days ago that SetValueNoNotification() methods have been added to various GUI control interfaces so it's obviously been realised that there was an issue here. I'm planning to go back through my old code and replace the kludges with calls to the new methods to clean things up and hopefully solve a couple of mysterious minor anomalies that I suspect are related to the kludges.
PS I had a Yamaha 01V for a long while and loved the logical functionality of the motorized faders but the actual mechanical implementation was disappointing low-tech. A really nice mixer in every other aspect though, especially at the time.
I noticed just a few days ago that SetValueNoNotification() methods have been added to various GUI control interfaces so it's obviously been realised that there was an issue here. I'm planning to go back through my old code and replace the kludges with calls to the new methods to clean things up and hopefully solve a couple of mysterious minor anomalies that I suspect are related to the kludges.
PS I had a Yamaha 01V for a long while and loved the logical functionality of the motorized faders but the actual mechanical implementation was disappointing low-tech. A really nice mixer in every other aspect though, especially at the time.
-
- Posts: 31
- Joined: Mon Mar 08, 2021 12:28 am
- Contact:
Re: Endless Encoders
Oh indeed, Knob now has a SetValueNoNotification. Well this is useful.
SetValueNoNotification(double newValue, boolean bUpdateGUI)
sets the knob's value in a range from it's min to max values; does not trigger Notify
Re: Endless Encoders
Yeah, good to see useful additions to the API.
However, I hope the use of Hungarian notation is a one off. It's bad enough that the VM API breaks the Java identifier case guidelines but I have a dead serious dislike of Hungarian notation having suffered several years of brain damage working in the crazy world of DirectX.
However, I hope the use of Hungarian notation is a one off. It's bad enough that the VM API breaks the Java identifier case guidelines but I have a dead serious dislike of Hungarian notation having suffered several years of brain damage working in the crazy world of DirectX.
Re: Endless Encoders
I’ll play with some of the ideas mentioned here.
Endless encoders would help in the same way they help on control surfaces- to have there be no upper and lower limit to an interface control, just a series of fixed +/- values depending on the action the user is taking.
Endless encoders would help in the same way they help on control surfaces- to have there be no upper and lower limit to an interface control, just a series of fixed +/- values depending on the action the user is taking.