bpm-tools/bpm-graph

20 lines
297 B
Plaintext
Raw Normal View History

2011-12-11 16:40:50 -02:00
#!/bin/sh
#
# View graph of BPM analysis
#
set -e
if [ -z "$1" ]; then
echo "Usage: $0 <file>" >&2
exit 1
fi
set -u
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
2011-12-11 16:40:50 -02:00
gnuplot -p -e "set style data lines; plot \"$TMP\""