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

Source at commit f0ff76ceb2e5e43f865aea76f5915fac77de07a4 created 9 years 1 month ago.
By Xiangfu Liu, nanonote-files: add wav2png simple script file
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'" | gnuplot
15

Archive Download this file



interactive