Last active
December 1, 2019 14:50
-
-
Save leonidlezner/f53a3abcb71c99815182ad53ac45237a to your computer and use it in GitHub Desktop.
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 | |
# Usage: ./rodecaster_conv.sh POD000131.WAV | |
# Tool sox is needed! | |
# Installation.. | |
# ..under Debian/Ubuntu: sudo apt-get install sox | |
# ..under maxOS using Homebrew: brew install sox | |
function convert() { | |
filename=$1 | |
suff=$2 | |
channel=$3 | |
filename_without_ext=`echo "${filename}"|sed "s/\(.*\)\.\(.*\)/\1/"` | |
mkdir -p $filename_without_ext | |
channel_frmt=`printf "%02d" $channel` | |
new_filename="${filename_without_ext}/${filename_without_ext}-${channel_frmt}−$suff.flac" | |
echo "Extracting channel ${channel} to ${new_filename}..." | |
sox $filename $new_filename remix $channel | |
} | |
convert $1 "Left" 1 | |
#convert $1 "Right" 2 | |
convert $1 "Mic-1" 3 | |
#convert $1 "Mic-2" 4 | |
#convert $1 "Mic-3" 5 | |
#convert $1 "Mic-4" 6 | |
convert $1 "USB-Left" 7 | |
#convert $1 "USB-Right" 8 | |
#convert $1 "TRRS-Left" 9 | |
#convert $1 "TRRS-Right" 10 | |
#convert $1 "Bluetooth-Left" 11 | |
#convert $1 "Bluetooth-Right" 12 | |
#convert $1 "Sounds-Left" 13 | |
#convert $1 "Sounds-Right" 14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment