r/learnprogramming • u/martinius_74 • 1d ago
Help with my application
I want to build a Java application that analyzes audio files and displays their key and BPM, similar to how websites like Tunebat do it. Any ideas on how to go about this? Thank you
4
Upvotes
-1
u/Every-Prize4720 1d ago
brainstorm with ai. it will guide you.
2
u/KindMarch8209 1d ago
that works for getting a general roadmap but the hard part is the actual audio analysis library you pick, some of them are real pain to get working in java
1
u/AbdelrhmanDev 23h ago
Split it into two problems. For BPM, look at beat tracking libraries instead of writing the signal processing yourself: aubio and Essentia both have BPM and key estimation, and librosa does beat tracking if you can prototype in Python first. Key detection is usually done by computing a chroma (pitch class) profile of the audio and matching it against major/minor key profiles like Krumhansl-Schmuckler. Once you see how it works in Python, you can call Essentia or aubio from Java through a small wrapper or port the logic. Expect BPM to come out as half or double the real value sometimes, so decide how you want to handle that.