Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How do I convert PCM data into waveform plots?

807589Jan 1 2009 — edited Jan 4 2009
I am writing a java program to plot the waveform of a .wav file. I understand that the .wav files are in an uncompressed PCM format. So, I read the file and found the start of the data. I am able to pull the data and play it and cut clips out of it and play them; however, when I plot the plot the data, most of the data is above a value of 120 and below the value of -120, on a scale of -128 to 127. This looks like square pulses with minimum fluctuations on the top of the pulses (or bottom for those below -120). I expected it to look more like displays I have seen on oscilloscopes (spiky balls instead of clumps of square waves).

Are there any methods in the javax.sound package that can help me?

Are there some additional computations I should perform on the raw PCM data in the file? If so, what?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 1 2009
Added on Jan 1 2009
4 comments
1,491 views