Back to projects
active v0.3.5

SlamX

Slap your MacBook and it knows — real accelerometer, no microphone.

A native macOS toy that reads the MacBook's built-in Apple SPU accelerometer over IOKit HID, spots a sharp impact spike, counts it, and plays a sound. No mic, no fake triggers — it reacts to the actual motion sensor, with live telemetry and a calibration wizard so you can see it working.

SlamX live dashboard
Problem

A joke 'slap detector' is easy to fake with the microphone or a fixed trigger. Apple also gives no clean public Core Motion API for the MacBook accelerometer.

What I built

A SwiftUI app that taps the private AppleSPUHIDDevice stream through IOKit HID, with live telemetry (impact, peak, sample rate, raw bytes), Soft/Balanced/Hard presets, a calibration wizard, and local sound feedback.

Result

A genuinely fun toy that's also proof it reads real device telemetry — sensor-only, with no microphone access and nothing uploaded.

Audience

For Mac people who enjoy a weird native experiment wired to real hardware.

Developer setup

source without GitHub CLI git clone https://github.com/jx-grxf/SlamX.git && cd SlamX
source with GitHub CLI gh repo clone jx-grxf/SlamX && cd SlamX
latest release open https://github.com/jx-grxf/SlamX/releases/tag/v0.3.5
download stable macos with GitHub CLI gh release download v0.3.5 -R jx-grxf/SlamX -p 'SlamX-0.3.5.dmg'
download stable archive with GitHub CLI gh release download v0.3.5 -R jx-grxf/SlamX -p 'SlamX-0.3.5-source.tar.gz'
download stable archive with GitHub CLI gh release download v0.3.5 -R jx-grxf/SlamX -p 'SlamX-0.3.5-source.zip'

Highlights

  • Reads the MacBook's Apple SPU accelerometer directly over IOKit HID.
  • Live telemetry: impact, peak, sample rate, axes, magnitude, and raw HID bytes.
  • Sensor-only by design — no microphone access, no audio fallback, nothing uploaded.
  • Calibration wizard, threshold presets, and your own sounds. Built for fun; please don't actually abuse your Mac.