Skip to content

Instantly share code, notes, and snippets.

@coderofsalvation
Created December 14, 2014 21:20
Show Gist options
  • Save coderofsalvation/117f27307518b9d1feeb to your computer and use it in GitHub Desktop.
Save coderofsalvation/117f27307518b9d1feeb to your computer and use it in GitHub Desktop.
electribe soxmasterhouse process file
#
# soxmasteraudio electribe configuration file
#
[[ ! -n $CLIP ]] && CLIP="3"
# init fx
LIMIT="ladspa tap_limiter.so "tap_limiter" "-"$CLIP 0.0"
SOXREVERB="reverb 20 50 100 50 60 -3" # reverb %,HF-damping %,roomscale %, stereodepth %, pre-delay ms, wet-gain db
[[ -f /usr/lib/ladspa ]] && export LADSPA_PATH="/usr/lib/ladspa"
[[ ! -f /usr/lib/ladspa/transient_1206.so ]] && echo "please download steve Harris's pluginpack (hint: apt-get install swh-plugins)" && exit
[[ ! -f /usr/lib/ladspa/tap_limiter.so ]] && echo "please download TAP pluginpack (hint: apt-get install tap-plugins)" && exit
process_pre(){
input="$1"; output="$2"; echo "preprocessing"
echo "correcting L/R because of tubes (assuming drums are used)"
sox "$input" "$input.L.wav" remix 1 norm
sox "$input" "$input.R.wav" remix 2 norm
sox "$input.R.wav" tmp.wav gain -1.5 && mv "tmp.wav" "$input.R.wav"
sox -M "$input.L.wav" "$input.R.wav" "$output" norm
}
process_mid(){
input="$1"; output="$2"; echo "processing mid of M/S"
sox "$input" "$output" gain +1 ${LIMIT}
#cp "$output" /tmp/side.wav
}
process_side(){
input="$1"; output="$2"; echo "processing side of M/S"
# super haas stereo?
[[ -n $SUPERSTEREO ]] && {
sox "$input" "$output.haas.wav" highpass 6000 delay 0.07 gain -4 remix 1p-50.5 2
sox "$input" -m "$output.haas.wav" "$output";
cp "$input" "$output";
}
# mute transients and widen everything above 7khz + reverb if specified
[[ ! -n $REVERB ]] && SOXREVERB=""
sox "$input" "$output" ${SOXREVERB} highpass 140 ladspa transient_1206 -1 -1 treble 30 10000 ${LIMIT}
#cp "$output" /tmp/side.wav
}
process_post(){
input="$1"; output="$2"; echo "post processing "
# smear transients + scale limit + normalize
sox "$input" "$output" norm reverse highpass 40 reverse ${LIMIT} norm
# trim off fast transients + normalize again
sox "$output" "$input" ladspa declip_1195 norm
cp "$input" "$output"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment