@y0g1 The formula for [rzero~] in help means "the output is the difference between the current input and (the previous input times the current coefficient)." Since the coefficient is always 1, it's just the difference between the last two inputs. So since the input is just a square wave toggling between 0 and 1, the output is going to be 1 on the rising edge, -1 on the falling edge, and 0 otherwise. By clipping it to 0..1, I just take the rising edge pulse.
"Convert to negative pulse" means instead of sitting at 0 with the occasional 1 pulse, it now sits at 1 with the occasional 0 pulse.
The formula for [rpole~ 1] in help means ""the output is the sum of the current input plus (the previous output times the current coefficient)." When both the input and coefficient are 0, the output is 0, and when they're both 1, it increments by 1 each sample (i.e. counts samples).
By now you probably know how to understand the formula for [rzero_rev~ 0], let me know if you don't. The reason you need it is so that [samphold~] grabs the highest previous count, not the reset value.