#!/bin/bash # # Date: 2009-11-30 # Author: Ole Kristian Lien # License: GNU General Public License # # Creates a audio spectrogram EXT=`echo "$1"|awk -F . '{print $NF}'` NAME=`basename $1 .$EXT` if [ -z "$1" ]; then echo "Usage: $0 " exit 1 fi echo -n " * Generating spectrogram..." sox $1 -n spectrogram mv spectrogram.png $NAME.png echo -e "OK!"