Skip to content

Instantly share code, notes, and snippets.

@ritec
Last active August 24, 2020 14:29
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 ritec/b499f2c8555ba7e3c1f2c11d6f6d37ab to your computer and use it in GitHub Desktop.
Save ritec/b499f2c8555ba7e3c1f2c11d6f6d37ab to your computer and use it in GitHub Desktop.
Change format of Audio for Erica Synths Drum Sampler
rmdir ../temp #if there's a temp dir, let's remove it
mkdir ../temp #now make a new temp dir
find . -type d -print0 | while read -d $'\0' subdir; #find all subdirectories
do echo $subdir; mkdir ../temp/${subdir// /}; #and recreate them in the temp dir
done
find . -name "*.wav" -print0 | while read -d $'\0' file; #find all *.wav files to convert
do echo $file; # for each file found
/Users/rcaragol/Downloads/sox-14.4.2/sox -G "$file" --norm=-1 -b 16 -r 48k -c 1 ../temp/${file// /}; #convert to temp directory and remove spaces from filename
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment