HydrogenAudio

Hydrogenaudio Forum => General Audio => Topic started by: bernhold on 2013-03-22 15:12:51

Title: Create waveform images from sound files
Post by: bernhold on 2013-03-22 15:12:51
Hello,

I have a large set of similar sound clips. To analyze and document them, I'd like to somehow "convert" each clip into a visual representation of its waveform. Like convert .wav to .bmp, you get the idea. Do you have any suggestions how to achieve it? I can't do it manually because it's just too many files! 

Many thanks in advance

edit: I found this: http://rg42.org/wiki/sndfile-waveform (http://rg42.org/wiki/sndfile-waveform) , which looks exactly like what I want. However, it's kind of linux-ish. It's not for windows, and you have to compile it yourself, it seems. Sadly, I don't have the knowledge to do this.
Title: Create waveform images from sound files
Post by: phofman on 2013-03-22 16:11:42
Interesting project, thanks for pointing out.

For linux users: official ubuntu package sndfile-tools (any version) does not contain  sndfile-waveform yet. I tried compiling the upstream version https://github.com/erikd/sndfile-tools (https://github.com/erikd/sndfile-tools) and hit quite a few errors. However, the original version at http://rg42.org/gitweb/?p=sndfile-tools.git;a=summary (http://rg42.org/gitweb/?p=sndfile-tools.git;a=summary) works perfectly.

Compilation of course requires the devel packages but the configure nicely lists anything missing, the required dev packages are just "apt-get install ..." away.


Code: [Select]
git clone git://gareus.org/sndfile-tools
cd sndfile-tools/
./autogen.sh
make



I really like the tool, produces great images. Just like the spectrogram generator.
Title: Create waveform images from sound files
Post by: andrew_berge on 2013-03-22 16:27:15
Hmm... I found:
An online solution (https://transloadit.com/demos/audio-waveform/generate-a-waveform-image-from-an-audio-file), which unfortuantely looks like you'd have to do each track individually. Unless you're able to adapt the code.

This post (http://jaganadhg.freeflux.net/blog/archive/2009/09/09/plotting-wave-form-and-spectrogram-the-pure-python-way.html) seems to do it with Python, in case you have any knowledge of that...

Yeah, everything i've found so far requires some knowledge of programming. Do you have any, and if so, which language(s)?
Title: Create waveform images from sound files
Post by: phofman on 2013-03-22 16:58:09
Or you can install ubuntu 12.04 into virtualbox and compile the sndfile tools. It is just several commands
(apt-getting the required packages plus the compilation I listed). Once the binaries are available, it takes just a simple loop in terminal to generate all the images.
Title: Create waveform images from sound files
Post by: romor on 2013-03-22 17:01:09
Related: http://www.hydrogenaudio.org/forums/index....showtopic=74161 (http://www.hydrogenaudio.org/forums/index.php?showtopic=74161)

Windows binary for waveform generator (https://github.com/superjoe30/waveform) (accepts flac, too):
http://db.tt/E08qJQuZ (http://db.tt/E08qJQuZ)

Waveforms can be generated in Python in many ways. Some nice example here: https://github.com/endolith/freesound-thumbnailer.git (https://github.com/endolith/freesound-thumbnailer.git), although audiolab overkill as dependancy
Title: Create waveform images from sound files
Post by: bernhold on 2013-03-23 21:17:31
Awesome, thank you romor. I will have a look at it as soon as possible. For now, I found a solution using a waveform to PNG visualizer written in PHP, from here:

http://www.rchu.nl/2011/09/creating-a-wave...image-with-php/ (http://www.rchu.nl/2011/09/creating-a-waveform-image-with-php/)

I downloaded PHP and ran the script as follows:

php.exe waveform.php infile.wav outfile.png
Title: Create waveform images from sound files
Post by: flein1sopp on 2013-08-28 17:48:07
Windows binary for waveform generator (https://github.com/superjoe30/waveform) (accepts flac, too):
http://db.tt/E08qJQuZ (http://db.tt/E08qJQuZ)

I have searched for the same, but it's hard to find good software for the task. Therefore I have developed a program (based on the work in the quote) that supports drag and drop on the programs icon + you can drop multiple files simultaneously. You can download the program here (http://flein1sopp.com/diverse/flein-wave-english.exe).

This worked for my task and I hope it will work for you/you allready have managed to find another way.
(And yes, I did actually register me on this site just to trying to help you.  ) Greetings from Norway!
Title: Create waveform images from sound files
Post by: icee on 2013-09-01 13:41:54
I've compiled the waveform and spectrogram binaries from sndfile-tools under windows for using with foobar2000.
you can get them here (http://www.hydrogenaudio.org/forums/index.php?showtopic=102495)