summaryrefslogtreecommitdiffstats
path: root/tools/audio_spectrogram
diff options
context:
space:
mode:
authorOle Kristian Lien <ole.k.lien@gmail.com>2009-12-01 06:42:04 +0000
committerOle Kristian Lien <ole.k.lien@gmail.com>2009-12-01 06:42:04 +0000
commit0118f00cfc3d3f46fce44584fc0b2079c27db360 (patch)
tree1977ab8208d5ef9b5e684d9c981f470cfdd6c11e /tools/audio_spectrogram
parent4326a42534d68f2dc62ce4d2a19c5df1dd902758 (diff)
added some more scripts
Diffstat (limited to 'tools/audio_spectrogram')
-rw-r--r--tools/audio_spectrogram18
1 files changed, 18 insertions, 0 deletions
diff --git a/tools/audio_spectrogram b/tools/audio_spectrogram
new file mode 100644
index 0000000..de0685a
--- /dev/null
+++ b/tools/audio_spectrogram
@@ -0,0 +1,18 @@
+#!/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 <audio-file>"
+ exit 1
+fi
+
+sox $1 -n spectrogram
+mv spectrogram.png $NAME.png