Is it possible to read a .wav file into an applet as a float array value from a HTML page? I have a .wav file saved on a server and I would like to be able to manipulate the values of the file from an applet.
What would that float array contain - the pitch over time?
The javax.sound.sampled package has classes for dealing with WAV files; see http://www.exampledepot.com/egs/javax.sound.sampled/Load.html for an example. Some of the involved classes may let you get closer to the audio data.
Yes my float array would contain the amplitude over time ie an array with values between -1 and 1.
My question however is if it is possible to read a .wav file into the applet from a remote server. For example, if I have a HTML page that passes the .wav file as a parameter:
It is possible to get the value of the parameter "number" using the getParameter("number") method. Is it possible to read the contents of the .wav file into a float array from the HTML page?
From an AudioInputStream you can obtain an AudioFormat object, about which its javadocs state "By examing the information stored in the audio format, you can discover how to interpret the bits in the binary sound data." There's also more information on how to go about this.