Pulse Count Building Block

The Pulse Count building block is used to determine if an ON/OFF value changes a specific number of times within a predetermined amount of time. This can be used for detecting double-clicks, triple-clicks, and so forth.

A Pulse Count building block has one ON/OFF input and one ON/OFF output. The output will turn ON if the input has changed the correct number of times within a certain amount of time.

To configure a Pulse Count building block, set the maximum time between ON values that is allowed, and the conditions that should be used to determine when to turn the output ON and OFF.

The maximum time interval that the building block allows between ON values on the input is indicated under the Time Interval tab in the Inspector window. The interval may be entered directly, or adjusted using the slider. The range of time intervals available with the slider corresponds to the mouse double-click times that are available in the OS X System Preferences.

In the example to the right, the building block will only consider input ON values that occur within 0.5s of each other.


The conditions used to determine when to turn the output ON and OFF are indicated under the Behavior tab in the Inspector window. The output will turn ON after the indicated number of ON values. The output will turn OFF either immediately after it turns ON, or based on the setting in the popup menu:

turns OFF — the output will turn OFF when the input turns OFF

does not change for <time> — the output will turn OFF after the input has remained constant for a certain amount of time

remains ON for <time> — the output will turn OFF after the input remains ON for a certain amount of time

remains OFF for <time> — the output will turn OFF after the input remains OFF for a certain amount of time

The times given in the popup menu will be the same as the current time interval assigned under the Time Interval tab.

In the example to the right, the output will turn ON after the input has turned on two times. The output will turn OFF after the input has remained OFF for 0.5s.