• Post Reply Bookmark Topic Watch Topic
  • New Topic

Getting soundwave from a sound file

 
Eivind Fonn
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a project running in which I need to do some mathematical analysis on a soundwave. And this soundwave needs to come from a file, say, an MP3 one. I have spent the day looking in and out of API's, but everything seems to be built towards _playing_ the sound, which isn't what I want. I want the "physical" wave data.

So before I get a headache I wonder if anyone who has worked with something similar before may know where I can go. Maybe JMF actually got what I want, but I seem to be unable to find it?

Many thanks,
Eivind Fonn
 
Joe Ess
Bartender
Posts: 9361
11
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I haven't looked at JMS in a year or so, but I remember Player objects can have custom Control types which have additional functionality. You can get these controls by calling player.getControls(); (more info here in the JMF guide) You may be able to find a waveform control but I don't know how you'd go from displaying the waveform to getting the actual wave data.
 
Eivind Fonn
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I believe I found a code which works for WAV files:

http://www.cs.princeton.edu/introcs/22inout/StdAudio.java.html
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!