Best addon for reading data from .mp3 with JDK 1.6
I am trying to write a music visualizer. I looked at it and the sound. Sampling looks like a good library for reading data. However, jdk can only download .wav files. So I'm looking for a flexible addon that will allow me to download the .mp3.
The classes I will be using are here: http://uk.answers.yahoo.com/question/index?qid=20100125081723AAdnYzf
PS Lemme knows if you've tried visualizing music before.
source to share
However jdk ..
It's not about the JDK, it's about the JRE.
.. can only load .wav files ...
It can load (a subset of) the return types
. If you check the docs for
in Java 7 you will see a list of 5 types, but the final check is what the JRE is returning.
.. So I am looking for a flexible addon that will allow me to load .mp3.
JMF can be added to the run-time classpath to add support for MP3 decoding to JavaSound. I couldn't find this Jar last time I searched for it, but you can get it from my site at http://pscode.org/lib/mp3plugin.jar
Lemme know you have tried using music visualizers before.
I made this wonderful starry background and thought the stars should twinkle and glow based on the music. Do you find it possible to detect an odd instrument that is playing? How are drums or strings?
I recently broke my own player and is busy with other things, so I use WinAmp to play my favorite tracks and watch some (300+) WinAmp renderings. The reason I mention is because my traces are of two types: "oscilloscope" and "Lissajous" style. Check out the YouYube site linked above for examples of each.
WinAmp OTOH offers many seemingly completely different styles, some of which are closely related to music visually and others that are completely unrelated (just beautiful animations on their own). I believe that those that have a connection to the music (besides representing the track itself - like my software) base their graphics on the loudness of the signal, which can sometimes represent a rhythm.
The correct way to calculate loudness is with decibels (dB), but in my software I implemented a simpler RMS detection algorithm for each channel. You can see these volumes on the Rasputin track.
They are not particularly clear in the (bottom left / right) image, but watch the video and I think you find them easier to see and offer a good basis for the type of pulsating stars effect you are using (a number to multiply the base brightness) ... To make the stars twinkle differently depending on the frequency (e.g. bass is low, violins are high), you will need to look at something like spectral analysis - FFT is one way to do this.
source to share
Javazoom has a library for mp3 format.
I haven't used it myself. But I know others have done it successfully.
Tools for extracting tools from the HAS mix are becoming a reality, but I don't know if they are implemented in Java. I suppose it is possible, but only with considerable effort and limited success at the moment. There are aspects of Java that have to be dealt with that make things like this more complex than they can be in the "C" family language (no real-time guarantees: difference in timing of garbage collection, thread switching).
source to share