Volumio with MPD 19.11 Pipe Out and Brutefir

DRC and DRC Designer is a very good choice, when you have got your Filters working, i will explain how to use different “setups”, changing Filters in Brutefir via script file.

Hi,

i just played a bit. With rephase it was easy to create filters which are working while I did not manage to get working .pcm filters created with DRC Designer. I think that I did not configure filter length and offset correctly.

Another point where im struggling is the HW volume control of the Hifiberry dac+. MPD.log states the the PCM mixer control is ignored and volume is always at 100%. Is there a way to use HW volume in combination with MPD-Pipe-Brutefir?

Regards

Christian

I have no solution to the Volume problem. Best would be to install LIrc and a simple IR Receiver to control Volume via script and Alsamixer; second best is Software control; please edit your mpd.conf with nano and not in volumio. Every time you make changes in Volumio, that affects the mpd.conf, your brutefir output in mpd will be destroyed…

The Problem with DRC Designer. I think you are trying to use the wrong files. In your not working Brutefir Config i found “RightSpeakerImpulseResponse44100.pcm” this is the measured Impulsresponse of your Speaker. You will find the right filters in the Folder “ConvolverFilters” . The are called “RightSpeaker44100MINIMAL.pcm” for instance. (For me DRC Desinger is only working when i put all Folders from the Directory “DRCDesigner” to the Root of my Home Folder, when i try to execute DRCDesigner in the DRCDesigner Directory, the ConvolverFilter Folder is empty. (Ubuntu 14.04)

Regards

Hi,

I was successful. On Windows machines DRCDesigner delivers .wav-files in the ConvolverFilters folder which need to be reconverted to .pcm. I used sox for this task. Beyond this I realized that I need 15 db attenuation to avoid clipping. Now convolution is running with quite long filter length 8192,32 at approx 14% on each of the channels. Sound is really good. My main room resonance is effectively suppressed.

Volume I currently set via

amixer sset 'PCM' 50%

which is ok for my workshop but not save for our living room. I will have to check for a way to slave pcm to the MPD volume even with pipe out. One other think I need for the living room is something like a volume (pcm) limeter. Software Volume has to much delay. The IR receiver solution is also nice. I will test it when I have the parts.

Best Regards

Christian

For information : the custom version of mpd in Volumio 2 supports pipe as output plugin :wink:

For Information : If Volumio is based on clean Jessie, there is no need for a customized MPD. The version in Jessie is stable an has got PIPE enabled.

Hi,

will this mpd support pipeout and hw volume control (slave to pcm) at the same time? I spent half evening to find out what needs to be done to in 19.11. to be able to pipe out and control pcm at the same time. up to now without success…

Best Regards

Christian

Gesendet von iPad mit Tapatalk

Hi.

concerning Volume control via lirc I suggest getting an Odroid C1+ the IR receiver is already on board. I have a question concerning upsampling. As far as I know if you use a pipe from mpd to sox in order to upsampling, one problem is that if you change the bitrate of the files you transfer from mpd to sox, because the pipe is not closed after every single music file sox will not catch that the bitrate has changed and you will only get noise. Now my first question is, is upsampling in mpd inferiour to upsampling in sox? I always play a full album and then the music stops anyway is the pipe interrupted when the music stops because if this is the case I woud not have a problem that a bitrate change on the fly is not detected by sox because I never change the bitrate on the fly. I would like to upsample all files to 32/192 before going into brutefir in order to need only one filter (I am a lazy bastard). The question is does the chain need to be mpd -----> Sox ----> brutfir in order to get upsampling (in sox) of a good quality or is mpd -----> brutefir (with upsampling done by mpd) a good solution, too. Comments very welcome.

Best Regards

Tinitus

Hi!
Thank’s for very interesting topics.
I have tried to get Brutefir working with my HiFimeDIY Sabre U2 Async DAC 96khz/24bit .

First i got problem with the 24bit, but i think it’s working now.

little info
Input Processing
Source: stre….
Decoded to: Stereo, 24 bit, 44.1 kHz
Rate: 128 kbps
DSP Operations
Resampler: soxr very high
Format: Stereo, 24 bit, 96 kHz
Volume: Software (MPD 32 bit float with dither)
Output Stream
Format: Stereo, 24 bit, 96 kHz
Rate: 4.608 mbps

2353 mpd 20 0 21268 17m 9680 R 25.5 1.8 2:42.10 brutefir.real
2354 mpd 20 0 21268 17m 9680 S 24.5 1.8 2:43.39 brutefir.real
2059 mpd 20 0 127m 29m 15m S 20.2 3.0 2:17.45 mpd
2350 mpd 20 0 19856 17m 10m S 0.7 1.8 0:03.41 brutefir.real

Now it’s the next step waiting for my new mic and create some filter. :slight_smile:

.brutefirdirac_config

    float_bits: 64;             # internal floating point precision
    sampling_rate:96000;       # 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: "~/.brutefir_convolver"; # location of convolver config file
    logic: "cli" { port: 3000; };

    ## COEFFS ##

    coeff "left" {
             #filename: "/home/volumio/filter/filterl1.pcm"; #filterl
             filename: "dirac pulse";
            format: "FLOAT_LE";     
            attenuation: 0.0; 
    };

    coeff "right" {
            # filename:"/home/volumio/filter/filterr1.pcm"; #filterr
             filename: "dirac pulse";
            format: "FLOAT_LE";     
            attenuation: 0.0; 
     };

          
    ## INPUT OUTPUT ##

    input "left-in", "right-in" {
           device: "file" {path: "/dev/stdin";};
           #device: "file" {path: "/home/volumio/1.pcm";};
            sample: "S32_LE";
            channels: 2/0,1;
    };

    output "left-out", "right-out" {
            device: "alsa" {device: "hw:0";  ignore_xrun: true;};
            #device: "file" {path: "/home/volumio/2.pcm";};
            #device: "file" {path:"/dev/stdout"; };
            sample: "S24_LE";
            channels: 2/0,1;
    };
    ## FILTER ##

    filter "leftfilter" {
     from_inputs: "left-in";
     to_outputs: "left-out";
     coeff: "left";
    };

    filter "rightfilter" {
     from_inputs: "right-in";
     to_outputs: "right-out";
     coeff: "right";
    };

From mpd conf

audio_output { type "pipe" name "brutefir pipe" command "/usr/bin/brutefir -nodefault /home/pi/.brutefirdirac_config 2>/dev/null" format "96000:32:2" }

regards