File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes calulation of amplitude  on each sample number in Audio reading ??? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "calulation of amplitude  on each sample number in Audio reading ???" Watch "calulation of amplitude  on each sample number in Audio reading ???" New topic
Author

calulation of amplitude on each sample number in Audio reading ???

arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
I have a trouble in reading a wav file. Actually i have to read a file and then calculate amplitude in each sampling in an array. Is there any function to calculate amplitude ?
arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
I have to make a graph that compares the amplitude and sample number of a music file. I can use AudioInputStream, AudioFormat, and SourceDataLine to get the total number of samples and all that stuff, and I can get a byte array representation of the file, but I don't know how to go through each sample frame and get the amplitude for each of them. Can someone please help???
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 32599
    
    4
Too difficult a question for "beginning Java". Moving thread.
arun singhal
Ranch Hand

Joined: Oct 25, 2009
Posts: 41
Then please give me any link of forum for solution of this type of problem .....
So that can get out of this type of problem...
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35223
    
    7
This may help if you're using javax.sound.sampled, and this example uses JMF to access individual audio samples.


Android appsImageJ pluginsJava web charts
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: calulation of amplitude on each sample number in Audio reading ???
 
Similar Threads
Audio files
Read wave file in as a float value
Calculating a number in a category
Using java to plot graph for amplitude, frquency , pitch etc of a sound as an input
how to extract the amplitude in the Java Sound API?