PD code snippets

I would like to start a topic where we can share/collect snippets of PD code that solve specific issues. This could help other developers who run into a similar issue.
I will start with a solution I had to come up with to create a configurable delay in the data received from a knob/slider, to prevent an overload of data. Thus will prevent my AKAI MPC mini controller to choke when it receives too many note inputs during a specific time span. Following example will only pass a value when the user stops moving the slider/knob for at least 80 milliseconds.:


I hope this is useful for somebody else as well.