Date:2012-03-06 11:28:58 (8 years 4 months ago)
Author:Xiangfu Liu
Commit:f0ff76ceb2e5e43f865aea76f5915fac77de07a4
Message:nanonote-files: add wav2png simple script file

Files: nanonote-files/script-files/usr/bin/wav2png (1 diff)

Change Details

nanonote-files/script-files/usr/bin/wav2png
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

Archive Download the corresponding diff file



interactive