-
-
Save dada/9fcd1839edaacc42d7a492e06d317893 to your computer and use it in GitHub Desktop.
split a wav file for import into Caustic PCMSynth.
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
#!/bin/bash | |
BPM=$1 | |
WAV=$2 | |
OUT=$3 | |
SAMPLERATE=44100 | |
SAMPLES="$(expr 60 \* $SAMPLERATE / $BPM \* 32)s" | |
echo "BPM=$BPM SAMPLES=$SAMPLES" | |
sox $WAV $OUT trim 0 $SAMPLES : newfile : restart |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment