How to trigger a random integer (1-4) on every audio kick pulse?

Hi everyone,
I am working on an audio-reactive project and I want to trigger a random number between 1 and 4 every time my audio analysis detects a kick.
Instead of counting sequentially (1, 2, 3, 4), I want the output to be completely random on each kick pulse (for example: kick 1 outputs 3, kick 2 outputs 1, kick 3 outputs 4, etc.).
What is the best way to achieve this? Should I use a Count CHOP combined with a Lookup CHOP, or is it better to handle it via a CHOP Execute DAT with Python (random.randint(1,4))?
Any advice or example network layout would be greatly appreciated. Thanks!

hi,

I would go for a noiseCHOP with a countCHOP. This is what naturally comes into my mind but there is not a single way to do it like always…

random.tox (1.8 KB)