hi all
i tried the debounce patch referenced here:
https://forum.bela.io/d/882-buttons-giving-multiple-presses
and while that works for most applications, it sends out a bang on the initial state change - and i needed something that would only send a bang after a button is held in the 'on' state for a certain amount of time.
so i put something together, and i thought i'd share.
in the <10ms range it works quite nicely as a 'standard' switch debounce (if you can live with the small delay), but it also has its uses for 'held' button states, where you only want a switch to do something after you hold it down for a couple of seconds or so.
it's simple enough, so i hope a screenshot will do.