mirror of
git://projects.qi-hardware.com/openwrt-packages.git
synced 2024-11-04 23:34:04 +02:00
nanonote-files: add wav2png simple script file
This commit is contained in:
parent
4c4746551a
commit
f0ff76ceb2
14
nanonote-files/script-files/usr/bin/wav2png
Executable file
14
nanonote-files/script-files/usr/bin/wav2png
Executable file
@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
#usage: wav2png.sh file.wav
|
||||
|
||||
BASE=${1%.wav}
|
||||
PNG=$BASE.png
|
||||
WAV=$BASE.wav
|
||||
DAT=$BASE.dat
|
||||
|
||||
#echo $BASE,$PNG,$WAV,$DAT
|
||||
sox $WAV $DAT
|
||||
grep -v '^;' $DAT >$DAT.clean
|
||||
FREQ=`head -1 $DAT|tr -d ';'`
|
||||
|
||||
echo -e "set terminal png;set title '$FREQ';set output '$PNG'; plot '$DAT.clean'" | gnuplot
|
Loading…
Reference in New Issue
Block a user