SlapMac is deceptively simple on the surface.
Here's what's running under the hood.
Reads the built-in accelerometer at ~12.5 Hz. Five algorithms vote on every impact — so closing a laptop lid, typing hard, or bumping your desk won't trigger it.
Force → Volume
Gentle tap whispers. Full slap goes full blast.
Open or close your lid and it creaks like an old wooden door. Requires M2PRO+.
Plug or unplug any USB device. It moans. Same voice packs, no slapping required.
130+ sound clips across seven built-in packs — plus your own folders as custom packs in Settings.
From "butterfly landing" to "needs a running start". You pick the threshold.
Prevents meltdowns during rapid slaps. Set anywhere from rapid-fire to dramatic pauses.
Menu bar only
No dock icon. Lurks silently.
Volume scales with force
Gentle tap? Whisper. Full slap? Full volume.
Adjustable sensitivity
From "earthquake detector" to "needs a running start".
Cooldown timer
Prevents meltdowns during rapid slaps.
USB Moaner
Plug or unplug a USB device. It moans. You're welcome.
Launch at login
Always ready. Always listening.
Slap counter
Tracks your lifetime slaps in the menu bar. High score pending.
Onboarding
A polite welcome before the chaos begins.
Custom sound packs
Drop in your own folders of clips in Settings. Your MacBook, your samples.
Five signal-processing algorithms vote on every impact. Democracy, but for physical abuse.
High-Pass Filter
Strips out gravity so we only see impacts
STA/LTA Ratio
Compares short-term vs long-term averages at 3 timescales
CUSUM
Detects sudden shifts in acceleration
Kurtosis
4th statistical moment — finds sharp spikes
Peak/MAD
Median Absolute Deviation outlier detection
Architecture
MenuBarExtra (SwiftUI)
└─ SlapController
├─ AccelerometerReader ← IOKit HID, ~12.5Hz
├─ LidAngleSensor ← IOKit, lid angle detection
├─ SlapDetector ← 5 algorithms vote
├─ USBWatcher ← IOKit USB events
├─ AudioPlayer ← AVFoundation
└─ SettingsStore ← UserDefaults