pulse expression function
Returns 1 when a value is within a certain range.
Usage
pulse(value, start, end)
If the value is less than start or greater than end, pulse returns a 0. Otherwise, it returns 1.
Frequently, start and end are frame numbers and val is based on the current frame, $F. Using the modulus operator (%) you can set up a pulse that turns on and off repeatedly as the frame changes. For example, to blink on for 5 frames and then off for five frames repeated (i.e. return 1 for frames 0 to 4, then 0 for frames 5 to 9, then 1 for frames 10 to 14, etc.), use:
pulse($F % 10, 0, 4)