Page 3 of 3

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 28 Feb 2016, 01:57
by AlleyCat
Got it. After lots of trial and errors I have a working configuration; however, with default filters. Setting up correction filters is coming next.

/etc/mpd.conf
audio_output {
type "pipe"
name "brutefir pipe"
command "/usr/bin/brutefir -nodefault /home/.brutefir.config" # 2>/dev/null"
mixer_type "software"
#command "aplay -f cd 2>/dev/null"
format "44100:32:2"
}

NOTES:
1) Add mixer_type "software"
2) Add # before the pipe to /dev/null
3) The brute fit config file is located at /home/.brutefir.config

brute fir.config file

#float_bits: 32; # internal floating point precision
float_bits: 64;
sampling_rate: 48000; # sampling rate in Hz of audio interfaces
#sampling_rate: 44100;
filter_length: 4096,16; # length of filters
overflow_warnings: true; # echo warnings to stderr if overflow occurs
#overflow_warnings: false;
show_progress: true; # echo filtering progress to stderr
#show_progress: false;
max_dither_table_size: 0; # maximum size in bytes of precalculated dither
#allow_poll_mode: true;
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
convolver_config: "home/.brutefir.config"; # location of convolver config file

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

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

coeff "right" {
# filename:"/home/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: "S32_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";
};

NOTES:
1) Tested while riunning top to see CPU util.
2) Input is from /dev/stdin
3) Caution: the system works best and sometimes only with S32_LE format.

Issues:
1) sometimes the system just hangs. MPD restart get the system going.
2) The mpd.conf is overwritten.
3) Bandwidth. My current WiFi card gives below 4mbs speed.

Does anyone knows how to prevent the mpd.conf from being over written?
Any ideas how to monitor why the system crashes?

AlleyCat

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 09 May 2016, 11:57
by AlleyCat
Dear Da Alchemist,
I'm writing to ask if you could post the SoX command line syntax to convert the REW Export Filer file from wav to pcm?

I exported the Filter Impulse Response to: Mono->24bit->Normalize=yes->48Khz.

I am getting a wav file. I understand that I need to concert the WAV file to PCM, and can do that with SoX. I think once I convert the file to PCM I can start using RuneAudio with room correction and test response with different filers.

With regards
AlleyCat

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 10 May 2016, 08:56
by Da Alchemist
Of course it is easy to convert a file from wav to pcm with sox:
Code: Select all
sox your.wav -t raw -c 1 -f4 your.pcm


I would suggest you make yourself familiar with rePhase : https://sourceforge.net/projects/rephase/

Do Measurements with REW and let REW suggest you EQ Filters. You can Import your Measurement in rePhase (not needed) and you can Import the Filtersettings manually ( at the moment, this will change perhaps in future Versions) to the Section Paragraphic Gain EQ. In rePhase choose the right EQ type and output format (marked in the Pic below.) Rename your files in your Brutefir config. (bin is the same format as pcm no need to convert) You can vary the Number of taps Samplerate minimum and linear Filters, etc.

Rephase related questions are better placed here: http://www.diyaudio.com/forums/multi-wa ... -tool.html

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 26 Aug 2018, 18:33
by cocogex
Hello,

I whish to install a concolver like Brutefir on Rune. I tried to install the package as shown on the first page of this thread but it doesn't work anymore. The link seems to be dead:

Code: Select all
root@runeaudio(rw):~# pacman -U mpd-rune-0.19.6-1-pipe-output-armv7h.pkg.tar.xz
loading packages...
error: 'mpd-rune-0.19.6-1-pipe-output-armv7h.pkg.tar.xz': could not find or read package


Is there any workaround?

Thanks in advance for your feedback.

Charles

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 27 Aug 2018, 15:44
by janui
Hi cocogex,

You can download brutefir packages here:

Modifications/additions to mpd.conf for pipe output for brutefir are pretty well documented in this thread. A good method of automatically including them in mpd.conf is documented here: post25102.html?hilit=mpd.conf#p25085

janui

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 29 Aug 2018, 19:00
by cocogex
Hi Janui,

I just saw your answer. Thanks a lot for your help, I will try and keep you in touch.

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 02 Sep 2018, 15:42
by cocogex
Hello,

After several attempt and a full reinstallion of the RPI3 beta 0.4 image, I succeeded in making it work :-)

I couldn't beleive it :shock: since I was afraid that the RPI was not powerfull enough.

For the moment I have just made 48000kHz filters. Thus in the mpd.conf file I have setup a resampling to that frequency.

But now I have to work on my filters since it sounds like though a pillow !

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 02 Dec 2018, 14:20
by cocogex
Hi,

just to keep you in touch, I finally succeeded in building a convulsion impulse using this excellent tutorial https://www.dropbox.com/s/10xdhh83jokzb ... o.pdf?dl=0 and implementing brutefir: the sound is really amazing! I can hear so much details, and the voices sound very natural :shock:

I spent a quite a few hours/days studying the subject, but it was really worth.

My convulsion file was generated in RePhase with an FFT of 13072 taps at 96kHz and consequently the upsampling in the mpd.conf file is set at this frequency.
I followed the advice of http://edoc.sub.uni-hamburg.de/haw/voll ... thesis.pdf and set the filter_length parameter to 1024 with 128 partitions which ensure almost no latency and keeps the CPU at 70% of CPU (one CPU for each of the 2 brutefir processes).

I'm running brutefir on Runeaudio since one week, no issue and still happy :D !

Re: RUNE Audio and Brutefir (Convolver for Roomcorrection)

PostPosted: 02 Dec 2018, 14:37
by janui
Hi cocogex,
Thanks for the update and the great documentation.
janui