Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Generating an mp3/wav/ogg Waveform using Java

Like soundcloud and zippyshare1, how can I generate an audio waveform image using java? are there any frameworks or open source libraries available for such case?

I wanted to generate an audio waveform as an image, and upon loading a track, the waveform image with will be loaded.


  1. enter image description here
like image 645
user962206 Avatar asked Nov 03 '12 12:11

user962206


2 Answers

Start with this answer. The "further processing.." in this case might be to add each instantaneous value to a GeneralPath, then (scale that path to fit within the painting area and) draw it.

like image 104
Andrew Thompson Avatar answered Sep 29 '22 20:09

Andrew Thompson


Here are two questions with answers on SO:

Java Program to create a PNG waveform for an audio file

How can I draw sound data from my wav file?

I like my answer to the second question the best because it explains how to do it in all cases, but it doesn't give code.

There are lots of other answers, too.

like image 42
Bjorn Roche Avatar answered Sep 29 '22 19:09

Bjorn Roche