I had an e-scooter where a double click on the mode-select button would turn on the light and respond with a little beep. A single click would just switch the mode with no beep. To this day believe that the beep always came before the second click. I tried to trick it by clicking it once and only thinking about the second click — and the beep never came. But once I committed to the second click, I swear it would beep a fraction of a second earlier than that happened. Whatever it was that the button was connected to, it was insanely fast, just immediate. My brain had been so hardwired to expect every human-machine interface to have a delay, that the button responding immediately to the second click felt unnatural, broken, magical, and honestly kind of creepy.
Although this particular trick isn't possible, it is desirable and sometimes you can mimic such features which seem impossible.
I remember at around the turn of the century a friend showed me a neat trick many Sony MD recorders could do, which I think has since been incorporated into many (but IMO never enough) digital recorders: Time machine.
The compression needed for an MD recorder means a PCM buffer is needed, if we run the buffer all the time (after all it's just electronics) some engineer realised that this means you could choose to record audio that happened (and thus was in the buffer) before you actually decided to record it.
When one of the band members drops an instrument & it makes the coolest noise you've ever heard, you have long enough to think "Fuck that sounded so cool" and reach across and hit record and still capture the sound.
It was probably positive edge-level triggered (and debounced) without considering the second release event. It's a common failure of digital interfacing state machine design.
> To this day believe that the beep always came before the second click. I tried to trick it by clicking it once and only thinking about the second click — and the beep never came.
Yep. The shortcut is either to look for down-down or down-release-down, rather than down-release-down-release, but then the UX becomes inconsistent.
Debouncing refers to removing the dozens/hundreds of random momentary conduction events a real physical switch makes just prior to making contact on a human time-scale that are readily visible on an oscilloscope. Without debouncing, momentary switches would be unusable.