Click here to return to the Counters page
The Counter block can be used with a State Machine to process your input at a particular time interval, in ms. The counter starts from 0 (or any other user-defined value).|
|Max||This is the maximum value for the counter. The value can be changed by clicking in the text field and typing a new value, or by clicking the adjacent up/down arrows. If the counter reaches the maximum value, its output will stay at that value until it is reset.|
|Start||This switch starts or stops the counter. If the counter is stopped in mid-operation, its output value will freeze at its most recent value.|
|Init||This is the initial value of the counter, which is the starting value for the counter when it is reset. Enter the start count value in the Init field, or use the adjacent up/down arrows.|
|Reset||This button resets the counter back to its initial value, set in the Init field.|
|Step||This controls rate at which the counter increments. The counter value will increase by the value in this field at the end of every audio sample. The value can be changed by entering the desired value in the text field or using the adjacent up/down arrows.|
This schematic shows how the Counter (in conjunction with a tone cell) can be used with the State Machine. The state machine block passes signal (green pin to blue pin) only when the Counter's control value to the red pin is between the given limits.