How do I use both FIR and IIR filters in NAJDA setup?

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I read in the main NAJDA thread that it's possible to utilise both FIR and IIR filters in the same setup, using IIR crossovers on the outputs, then adding a FIR filter on the inputs to align the phase.
However, only the FIR filter setup allows you to load filters on the inputs. So how does one go about specifying IIR filters on the outputs in the FIR setup section? Is it simply a matter of loading IIR coefficients instead of FIR? Or is there something I'm missing?
 
Lowpoke, if you are using a computer as a source you could create an FIR filter with rePhase software (free!) and use Foobar2000, JRiver or a similarly capable player to convolve the signal before it hits the Najda. This is what I am currently figuring out how to implement, wading through 200+ posts on the rePhase thread.
 
Last edited:
I do use a Mac Mini as a source most of the time. (But like to listen to my turntable as well.) And I almost opted to handle the DSP in software with a USB audio interface, as I knew this would give me serious processing power. But after reading SEVERAL posts from Nick as far back as 2013 stating that FIR and IIR would be possible with the next software upgrade, I didn't even consider that four years later this wouldn't have happened! So I purchased the NAJDA. But I'll likely explore your suggested option of seeing what can be done to align phase BEFORE signal gets to NAJDA. I appreciate your input. 👍
 
Even if the mixed FIR and IIR ever did emerge which seems unlikely the Najda has a terribly low tap count if you want to do low frequency FIR filters. I tried to generate a few test filters in rephase that would load in Najda and the response was not very good below 100Hz.

In rephase there is a Filters Linearization tab, there you can select the order of Linkwitz Riley crossover you are using and frequency, then when you generate a filter the phase turn associated with that filter will be "undone" for Jriver or most other convolvers generate the file as a 32bit stereo wav file at your sample rate and it should work without issue. It also has a box selection for port phase wrap and subsonic for a undoing the phase of a Subsonic High Pass filter. You can generate the filter and see how close to ideal it is in the main window and then use more or less taps in the filter to get the response you need. Very low frequency correction will need more taps if you want fine resolution.

You can use the other tabs for EQ and paragraphic phase EQ.

attachment.php
 

Attachments

  • Screen Shot 2017-08-13 at 4.13.30 pm.png
    Screen Shot 2017-08-13 at 4.13.30 pm.png
    193.8 KB · Views: 404
Thanks for your input fluid, even though it's gone over my head somewhat. Are you saying this rephase file should be used in the way tommus suggested, in a convolution engine upstream of NAJDA, so it adds the required delay to the two channel signal BEFORE the crossover?

Yes you would apply it via a convolution plugin so it applies the opposite phase distortion that the Linkwitz Filter does to even the two out. That is the simplest use of rephase and what it was originally intended for to undo the phase distortion of crossover slopes.

It's not really delay as that is slightly different, this is frequency dependant delay (phase).

Does that make more sense?
 
That depends on the length of the filter, the number of taps that are used. A longer filter has higher resolution but is more resource intensive and has a longer latency. It doesn't matter to the computer whether it is changing phase, frequency or both. Convolution in the time domain is equivalent to multiplication in the frequency domain. Most convolvers use FFT multiplication as it uses less resources.

For each way of the crossover the length of the filters could be tailored to the resolution needed for that frequency band.

That being said any reasonable computer will have no issue running quite a number of high tap count FIR filters without breaking a sweat. It is only when the filters need to be run in hardware like Najda or MiniDSP that the tap count limitations apply.

There should no measurable difference between an IIR based crossover that has been linearized in phase to one that was created as linear phase in the first place. As you already have the Najda to do the crossover duties and works pretty well in that role it is easy enough to add the phase linearization on the computer.

Once you've got that sorted you can then venture off into the land of DRC and really go wild :)
 
Last edited:
To be honest, I'm now thinking I may not even use the NAJDA. I have a miniDSP 10x10HD in my system at present (and it sounds very good too). I purchased the NAJDA only because I wanted to try FIR filters. But now I'm tending toward dropping a two channel miniDSP Open DRC-DI unit in front of the 10x10 to handle the phase unwrapping before the crossover. (I think they handle over 6000 taps per channel.) I kinda need to keep the setup easy enough for my wife to manage. I know it's a trade-off because the computer has superior processing power, but it will add a level of complication that may not be accepted by other family members. Sadly, I have real world constraints to contend with. ;)
 
