This Pre-Fab steps up and down through a user pre-set range of integers, with the option to wrap or non-wrap the count. Wrapping means that when you reach the maximum or minimum points the count doesn’t stop. At the maximum it starts decrementing, and at the minimum it starts incrementing.
In non-wrapping mode the count halts at maximum or minimum.
The integer stepping range is set in the Pre-Fab’s properties using the range 0,n Text input plug. The first number does not need to be zero .
Note: The first digit in the count must be lower in value than the second Integer, the prefab will not function with the values reversed or with negative values, and this plug will only update the number of steps set in properties when the audio engine is running.
The Wrap function is a Boolean input, or can be set in the Prefab properties via the Wrap plug.
Note: this plug will only update the Wrap mode when the audio engine is running.
The Increment 3 Module does just that, it steps backwards or forwards through the range specified on the Item List plug the format is:
range minInt, maxInt, for example range 2,22 will step through the range of Integers starting at 2 and ending at 22.
The Patch Memory Text Out and Patch Memory Bool Out modules are required for the Prefab to receive, use, and remember the values set on the range 0,n and Wrap plugs. Without these modules these plugs will not function. There are two Integer outputs, DSP and GUI.
Clickable text labels.
The Image2 modules can be replaced with any GUI module that sends/receives a Mouse Down event. So the layout below will work just the same, but with the added feature that clicking on the Up/Down text labels will also step through the count.
Expanding on the functionality:
By Adding a few more modules we can add more outputs: GUI/DSP Float and DSP Volts.
Note: Even though Float and Volts have decimal places, because our Increment module outputs Integers you will never get decimal places.
Leave a Reply