It already has an answer and several comments, I took a quick look at the libraries that were proposed just for curiosity, but unfortunately none of them really does what you seem to need :-(
Don’t look for equalizer
an equalizer has the function of attenuating or emphasizing a specific frequency or a set of them (frequency band), you are looking for a Audio spectrum Analyzer
each processed audio frame is analyzed by Transform that’s the magic.
I don’t know ready-made java libraries, I just know how to do, maybe explaining you can understand the necessary steps.
- You will need to decode your mp3 audio, this process allows you to represent digitally sampled analog signals, that is to say you will have pure audio, you will have all values of the amplitude of the signal sampled in a certain range.
- Concurrently you analyze each piece of audio while it also plays, usually it uses pieces of size with power of two, it simplifies and gives performance gain together with the transform of Fourier, I do not want to get into the deep mathematics, roughly the Urier transform decomposes a signal into spectral components (frequencies).
- With the frequency representation of each sample you must plot or draw the values to achieve the effect you want.
A long time ago I did this algorithm in python to test, it actually has some details about how accurate you want the effect to be, the larger the window passed to Fourier the smaller the order of resolution of the spectral components, but of course this has a computational cost and you will need to decide a window size that is the best cost benefit for your app.
The example you showed just by looking at the graph you can see that it works very well with the low frequencies, but it has almost no interaction with the treble, look at the minute 2:05, starts a voice and the spectrum analyzer has almost no changes, it tells me that the algorithm is only demonstrating lower frequency ranges...
This is certainly possible, but it should not be an easy thing to do.
– Victor Stafusa
I’ve been looking for some library that allows me to do this, regardless of the difficulty that it may present, my project needs this functionality, an already serious name useful even without code examples
– Arthur Silva
I think something from here will show you the way: http://stackoverflow.com/q/2416935/540552 - Don’t focus only on the accepted answer, some of the other answers were written as criticism or suggestion for improvement or alternative due to some problems in the accepted answer.
– Victor Stafusa
I have a lib on github, then if you want to take a look: https://github.com/cleidimarviana/equalizers. but the bars move not according to the sound. Basically it’s a simulation.
– viana