Label graph

This commit is contained in:
Mark Hills 2011-12-18 12:13:30 +00:00
parent 9c5dbc91a0
commit 5e76aed45e
1 changed files with 10 additions and 2 deletions

View File

@ -12,8 +12,16 @@ fi
set -u
FILE="$1"
shift
TMP=`mktemp -t bpm.XXXXXX` || exit 1
trap "rm $TMP" 0
sox "$1" -r 44100 -e float -c 1 -t raw - | bpm -m 60 -x 180 -g $TMP
gnuplot -p -e "set style data lines; plot \"$TMP\""
sox "$FILE" -r 44100 -e float -c 1 -t raw - | bpm -m 60 -x 180 -g $TMP
gnuplot -p <<END
set style data lines
set ylabel "Difference"
set xlabel "Offset (Beats per minute)"
plot "$TMP" title "`echo "$FILE" | sed -e 's:\":\\\\":g'`"
END