I use bonk, adjusting sensitivity with the thresh message and a debounce abstraction based on spigot and delay. I think there’s also an internal debounce message.
I always find Miller's example C07.envelope.follower.pd quite enlightening regarding the hysteresis/state machine logic.
Perhaps one can make sth out of it in the scope of this question! P