Skip to content

Pattern: PCounter

Increments a counter by 1 for each zero-crossing in trigger.

Example output

>>> p = PCounter(PImpulse(4))
>>> p.nextn(16)
[1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4]