↑
logo

Show HN: Find a song's key and tempo locally, nothing uploaded

Posted by martinhoeller |an hour ago |1 comments

martinhoeller an hour ago

I’m the developer of a music practice app called Pocket Jam. I built this browser tool (with help from Claude) to provide some small features from the app for free in the browser, so musicians can quickly check a song’s key or BPM.

The tool takes a song file (e.g. an mp3) and does onset detection and autocorrelation for tempo and pitch-class profiles with Albrecht-Shanahan key templates for the key. It all runs locally in a web worker with no 3rd party libraries. The file never leaves the user’s device and there is no personalized tracking (just anonymous counts of analyses and failures, no cookies).

I tested it against Apple’s Music Understanding framework on 118 songs from my own library, which were also used to tune the algorithm. The tempo matched on 70% and key on 63%. The most common discrepancy is half or double time. Those scores will probably be lower on songs the algorithm never saw before.

If you are a musician, I’d be happy to hear any feedback about it. Is it useful? Is it accurate enough? Songs it gets wrong are especially helpful.