Here's the bash script I use to run drc-fir:
Bash:
#!/bin/bash
IMPULSE_FILE="$1"
FILTER_NAME="$2"
CONFIG="$3"
DRC_DIR="/usr/share/drc"
DRC="/usr/bin/drc"
MIC_CORRECTION="$HOME/drc/mic/7032857-mod.txt"
TARGET_DIR="$DRC_DIR/target"
CONFIG_DIR="$DRC_DIR/config"
NFILTERS=8
TARGET_TYPE="pa"
TEMP_DIR="$(mktemp -d tmp.XXXX)"
trap "rm -rf $TEMP_DIR" EXIT
RATE=44100
FILTER_DIR="$FILTER_NAME"
mkdir -p "$FILTER_DIR"
MAX_GAIN=2
RATE_STRING="$((RATE/1000)).$((RATE%1000/100))"
CONFIG_FILE="$CONFIG_DIR/$RATE_STRING kHz/$CONFIG-$RATE_STRING.drc"
TARGET_FILE="$TARGET_DIR/$RATE_STRING kHz/$TARGET_TYPE-$RATE_STRING.txt"
for i in 0 1; do
sox "$IMPULSE_FILE" -t f32 "$TEMP_DIR/impulse.pcm" remix $((i+1)) rate -v -L -s $RATE
$DRC --BCInFile="$TEMP_DIR/impulse.pcm" \
--PSOutFile="$TEMP_DIR/filter_$i.pcm" \
--PSPointsFile="$TARGET_FILE" \
--MCFilterType=M \
--MCPointsFile="$MIC_CORRECTION" \
--PLMaxGain="$MAX_GAIN" \
--TCOutFile="$TEMP_DIR/predicted_$i.pcm" \
"$CONFIG_FILE" | tee "$TEMP_DIR/output_$i.txt"
done
echo
cat "$TEMP_DIR"/output_[01].txt | grep 'Filtered signal RMS level'
sox -M -t f32 -r $RATE -c 1 "$TEMP_DIR/filter_0.pcm" \
-t f32 -r $RATE -c 1 "$TEMP_DIR/filter_1.pcm" \
"$FILTER_DIR/$FILTER_NAME-$CONFIG.wav"
sox -M -t f32 -r $RATE -c 1 "$TEMP_DIR/predicted_0.pcm" \
-t f32 -r $RATE -c 1 "$TEMP_DIR/predicted_1.pcm" \
"$FILTER_DIR/$FILTER_NAME-$CONFIG-predicted-response.wav"
The arguments it takes are the impulse response as a stereo wav file (I use REW to measure it), the name your filter will have, and the name of the drc-fir "preset" (one of: erb, minimal, soft, normal, strong, extreme, insane). It outputs the filter and a the predicted response as stereo wav files to to a directory with your filter name in the current working directory.
Note that I use just one sample rate in my setup, so if you may need resample the filter with sox for your own setup.