Skip to content

Aarav2709/SpankLaptop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpankLaptop

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

Features

  • 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

Installation

Install from crates.io:

cargo install SpankLaptop

Then run:

spanklaptop

To update later:

cargo install SpankLaptop --force

Usage

Interactive mode

spanklaptop

Run with a mode

spanklaptop --mode sexy
spanklaptop --mode halo

Options

--mode

Selects the sound pack used when an impact is detected.

Examples:

spanklaptop --mode pain
spanklaptop --mode sexy
spanklaptop --mode halo

You can also point to a custom directory:

spanklaptop --mode ./sounds/custom

--min-amplitude

Sets the minimum amplitude required to trigger a sound.

Higher values make the detector less sensitive.

spanklaptop --min-amplitude 0.6

--cooldown

Minimum time between triggers in milliseconds.

spanklaptop --cooldown 600

Sound Packs

Audio 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

About

Make your laptop whine, while you beat it!

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages