BruteFIR

Setting up BruteFIR

BruteFIR is the convolution engine and is the heart of my audio and AV system. It controls all the essential routing, the volume control, room correction and all channels matching. Details of this program can be found here.

Here is my script for BruteFIR

## DEFAULT GENERAL SETTINGS ##


float_bits: 64; # internal floating point precision

sampling_rate: 192000; # sampling rate in Hz of audio interfaces

filter_length: 4096,32; # length of filters

# config_file: "/home/audiovero/.brutefir_config"; # standard location of main config file

overflow_warnings: true; # echo warnings to stderr if overflow occurs

show_progress: false; # echo filtering progress to stderr

max_dither_table_size: 0; # maximum size in bytes of precalculated dither

allow_poll_mode: false; # allow use of input poll mode

modules_path: "/usr/lib/brutefir"; # extra path where to find BruteFIR modules

monitor_rate: true; # monitor sample rate

powersave: true; # pause filtering when input is zero

lock_memory: true; # try to lock memory if realtime prio is set

convolver_config: "/home/audiovero/.brutefir_convolver"; # location of convolver config file


## LOGIC ##


logic: "cli" { port: 3000; };


## COEFFS ##


coeff "leftsub" {

filename: "/audiovero/brutefir/filter/ep1/XO1L192.dbl";

format: "FLOAT64_LE";

};


coeff "rightsub" {

filename: "/audiovero/brutefir/filter/ep1/XO1R192.dbl";

format: "FLOAT64_LE";

};


coeff "leftwof" {

filename: "/audiovero/brutefir/filter/ep1/XO2L192.dbl";

format: "FLOAT64_LE";

};


coeff "rightwof" {

filename: "/audiovero/brutefir/filter/ep1/XO2R192.dbl";

format: "FLOAT64_LE";

};


coeff "leftmid" {

filename: "/audiovero/brutefir/filter/ep1/XO3L192.dbl";

format: "FLOAT64_LE";

};


coeff "rightmid" {

filename: "/audiovero/brutefir/filter/ep1/XO3R192.dbl";

format: "FLOAT64_LE";

};


coeff "lefttwet" {

filename: "/audiovero/brutefir/filter/ep1/XO4L192.dbl";

format: "FLOAT64_LE";

};


coeff "righttwet" {

filename: "/audiovero/brutefir/filter/ep1/XO4R192.dbl";

format: "FLOAT64_LE";

};



## INPUT, OUTPUT ##


input "left", "right" {

device: "alsa" { device: "hw:0";}; # ignore_xrun: true; };

sample: "S24_4LE";

channels: 26/0,1;

};


output "lsub", "llow", "lmid", "lhigh", "rhigh", "rmid", "rlow", "rsub" {

device: "alsa" { device: "hw:0";}; # ignore_xrun: true; };

sample: "S24_4LE";

channels: 26/0,1,2,3,4,5,6,7;

delay: 0,178,178,179,176,176,177,0;

dither: true;

};



## FILTERS ##


filter "lsubfilter" {

from_inputs: "left"/0.5;

to_outputs: "lsub"/0;

coeff: "leftsub";

};


filter "rsubfilter" {

from_inputs: "right"/0.5;

to_outputs: "rsub"/0;

coeff: "rightsub";

};


filter "llowfilter" {

from_inputs: "left"/0.5;

to_outputs: "llow"/0;

coeff: "leftwof";

};


filter "rlowfilter" {

from_inputs: "right"/0.5;

to_outputs: "rlow"/0;

coeff: "rightwof";

};


filter "lmidfilter" {

from_inputs: "left"/0.5;

to_outputs: "lmid"/0;

coeff: "leftmid";

};


filter "rmidfilter" {

from_inputs: "right"/0.5;

to_outputs: "rmid"/0;

coeff: "rightmid";

};


filter "lhighfilter" {

from_inputs: "left"/0.5;

to_outputs: "lhigh"/0;

coeff: "lefttwet";

};


filter "rhighfilter" {

from_inputs: "right"/0.5;

to_outputs: "rhigh"/0;

coeff: "righttwet";

};

Since I am now running BACCH, this is the new script

## DEFAULT GENERAL SETTINGS ##


float_bits: 64; # internal floating point precision

sampling_rate: 96000; # sampling rate in Hz of audio interfaces

filter_length: 2048,32; # length of filters

# config_file: "/home/audiovero/.brutefir_config"; # standard location of main config file

overflow_warnings: true; # echo warnings to stderr if overflow occurs

show_progress: false; # echo filtering progress to stderr

max_dither_table_size: 0; # maximum size in bytes of precalculated dither

allow_poll_mode: false; # allow use of input poll mode

modules_path: "/usr/lib/brutefir"; # extra path where to find BruteFIR modules

monitor_rate: true; # monitor sample rate

powersave: true; # pause filtering when input is zero

lock_memory: true; # try to lock memory if realtime prio is set

convolver_config: "/home/audiovero/.brutefir_convolver"; # location of convolver config file


## LOGIC ##


logic: "cli" { port: 3000; };


## COEFFS ##


###BACCH coeff###

#Prof gives you filters in wav format, but it does not work, I changed it to

# .dbl floating point 64 bit format with Acourate, it is OK to be running

# at 2048 taps


coeff "IR1" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/lilo.dbl";

shared_mem: false;

format: "FLOAT64_LE";

};


coeff "IR2" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/liro.dbl";

shared_mem: false;

format: "FLOAT64_LE";

};


coeff "IR3" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/rilo.dbl";

shared_mem: false;

format: "FLOAT64_LE";

};


coeff "IR4" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/riro.dbl";

shared_mem: false;

format: "FLOAT64_LE";

};


### XO coeff ###

# These filers are 65536 taps


coeff "leftsub" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/COR1L96.dbl";

format: "FLOAT64_LE";

};


coeff "rightsub" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/COR1R96.dbl";

format: "FLOAT64_LE";

};


coeff "leftwof" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/COR1L96.dbl";

format: "FLOAT64_LE";

};


coeff "rightwof" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/COR1R96.dbl";

format: "FLOAT64_LE";

};


coeff "leftmid" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/COR2L96.dbl";

format: "FLOAT64_LE";

};


coeff "rightmid" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/COR2R96.dbl";

format: "FLOAT64_LE";

};


coeff "lefttwet" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/COR3L96.dbl";

format: "FLOAT64_LE";

};


coeff "righttwet" {

filename: "/audiovero/brutefir/filter/bacch96/nocorrection/COR3R96.dbl";

format: "FLOAT64_LE";

};




## INPUT, OUTPUT ##


#input "left", "right", "ltsurr", "rtsurr", "cent" {

input "left", "right" {

device: "alsa" { device: "hw:0";}; # ignore_xrun: true; };

sample: "S24_4LE";

#channels: 26/0,1,2,3,4;

channels: 26/0,1;

};




output "rsub", "rlow", "rmid", "rhigh", "lhigh", "lmid", "llow", "lsub"{

device: "alsa" { device: "hw:0";}; # ignore_xrun: true; };

sample: "S24_4LE";

channels: 26/0,1,2,3,4,5,6,7;

delay: 0,2,13,18,18,13,0,0;

dither: true;

};


## FILTERS ##


### BACCH filters###


filter "lilofilter" {

from_inputs: "left"/0.5;

to_filters: "llowfilter", "lmidfilter", "lhighfilter";

coeff: "IR1";

};


filter "lirofilter" {

from_inputs: "left"/0.5;

to_filters: "rlowfilter", "rmidfilter", "rhighfilter";

coeff: "IR2";

};



filter "rilofilter" {

from_inputs: "right"/0.5;

to_filters: "llowfilter", "lmidfilter", "lhighfilter";

coeff: "IR3";

};


filter "rirofilter" {

from_inputs: "right"/0.5;

to_filters: "rlowfilter", "rmidfilter", "rhighfilter";

coeff: "IR4";

};


### XO filters ###


filter "lsubfilter" {

from_inputs: "left"/0.5;

to_outputs: "lsub"/0;

coeff: "leftsub";

};


filter "rsubfilter" {

from_inputs: "right"/0.5;

to_outputs: "rsub"/0;

coeff: "rightsub";

};


filter "llowfilter" {

from_filters: "lilofilter", "rilofilter";

to_outputs: "llow"//0.5;

coeff: "leftwof";

};


filter "rlowfilter" {

from_filters: "lirofilter", "rirofilter";

to_outputs: "rlow"//0.5;

coeff: "rightwof";

};


filter "lmidfilter" {

from_filters: "lilofilter", "rilofilter";

to_outputs: "lmid"//0.5;

coeff: "leftmid";

};


filter "rmidfilter" {

from_filters: "lirofilter", "rirofilter";

to_outputs: "rmid"//0.5;

coeff: "rightmid";

};


filter "lhighfilter" {

from_filters: "lilofilter", "rilofilter";

to_outputs: "lhigh"//0.5;

coeff: "lefttwet";

};


filter "rhighfilter" {

from_filters: "lirofilter", "rirofilter";

to_outputs: "rhigh"//0.5;

coeff: "righttwet";

};