Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # Accepts a single argument, which is a path to the directory containing all the
- # WAV files generated by a recordings from the X-Live card.
- # Looks for files like 000000.WAV 000001.WAV 000002.WAV etc.
- #
- # Outputs files like Ch01.WAV Ch02.WAV Ch03.WAV etc.
- #
- # Requires sox
- cd "$1"
- shopt -s nullglob # Empty array when no matching files
- wavFiles=(*.WAV)
- echo ${#wavFiles[@]}
- if [ ${#wavFiles[@]} -eq 0 ]; then
- echo "No WAV files found in `pwd`"
- exit
- fi
- echo "Found these wav files: ${wavFiles[@]}"
- for run in {01..32}; do
- echo "Splitting out channel ${run}"
- channel=$(printf "%02d" $run)
- `sox ${wavFiles[@]} Ch${channel}.wav remix ${run}`
- done
- echo "Done."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement