Skip to content

Instantly share code, notes, and snippets.

@pwenzel
Last active January 3, 2023 23:20
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 pwenzel/faab12e76c05e995ebbf6a751ba14d13 to your computer and use it in GitHub Desktop.
Save pwenzel/faab12e76c05e995ebbf6a751ba14d13 to your computer and use it in GitHub Desktop.
Morphagene Reel Bulk Conversion
First install `mgreel` using:
npm i -g https://github.com/olt/mgreel
# Generate reels
for dir in (ls); mgreel --out "$dir reel.wav" $dir/*.wav; end
# check durations (should be 2.9 minutes or less, (e.g. 174 seconds or 2 minutes and 53 seconds)
for file in (ls *.wav); echo $file; afinfo $file | grep duration; end
# rename files mg0.wav, mg1.wav, mg2.wav, etc.
num=0; for i in *; do mv "$i" "mg$(printf '%01d' $num).${i#*.}"; ((num++)); done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment