How to use my REW / DRC Designer generated filters with my new Hifiberry DAC+ DSP ?

Pygmy

New Member
Thread Starter
Joined
Feb 6, 2019
Messages
8
EDIT: Sorry, I understand I've posted this in the wrong place as this is not specifically REW related.

My bad!


-----

I've followed this tutorial to measure using REW and create filters using DRC Designer:

I've succesfully created the filters, and I've tried them using Equalizer APO.
Sounds great!

So now I'd like to use them with my Hifiberry DAC+ DSP.

So first I should install the right DSP profile:
https://github.com/hifiberry/hifiberry-dsp/blob/master/sample_files/xml/fullrange-fir.xml

and then I should upload the filters using dsptoolkit's "set-fir-filters|set-fir-filters-left|set-fir-filters-right" commands:
https://github.com/hifiberry/hifiberry-dsp/blob/master/doc/dsptoolkit.md

BUT... according to the documentation
"set-fir-filters|set-fir-filters-left|set-fir-filters-right"
"Deploys a FIR (finite impulse response) filter to the left, right or both FIR filter banks. A FIR filter file is a simple text file with one real number per line. Not all DSP profiles will support this setting To make sure the filters are still active after a system reboot, make sure you use the store command."

The filters generated by DRC Designer are exported as a single stereo WAV file.

How do I convert this to a format that Hifiberry's DSP Toolkit can work with?
 
Last edited:

Pygmy

New Member
Thread Starter
Joined
Feb 6, 2019
Messages
8
...I think I'm making progress, documenting this as I go along as it might be of use to other people (and if I'm wrong, they can learn from my mistakes :)) :

When using DRC Designer, the profiles for the different filters you can generate are stored in text files with the ".drc" extension in "C:\DRCDesigner\drc-3.2.0\sample".
(For example : "strong44100.drc")

As far as I understand it, the parameter I need to change to have it output filters with the correct number of taps is:

PSOutWindow = 8000

(From the DRC documentation : "Final window after post filtering. This is also the length of the generated correction filter.Usual values are between 8192 and 65536. Filter with 65536 taps gives about 0.5 Hz resolution at 44.1 kHz sample rate, 16384 is usually enough for most situation and 8192 gives somewhat good results with much less computing needs during real time convolution.")


So this way I should be able to generate the filters with the correct (Hifiberry DAC+ DSP supported) amount of taps.

Then - DRC Designer outputs WAV files, Hifiberry DAC+ DSP 's DSPToolkit expects a text file with one floating point value per line.
So I guess I need to write a small program to parse the WAV file and write the samples (coefficients) to a text file one by one and then inspect if the output values look like they're in the proper range.
 
Last edited:

Pygmy

New Member
Thread Starter
Joined
Feb 6, 2019
Messages
8
I just adjusted DRC Designers output setting to

PSOutWindow = 8192

This indeed results in an output file that is 8 times smaller than the 65536 setting.

Loaded it in in Equalizer APO and ofcourse the resulting analysis graph is not exactly the same as the 65536 setting, but it looks pretty close and still sounds amazing.

If I can get these two Left / Right 8192 tap filters in my Hifiberry DAC+ DSP I'll be a very very happy man.

No time left tonight to try conversion from the stereo wav file to two separate text files, I'll leave that excercise for tomorrow...
But things are looking (sounding :-)) good!
 

kochi

Registered
Joined
Nov 18, 2017
Messages
1
@Pygmy

Thanks for sharing your project.

Have you've been able to convert the wav file to a Hifiberry DAC+ DSP 's DSP Toolkits compatible text file ?
Therefore any update on your project would be appreciated :)

thanks in advance.
 
Top Bottom