OK, I have finally, after much trial and error, gotten Brutefir to work
with slimserver.  So far I can only filter a flac stream.  I just
cannot get mp3 to work with this proccess.  But since 99.6% of my music
collection is stored as flac, that's OK with me.  
Here's what I did:
First off, I already had the hard part done.  As I mentioned in a
previous post, I have been using Hugh's wonderful Windows based
software for some time.  Having already followed his excellent
directions, I already had my room measurements and generated filters. 

Next I installed Brutefir and put a copy of the binary into
/usr/local/slimserver/Bin/i386-linux.  
Using the current wiki as a starting point, I began to research the
documentation at the Brutefir site (highly recomended) and to borrow
parts of existing configuration files that I found while searching. 
After a lot of trial and error, editing, and slimserver restarts, I
have a working (probably not optimized) config file
(.brutefir_normal1_filter2), as follows:

## DEFAULT GENERAL SETTINGS ##

float_bits: 32;             # internal floating point precision
sampling_rate: 44100;       # sampling rate in Hz of audio interfaces
filter_length: 8192,8;       # length of filters
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: ".";          # extra path where to find BruteFIR
modules
monitor_rate: false;        # 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/jsl/filters/.brutefir_convolver"; # location
of convolver config file



coeff "drc_l" {
        filename: "/home/jsl/filters/normal1_leftfilter2.pcm";
        format: "FLOAT_LE";     # file format
        attenuation: 0.0;   # attenuation in dB
        blocks: -1;         # how long in blocks
        skip: 0;            # how many bytes to skip
        shared_mem: false;  # allocate in shared memory
};
coeff "drc_r" {
        filename: "/home/jsl/filters/normal1_rightfilter2.pcm";
        format: "FLOAT_LE";     # file format
        attenuation: 0.0;   # attenuation in dB
        blocks: -1;         # how long in blocks
        skip: 0;            # how many bytes to skip
        shared_mem: false;  # allocate in shared memory
};

## INPUT DEFAULTS ##

input  "l_in","r_in" {
        device: "file" {path: "/dev/stdin";};  # module and parameters to get
audio
        sample: "S16_LE";   # sample format
        channels: 2/0,1;    # number of open channels / which to use
        delay: 0,0;         # delay in samples for each channel
        maxdelay: -1;       # max delay for variable delays
        mute: false,false;  # mute active on startup for each channel
};

## OUTPUT DEFAULTS ##

output "l_out","r_out" {
        device: "file" {path: "/dev/stdout";};  # module and parameters to put
audio
        sample: "S16_LE";   # sample format
        channels: 2/0,1;    # number of open channels / which to use
        delay: 0,0;         # delay in samples for each channel
        maxdelay: -1;       # max delay for variable delays
        mute: false,false;  # mute active on startup for each channel
        dither: false;      # apply dither
};

## FILTER DEFAULTS ##

filter "l_filter" {
        from_inputs: "l_in"/2.0;
        to_outputs: "l_out"/0.0;
        process: 0;        # process index to run in (-1 means auto)
        coeff: "drc_l";
        delay: 0;           # predelay, in blocks
        crossfade: false;   # crossfade when coefficient is changed
};
filter "r_filter" {
        from_inputs: "r_in"/2.0;
        to_outputs: "r_out"/0.0;
        process: 0;        # process index to run in (-1 means auto)
        coeff: "drc_r";
        delay: 0;           # predelay, in blocks
        crossfade: false;   # crossfade when coefficient is changed
};



I then stored the config file in /usr/local/slimserver.  
As you can see from the settings, my filters are named
normal1_rightfilter2.pcm and normal1_leftfilter2.pcm.  They are 32bit
float format.  Hence the "FLOAT_LE" setting.  The filters are applied
to the corresponding channel and then sent to stdout, where slimserver
takes over.  

I then added the following to the slimserver convert.conf file:

flc wav * *
        [flac] -dcs --force-raw-format --endian=little --sign=signed
--skip=$START$ --until=$END$ -- $FILE$ | brutefir -quiet -nodefault
/usr/local/slimserver/.brutefir_normal1_filter2

After restarting slimserver, make the required changes in Home->Server
Settings->File Types and give it a try.

So far, so good.  But, as always, YMMV.


-- 
HoZ
------------------------------------------------------------------------
HoZ's Profile: http://forums.slimdevices.com/member.php?userid=1579
View this thread: http://forums.slimdevices.com/showthread.php?t=25381

_______________________________________________
audiophiles mailing list
audiophiles@lists.slimdevices.com
http://lists.slimdevices.com/lists/listinfo/audiophiles

Reply via email to