I’ve recently heard wireless presenters being referred to as clickers and that gave me an idea.
What if instead of some expensive-ish electronic thing to advance my slides, why not use an actual clicker for this and just have my computer detect the clicker noise?
Here’s a single clicker-press, visible both as the waveform as well as the spectrum:

Observations:
- The clicker noise gets pretty loud instantly
- The noise is over pretty much all frequencies
- The clicker makes a sound both when pressing the button and again when releasing it
Thus, for real-time detection, we simply listen in on the computer’s microphone, and continually do Fast Fourier Transforms on the last couple milliseconds of audio. This yields a representation of the signal in the frequency domain, i.e. we can tell how “loud” certain frequencies are.
Numpy’s rfft, which I used, will return a list of magnitudes, each
corresponding to a frequency (bin).
We’ll consider a sample to contain a click if the magnitude for a majority of frequency suddenly rises sharply. That’s pretty much it!
If the two click sounds happen in rapid succession, emulate a right-arrow keypress, if there’s some more delay, emulate a left-arrow keypress so you can go back through the slides!