Digital Counters

Java Class Name:  VoltageDigitalCounter

Notable APIs:

void SetValue( double newValue );
This sets the number (truncated to an integer) displayed in the counter. If you set it to a number larger than the counter can hold, it’ll display all 9’s.

double GetValue();
 This returns the current value of the counter.

void SetBarsForDigit( int digitIndex, EnumSet<Flags> flags ); 
This lets you turn off and on individual segments of a digit so you can emulate things other than numbers. For instance, here’s the code that Voltage Modular’s MIDI Out module uses to make the MIDI channel selector say “All”:

digitIndex starts from 0 at the rightmost digit and increases from right to left.

To use SetBarsForDigit(), you’ll need to either use the fully qualified name for EnumSet or import java.util.EnumSet:

void ClearBarsForDigit( int digit );
This clears the custom bar art you set via SetBarsForDigit() for a given digit.

Save/Restore State:  Voltage Modular doesn’t save state for digital counters.