Java Class Name: VoltageKnob

Notable APIs:

void SetValue( double newValue );

This will set the knob’s value. newValue should be within the knob’s min and max ranges.

double GetValue();

Retrieves the knob’s current value.

Notifications: A Knob_Changed notification will arrive in Notify() whenever a knob’s value changes:

Save/Restore State: Voltage Modular automatically saves and restores knob states when users save and load presets. When a preset loads, you’ll get a Knob_Changed notification at startup (just after your Initialize() function has run) for each knob on your module.

Display Values in Percent: If checked, tooltips that display the knob’s value will multiply the knob’s actual value by 100 and display it as a percentage (i.e., if the knob value is 0.5, the tooltip will say “50%”). If unchecked, tooltips will display the knob’s actual value.

Tooltip Units: If you enter text here, it’ll get appended (with an intervening space) to the knob’s tooltip. If you set it to “volts”, for instance, and the knob’s value is 4.2, its tooltip will be “4.2 volts”.

Has Outer Dial: if checked, the knob will have a dial ring around it that changes color to reflect the knob’s current value.

Dial Skin: the skin for said dial.

Ring Levels Start From Center: If unchecked, dial ring colors will progress from min to max. If checked, they’ll progress from center out.

Min, Max, and Default Values: the valid range of values for the knob and the default value for a brand new knob. Max must be greater than Min and Default should be somewhere in the range from Min to Max.

Num Discrete Steps: Set this to a value of two or larger if you want your knob to have a finite number of fixed settings instead of scrolling continuously. If your knob is a waveform selector with sine, saw, and triangle settings, for instance, set Num Discrete Steps to 3, and the knob will effectively act as a three-state switch and only allow you to switch between three possible values. If Min Value is set to 0 and Max Value to 2 in this case, the knob’s value will always be 0, 1, or 2.

Start and End Angles: These specify the angles to which the knob will be rotated when set to its min and max values, respectively. Angles progress clockwise in degrees starting from zero at 12 o’clock (straight up).