6000 taps is also pretty low if you want any kind of resolution at low frequencies. Generate a filter with EQ below 100Hz in rephase at 6000 taps and see the result you get, it won't track the amplitude and phase that well. Before you go out and buy an open DRC test it out with a computer. If you like the result with a 6000 tap filter go for it. If you can't hear the difference or you need more taps to like it.... The difference could well be quite small depending on your listening situation and associated equipment. The minidsp can also do allpass filters which is the old school analogue way of getting a better phase match through the crossover region.

FIR filters are fantastic but there are other ways to skin the cat, I would try those before buying a new device to insert into the chain.
 
It depends on the filter and what you are trying to do with it. I tend to stick with computer based numbers 8192, 16384, 65536 etc.

65536 will get you 0.5Hz resolution at 20Hz, as you go down in taps from there you lose resolution and the filter you get out isn't as close to what you asked for. In rephase when the filter is generated there are dashed lines that show how close to the ideal filter it was able to get. By using the optimizing controls and letting rephase run more options you can get quite close with a reduced number of taps.

If you are just linearizing the phase from crossovers you can get away with quite a low tap count.

In this example I set rephase to undo a 100Hz 4th order LR phase wrap, and at 2000 taps it is only just starting to deviate from ideal.

Screen Shot 2017-08-14 at 11.41.16 am.png

Now I ask for a 48dB LR crossover slope at 60Hz at 2000 taps, hmm not looking so good.

Screen Shot 2017-08-14 at 11.42.26 am.png

So phase change only is not so bad you could even load that in the Najda and use it's own FIR mode to do it. If you want to add any kind of EQ then you need more taps. How many is a bit like low long is the piece of string :)
 
That's the power the DSP has available. Even the sharc chips in the minidsp only go so far. For crossovers above 100Hz they work OK. If you read the NUC manual you will see the same warnings from Nick.

Power available in DSP is one of the main reasons that phase corrected IIR filters are much easier to implement in hardware.
 
The Najda still has a lot of good features that make it a useful device, given the limited tap count mixed IIR and FIR may not have been that useful in practice anyway.

Almost any computing device can be used to perform convolution, a Raspberry Pi 3 can run the filters and host the player software when using a linux distribution. If you want a high tap filter then a computer is the only real choice at the moment.

One issue that can present itself when using FIR filters is the latency. The longer the filter the more latency you get. For music playback it is no real problem but for audio video sync it can be difficult and for online streaming media and real time audio it can be a real problem that is hard to solve.

At the moment I am using Jriver as the player software on a Windows PC. Audio processing is very light on computer resources but windows itself is quite resource intensive. I have upgraded my computer from a Celeron NUC to an i3 one with more RAM etc. so that Windows doesn't slow everything down.

Jriver has a very good DSP engine with PEQ and convolution built in. It can host VST plugins as well which is useful. It has built in latency compensation for it's own processing which will ensure audio video sync for local playback. It also has a loopback diver which can capture any audio from the system and run it through the DSP processing. I don't like Jriver's video library so I use Kodi for that and have the audio captured to go through Jriver. Kodi has an audio offset feature so you can set the audio to be in sync with the video after it has been through the convolution or linear phase EQ.
 
Given the ability to downsample and decimate a filtered signal to save taps, how would you decide what decimation rate to use?

For instance, a signal at 2000hz only needs a 2X or 4khz sample rate to define it, but a crossover filter allows response much higher in frequency. A LR4 lowpass at 2000hz wold be -48db at 8kHz, -96db at 32khz, etc.

In general, when is the signal attenuated enough to stop worrying about it's phase contribution to the combined output?
 
If you want to know, create some synthetic slopes in rephase align the impulses and view how they combine in REW.

For frequency response close amplitude matching of the slopes to ideal gives the best response with minimum phase filters.

If you use IIR filters for the crossover, it doesn't take as many taps to linearize the phase as it does to try and create the crossover as inherently linear phase.

Very little hardware has the ability to use lower sample rates and decimation even though it is theoretically a good idea for low frequency use, particularly below 100Hz where most of the hardware becomes limited.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.