Created
May 3, 2020 19:34
-
-
Save FreeApp2014/338197edf804ea92dd162b72b777d1be to your computer and use it in GitHub Desktop.
Resample brstm files using revolution (via ffmpeg)
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
newSR=48000 # The new sample rate | |
currentSR=$(./brstm_converter "$1" | grep "Sample rate" | grep -o -E [0-9]+); | |
currentLoop=$(./brstm_converter "$1" | grep "Loop start" | grep -o -E [0-9]+); | |
newLoopPoint=$(echo "scale=3;$currentLoop*($newSR/$currentSR)" | bc); | |
./brstm_converter "$1" -l $newLoopPoint --ffmpeg "-ar $newSR" -o "$1.new.brstm" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment