November 19, 2015
January 28, 2017
Yes, you can do this with the RackAFX GUI Designer for knobs or sliders that are connected to UINT variables for a "clicky" switch-like behavior. This only works for the UINT connected controls, where switch-like behavior would be acceptable. The way to do that is to set the CustomView attribute for the knob or slider in question. These are built-in CustomViews, one for each control:
Knob - set the CustomView attribute to "KnobSwitchView" (no quotes)
Slider - set the CustomView attribute to "SliderSwitchView" (no quotes)
I first implemented these built-in CustomViews because the default VSTGUI behavior was to limit knobs and sliders to the range [0, 1] even when the max variable was set to be >1. This caused the knob or slider graphic to disappear when moved past the 1 position (value).
However, this has been changed in VSTGUI4.3 where the knob or slider will take on the switch-like behavior by default, when linked to a UINT variable. So, the CustomView attributes above work for RackAFX, [Make AU] and [Make AAX]. In [Make VST] the CustomView setting is now ignored (starting with RackAFX v6.8.x and above). Use the [Make VST] operation (RackAFX v6.8.x) on any random project, and then search for "KnobSwitchView" in the processor.cpp file. You can see where I've commented out the behavior - I'm leaving the code intact in case something changes in a future version of VSTGUI4.
If you want to implement this behavior in your own "pure custom GUI" (i.e. not using the RackAFX GUI Designer) then you can copy what I'm doing by looking at the CKnobWP and CSliderWP objects that you get when you do a [Make XXX] operation (it doesn't matter which kind of project you export, they all produce the same set of GUI controls). Check the draw( ) method and look for the m_bSwitchKnob or m_bSwitchSlider flag. You will need to either lift my objects directly (I don't care - go for it), or create your own subclassed Knob or Slider objects to implement.
BTW: I should have the new CustomViewsFive project ready for you to look at that works correctly with VST parameter binding, AU Events and AAX parameter queueing, some time over the weekend. I am currently working on the documentation for it - the example project is complete.
Most Users Ever Online: 36
Currently Online: W Pirkle
Currently Browsing this Page:
Guest Posters: 1
Newest Members:Jaggxn, sam, annaharris, Marie Weaver, kev, Steven, Mr Anderson, mguy, omelc
Moderators: W Pirkle: 143
Administrators: Tom: 65, JD Young: 80, Will Pirkle: 0, W Pirkle: 143