Skip to content

Instantly share code, notes, and snippets.

@jwatte
Created March 6, 2015 17:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jwatte/5dd89b259eb3f42b54eb to your computer and use it in GitHub Desktop.
Save jwatte/5dd89b259eb3f42b54eb to your computer and use it in GitHub Desktop.
soundstretch wrapper for extracting BMP from MP3
#!/bin/bash
trap "rm /var/tmp/foo.wav" EXIT
mpg123 -w /var/tmp/foo.wav "$1" >/dev/null 2>/dev/null
echo -n "$1 ; "
bpm=`soundstretch /var/tmp/foo.wav -bpm 2>&1 | grep "Detected BPM rate" | sed -e "s/Detected BPM rate //"`
echo "$bpm"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment