rePhase, a loudspeaker phase linearization, EQ and FIR filtering tool

Just how long does the impulse response have to be (samples) to have any accuracy at low frequerncy?

Depends on what you want to achieve.
Give me an example of EQ, phase linearization, or linear phase filter of a given slope and frequency, and I will post some curves showing what can be expected depending on the number of taps (impulse length).
 
Here goes!
This is from the rePhase interface, but it should be accurate.
Blue is target, red is result (after several automated optimization steps)
 

Attachments

  • rePhase EQ test.PNG
    rePhase EQ test.PNG
    74.6 KB · Views: 1,491
Last edited:
How about a 2nd order 20 Hz, HP with a Q=1, 6 dB boost centered at 20 Hz.
Just reread your post and I think I misread it the first time :p
Sorry about that!
What is it you want me to simulate exactly?
2nd Order Q=1 HP together with a 6dB boost?
What Q for the boost?

Or is it phase linearizion and not actual filtering that you want me to show?
 
Last edited:

john k...

Member
2004-08-10 2:50 am
US
No, what I wanted was a 2nd order high pass filter, say a B2 at 20 Hz. Then add a Q =1, +6dB boost centered at 20 Hz. So there are 2 stages. But, the plots above show the point I was getting at. You need about 8k taps at 48k sampling to get good resolution at 20 Hz. And if you go to 96k sampling you would need about 16k taps....and so fourth as the sampling rate increases. This has a dramatic effect on processing time even when using partitioned convolution.

So these high sampling rates Twest820 was asking for really aren't all that useful. The impulse would (sampling rate)/6 taps long to have reasonable accuracy at 20 Hz. You are probably going to start having problems with round off errors etc.

By the way, Merry Christmass to all.
 
2nd order Butterworth 20Hz high pass with 20Hz Q=1 6dB:

HP But20Hz 2nd and Para Q1 6db.gif

Zoom of IR to -132dB:

10k taps.gif

Zoom of IR to -90dB

4ktaps.gif

From above it is clear that truncation to less than 8k taps introduces questionable artifacts.

For real control of subs IR get longer.

Higher Q filters push filter length up very quickly.

Correction of LF in room swells this right up too.

I get most consistent results with 16k-32k taps.

For speaker operating >40Hz I've done quite well down to 8k taps.

Regards,

Andrew
 
John, the impulse length is that much of a problem, depending on how you look at it:

- Concerning computation cost, if you are doing an active crossover you can downsample the low frequency channels, like Four Audio does in its FIR processor. No need for 96khz or even 48khz for channels that have a LP at 300Hz for example: 8khz is more than enough, and gives you 5 times the "power" for the same impulse length...

- Concerning processing delay, you can reduce it by progressively doing minimal-phase correction in the lows (again, like Four Audio does, with their mixed phase approach). You can even do the whole thing with minimal phase correction, and the impulse will extend on the right (rePhase will auto center it with the impulse peak right at the start), and their will be no delay at all (but it will still be better than the equivalent biquads regarding rounding errors)
 
Last edited:

john k...

Member
2004-08-10 2:50 am
US
I'm just looking at what we did with the Bodzio Ultimate Equalizer. I don't know what the consequences of down sampling some parts of the signal would have on fidelity and then making sure everything is synchronized, or what about the case where you are just equalizing amplitude and linearizing phase of a passive speaker. It's not really possible to down sample in that case as the signal is full range.

In any event, I'm not too sure I would want to down sample part of the signal in any event. Still, there are some instances where down sampling is not an alternative.
 
Danwsampling can only be used when doing an active crossover.

Here is a short description of Four Audio's approach:
Four Audio | Inside the HD2
(see "multirate processing" section)
They have a pdf white paper that was published somewhere around 2007 and is very interesting, but I cannot find it right now.

When doing a stereo convolution yes you would not want to downsample anything (that would turn to be quite complicated as you pointed out), but you have to consider that when doing phase linearization the impulse will extend on the left of the peak, so with auto centering (in rephase) with a given impulse length you will be able to use twice that length compared to a symetrical impulse (linear phase filtering).

With the 2x6144 taps @ 48khz of the openDRC you can "lienarize" almost anything, even bassreflex phase shifts (and it does only use direct convolution for now!).

Here is an illustration, with a somewhat "exaggerated" correction:
BR at 25Hz, and LR 96dB/oct (16th order) at 80Hz, 8000Hz and 8khz (of course only the first one present any challenge, but this was done to simulate something realistic).
Blue is target, red is result.

As you can see it all turns out perfect, and the impulse "center" is automatically set a 6092 sample within the 6144 samples of the impulse.
Adding some linear phase EQ would "symetrize" part of the impulse, but most of the energy would still be on the left of the peak and auto-centring would adapt...
 

Attachments

  • rephase linearization.PNG
    rephase linearization.PNG
    65.5 KB · Views: 933

john k...

Member
2004-08-10 2:50 am
US
Donwsampling can only be used when doing an active crossover.


First let me say I'm all for what you are doing. I'm just commenting on technical issues.


It's not that easy to just say down sample. Down sampling assumes that the frequency content of the output of the filter is not important. That is, there is no information in the output above the Nyquist frequency of the new sample rate. That may be true for steep filters but not necessarily so for filter with shallower slopes. And developing algorithms for crossovers with down sampling and FFt convolution and getting everything in sync are all that common place. In fact the Four Audio stuff is the only one I have seen doing this, not that I have followed these developments all that closely.

What your are doing will probably be very useful with something like the miniDSP Open DRC platform. But it's a brute force convolution engine. You are just generating the impulse responses required and have no control over the convolution algorithms being used in the hardware actually doing the filtering.

Four Audio says, " The necessary length and hence number of coefficients of a FIR filter to reach satisfactory spectral selectivity scales with wavelength. If not handled by overlapped FFT convolution techniques, an FIR filter dedicated for the mid, low or sub band has to be run at a reduced sample rate to spare DSP resources." But they also say, "Max. frequency resolution: 3 Hz". I don't know what convolution algorithm they are using (sounds like brute forces as well). Boidzio UE uses partitioned, FFT convolution and is pretty fast with 8192 taps but does loose accuracy at low frequency.

Also, I have no idea what the Four Audio HD2 costs. It looks interesting. Can the impulse from your software be imported to it?

The miniDSP DRC is $300 and it appears your impulse can be used. The PC based Bodzio UE is $150 plus about $100 for a suitable sound card and it can generate the impulses it needs and convolve them with the audio signal.
 
Also, I have no idea what the Four Audio HD2 costs. It looks interesting. Can the impulse from your software be imported to it?
I asked Rainer Thaden and he send me the price list last year: the 2x8 module (to be mounted in a box) is around 1000€, including ADCs and DACs.
The price drops under 800€ if you order... 100 modules

The software (called Monkey Software) is quite expensive: 2500€
So this is really not meant for the end user: you are supposed to by a ton of modules and on instance of the software, and build/distribute your active speakers...
I have no idea if impulse generated by another software can be loaded in the HD2, but maybe the down sampling trick requires the original software?...

The miniDSP DRC is $300 and it appears your impulse can be used.
Yes. They are going to release a new plugin to handle 8 channels with this device (in fact they are selling each par separatly, with the DSP module around $175, connected with I2S), but as they are sparing some power for additional biquads and are targeting a 96khz (!) sampling freq that only leave 512 taps per channel (which is really short at that freq...).
Ths plugin is not released yet and it seems they might add the option to freely distribute taps across channels...

By the way John, I have a question I wanted to ask you for some time, and this is the perfect opportunity: is a BR (Helmotz resonator) a phase linear thing? Or is there something special about the ringing?
 
VSTconvolver plugin is free,fft partitioned multi convolution engine too.

FIR EQ/crossover +DRC+phase linearizaton pc based

Thierry, do you know of any plugin that does direct convolution?
I have played with SIR but found some annoying artifacts... (on specific test signals)
If the PC is powerful enough it looks like direct convolution is the way to go. I have no idea how much power it would require though...
 
Andrew, it was on an older version of a test software developed by member jlo.
It was meant to compare phase distortion effects with/without a convolution (generated with rephase) on tests signals (sawtooth, dual tones, etc.).
The first version was using SIR and I could hear some distincs artifacts (hi tuned sounds, if my memory serves me well). jlo then implemented the convolver plugin instead or SIR and all was good.

I don't have the early version using sir anymore, but I can ask jlo if he still has it if you want.
 
That's OK. I've worked extensively with extensively with Sourceforge convolver, and mostly use it single partition. Very modest PC can do easy 8ch 65k taps fs 48kHz.

Farina's convolution engine produces exceptional correlation with above, and have worked with 2^22 length test signals to push math noise hard. Modern FFT libraries are amazing.

Why direct convolution?

Regards,

Andrew
 

twest820

Member
2009-06-24 10:49 pm
So these high sampling rates twest820 was asking for really aren't all that useful. The impulse would (sampling rate)/6 taps long to have reasonable accuracy at 20 Hz. You are probably going to start having problems with round off errors etc.
Please refer to the scenario described in post 28; you seem to be confusing dipole equalization filters with DAC antialiasing filters.