Created
May 19, 2017 14:36
-
-
Save colin-marshall/c03edfaea3020331d53ec66507cb0d29 to your computer and use it in GitHub Desktop.
zsh command line function that recursively renders a spectrogram for all audio files in a directories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function render_spectrograms () { | |
setopt null_glob | |
for file in **/*.(wav|flac|mp3|m4a|aiff|aif); do | |
outfile="${file%.*}.png" | |
title_in_pic="${file%.*}" | |
sox "$file" -n spectrogram -t "$title_in_pic" -o "$outfile" | |
done | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment