Hacker News new | past | comments | ask | show | jobs | submit login

Many years ago I was trying to build a "shot counter" to measure balls fired per second for a college paintball league.

I ended up using sox + some Perl to be able to:

- filter out only the frequency of the gun cycling

- identify the peak amplitude to know when a shot started

- use a sliding window of about 30ms to figure out when the shot ended

- once the above was done, I could count how many shots per second and output it

I even posted the code which you can see here: https://www.pbnation.com/showthread.php?t=3216349&highlight=...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: