Root/nanonote-files/script-files/usr/bin/wav2png

Source at commit b6092096d02316ec460d8d9f6bd0b10dee858b11 created 12 years 20 days ago.
By Xiangfu Liu, nanonote wav2png: draw lines instead points thanks jirka
1#!/bin/sh
2#usage: wav2png.sh file.wav
3
4BASE=${1%.wav}
5PNG=$BASE.png
6WAV=$BASE.wav
7DAT=$BASE.dat
8
9#echo $BASE,$PNG,$WAV,$DAT
10sox $WAV $DAT
11grep -v '^;' $DAT >$DAT.clean
12FREQ=`head -1 $DAT|tr -d ';'`
13
14echo -e "set terminal png; set title '$FREQ';set output '$PNG'; plot '$DAT.clean' w l lt 2" | gnuplot
15

Archive Download this file



interactive