DamFilterDesigner App : create and display FIR&IIR Lowpass Filters for Soekris dam

This app was aleardy introduced in the Filter Brewing for soekris dam thread, but it's time to open a dedicated thread, so here it is.

This app is made with MATLAB app designer an is free of charge.
I am an electrical engineering student from Germany and this app was developed while procrastinating studying for exams ........

This app is for designing FIR and IIR Lowpass Filters for Soekris dam1xxx (in next release also dam2xxx)
The type of Filter, wether it's an interpolation Filter, an decimation Filter (for DSD) or just Lowpass(IIR) is selected automatically.

Currecntly you can design FIR Lowpass Filters with the following techniques:
  1. Spectral Windows (Standard windows like Kaiser, Hann, Blackman-Harris... and Albrecht 3-11th term, and Albrecht Minimal Side Lobes)
  2. Halfband linear and minimum phase
  3. Nyquist linear and minimum phase
  4. least Squrare
  5. ParksMcClellan
  6. Equiripple linear and minimum phase
  7. LeastPthNorm mixed and minimum phase
IIR design:
  1. Butterworth
  2. Chebychev
  3. Elliptical
  4. Quasilinphase
The IIR Filters can be higher order as they will be converted to cascaded Biquad Filters.

You can verify the designed filters right away with:
  1. Magnitude Response
  2. Phase Response
  3. Impulse response
  4. Step response
  5. Group delay
  6. Magnitude Response Estimate only valid for dam1xxx at the moment
The Magnitude Response estimate is working with fixed point arythmetic:
Coefficientsdatatype:
  • 1.31 for FIR1
  • 2.30 for FIR2
  • 3.29 for IIR
productDataType:
  • 35.35
AccumulatorDataType:
  • 4.24
Output Datatype:
  • 2.30 for FIR1 as these will go into FIR2...
  • 2.30 for IIR as these will go into FIR2...
  • 2.26 for FIR2 as we have a 28bit ladder dac
I found this a very important feature as this serves as an overflow detection.

About Gain:
  • standard gain is applied to the corresponding Interpolation Rate
  • When designing Filters you can chnage the Gain in form of a Correction Faktor:
    eg. the FIR1 Filters designed by Soeren have a gain of 8 and an correction factor of 0.7585
    if you multiply these you get the 6.8 gain value you can find in the filter text files...
  • DSD Filters have a gain of 30dB - this comes from: 24dB gain in the DAC and 6dB gain because it's dsd...
    but again you can make a gain correction by the factor
  • I strongly advise to have a look at the magnitude response estimate and change the correction faktor so the filter wont overflow! This is especially the case when designing Filers with short Coeff length as their values are simply higher.

The designed filters can be stored to a list inside the app that does all the sorting for you.
In this "Filter List" the filters are shown with their properties:
  • Filter type FIR1/FIR2.. ,
  • Filter Bank F4/F5/F6/F7..
  • key values (like attenuation at 20kHz)
  • Input Sampling Rate
From this list you can select a matching pair of FIR1 and FIR2 filters and plot a cascaded mangitude response!
The magnitude response estimate however does not work for caseded filters...

Next feature is the import of .skr filter Files:
You can import ANY .skr filter file, no matter how old, plot the responses and add them to your "filter list".
This way you can import your favourite old filters and mix and match them with new ones.

Of course you can export the designed Filters as a .skr file!

As filter design is not done in a day you can save your "filter list" as a matlab workspace (.mat) file that can be opend up later to resume your work.

The newest feature (but not properly tested so kind of beta) is Upload of filters to dam:

As this is not a commercial tool and I'm not a pro this tool is not free of bugs, so please report any problems and I'll try to correct them

At the moment I'm trying to integrate an automated Room Correction feature but that is difficult...

You can download the App here:

https://jp-hoffmann.de/Files/DamFilterDesigner2_3.zip

Be aware, this app is pretty big and quite Power Hungry as it is running MATLAB Runtime in background.
From users aleardy testing the app I got the sense that you need Win11 or Win10 at least, not sure.

Enjoy

Here are some example pictures of how the app looks like:
app_1.png


app_2.png
 
  • Like
  • Thank You
Reactions: 6 users
Congratulations on the work you have developed.

Tidal has changed a large part of their albums to 192 kHz without notice and without providing an option for 44.1 kHz or 96 kHz. It has left me without my preferences suddenly.

The filter I left installed in my system had an issue at 192 kHz in the C128dp filter (indicated to me by private message from jimmy2004y). I hadn't bothered to correct it.

I only notice differences in a set of speakers I have with very low distortion, first-order filter, time-aligned, and an amplifier with hardly any feedback, respecting the phase. I think differences are also noticeable with headphones because they also respect the phase. It is more difficult with other speakers I have that are not time-aligned.

This will force me to read through hundreds of messages again and get up to date. I have 1.06 with 2K filters. I will need to upgrade to 1.23 with 4K filters.

I want a set of 4 filters with NOS, C128dp, linear phase 4K, and minimum phase 4K (this last one has double the coefficients but causes a phase variation). This last one, when done right, is smoother than the rest based on my experience with 2K filters.

I will study your program. It will require time. Thank you very much.

It is laborious to develop filters, it takes a lot of time:

Test each model with barely distinguishable differences.
Deploy filters to the rest of the frequencies. Adjust maximum output without distortion and equal amplitude for all frequencies and models F4, F5, F6, and F7.
You need to adjust the gain to be similar in all filters.

Make a test WAV file with a 1 kHz sine wave at 0 dB, 44, 48, 88, 96, etc.
You see the output on an oscilloscope. If the gain is excessive, the output is deformed.

It is better to make a 100 Hz square wave with the maximum positive and negative amplitude and adjust the gain so that it does not saturate the ringing of the output. This forces you to attenuate about 3 dB more than a sinusoid.

Measure distortion at all frequencies with the Fuzzmeasure program to ensure nothing is done incorrectly.

It was complicated with gain above 0 dB. Now it's more complicated with the new version.

In any case, whether I notice differences or not, and whether I choose one filter or another based on subjective appreciation, I am very grateful to the entire community for the great learning I have had on this topic and especially to Soekris for this tool that has been made open for development.