Calling the function er(k,n,s) (defined in the script) will return true if the the Euclidean rhythm with k hits and n steps has a hit at step s.
The script is set up to advance 4 different looping counter variables every time it receives a clock pulse at input 1. Every time each counter advances, the er function is called to check if the corresponding Euclidean rhythm has a hit at the counters current step value with the channel’s given Euclidean variables. If it does, then that channel’s output jack goes high.
Also, the input[1].change callback is set up such that it does not actually directly set the ASL action/output voltage for each channel when it is supposed to hit; it actually only activates the currently assigned ASL, which by default is a short trigger pulse (configured on the init() part of the script). You could change that ASL action at run time, eg to an envelope generator.