Last active
January 3, 2023 23:20
-
-
Save pwenzel/faab12e76c05e995ebbf6a751ba14d13 to your computer and use it in GitHub Desktop.
Morphagene Reel Bulk Conversion
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
First install `mgreel` using: | |
npm i -g https://github.com/olt/mgreel |
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
# 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