Re: Audio File to Graphic Thumbnail in Command Line?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I dug into this a bit more.

Getting the time & amplitude data out of the WAV file was easy with

  sox file.wav -t dat - | tail -n +3 > file.dat

My beloved xgraph is not available on Fedora anymore.  That made me 
relearn gnuplot, a good move regardless.  I wrote a script to build
a gnuplot input file, file.gpl, which contains something like

  set terminal png notransparent nocrop
  set output file.png
  plot [] [-1:1] "file.dat" with lines

Then I run gnuplot on its input file like so

  gnuplot file.gpl > file.png

I left out a lot of housekeeping related to my scripting.  But, the
above does all of the work needed to produce a nice graph of my audio 
files.

Of course, this isn't fast.  It takes about 4 minutes on my
3.4GHz i7 with 16GB of RAM to create a plot from a 0.5GB mono WAV
file.  Audacity and Ardour are faster than sox + gnuplot at creating
their waveform views.  But, I can script with sox + gnuplot.

I hope this is useful for someone trolling the archive someday.

Cheerio...

--
Kevin


_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user




[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux