Hit your laptop. It yells back.
SpankLaptop is a Rust rewrite (for windows and linux ofc) inspired by:
https://github.com/taigrr/spank!
Instead of using an accelerometer (which is present in MacOS), this version detects impacts through microphone vibration and plays a random sound in response.
Making this thing took me like 12-13 hours, with a lot of trial and testing, so I hope you enjoy using this and give me proper feedback as well :D
funniRecording.mp4
- Detects impacts using microphone input
- Plays a random sound from a selected sound pack
- Multiple built in modes
- Custom folder support for sound packs
- Adjustable sensitivity and cooldown
Install from crates.io:
cargo install SpankLaptopThen run:
spanklaptopTo update later:
cargo install SpankLaptop --forcespanklaptopspanklaptop --mode sexy
spanklaptop --mode haloSelects the sound pack used when an impact is detected.
Examples:
spanklaptop --mode pain
spanklaptop --mode sexy
spanklaptop --mode haloYou can also point to a custom directory:
spanklaptop --mode ./sounds/customSets the minimum amplitude required to trigger a sound.
Higher values make the detector less sensitive.
spanklaptop --min-amplitude 0.6Minimum time between triggers in milliseconds.
spanklaptop --cooldown 600Audio files are loaded from a folder corresponding to the selected mode.
Example structure:
audio/
pain/
sound1.wav
sound2.wav
sexy/
sound1.mp3
halo/
sound1.wav
Supported formats depend on rodio and typically include:
- WAV
- MP3
- OGG