HeadlinesBriefing favicon HeadlinesBriefing.com

Show HN: Crack Turns MacBook Lid into Sound Machine with Swift Audio Engine

Hacker News •
×

Show HN: Crack transforms your MacBook's lid into a sound generator. It reads the built-in AppleHID lid sensor at 60fps to detect minute movements. Variable pitch playback maps lid velocity to sound speed, creating distinct creaks and snaps. The app offers 7 synthesized sounds including haunted cracks, cat meows, and whale songs, all generated in real-time via its lightweight Swift implementation using AVAudioEngine. Under 1 MB and near-zero CPU usage, it runs as a silent menu bar app with no tracking or telemetry.

This open-source tool (MIT licensed) leverages Apple's signed framework, showcasing how macOS hardware can enable creative audio applications. Its real-time processing and minimal footprint demonstrate practical use of the lid sensor beyond basic power management. The absence of a dock icon or windows emphasizes its unobtrusive nature, while the Apple-signed status ensures security and reliability for users.

The technical achievement lies in efficiently translating physical motion into complex audio outputs using native Swift and Apple's audio infrastructure. This project highlights the potential for innovative software to repurpose existing hardware features for novel purposes, offering developers a new perspective on sensor integration and real-time audio synthesis on macOS.