rotagon/beat_detector.sh

14 lines
186 B
Bash
Raw Normal View History

2015-01-01 11:05:40 +00:00
#!/bin/bash
mplayer mus.mp3 > /dev/null &
START=$(date +%s.%N)
> mus.beats
while true; do
read n
END=$(date +%s.%N)
DIFF=$(echo "$END - $START" | bc)
echo $DIFF >> mus.beats
done