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

I use rePhase for creating linear phase Linkwitz-Riley 48dB/oct 80Hz high/low pass filters for crossover, sample rate 16kHz and 2688 taps. These I import into Cool Edit for inspection. Summation of filters produces ripple in tails:

View attachment 321808

This is completely avoidable if high pass filters are all derived from low pass counterpart via single sample inversion (subtractive filter).

Hi Andrew,

The ripples you are showing occur at -144dB. I don't think it should be considered as a problem as is.

As the HP and LP will likely have different length and window, iterative optimization will give different result, so a subtractive solution would probably not give the best result for a given impulse length...

As for the ripples you showed me starting post #9 (low level ripples at the Nyquist frequency), I have found a way to reduce them using oversampling (and double the number of taps) and subsequent downsampling (with amplitude derivation being corrected during the fist iterative optimization step).
Not sure I will implement it in the next release though, as I would like to focus on measurement import first.
 
Unfortunately multirate doesn't play nicely with multichannel DACs and most audio DACs that are interesting for use with hi-fi aren't specified for use with sampling rates below 32kHz. It's probably fine but I would chacterize the DACs one intends to use at low sampling rates before investing heavily in multirate. (There are other, more minor, issues too; clock generation becomes more involved as can cable routing.)
Why not upsample to the nominal sampling freq before outputing to the DAC?
(interpolation might require an FFT though :D )
 
WaveIO Asynchronous USB-to-I2S interface is a better choice.

Of course there is a risk interconnecting equipment not using differential signalling. Grounding will be a major headace. The picture of the Wave device says "isolated I2S outputs", very clever marketing. I will be looking for DACs marked "isolated I2S inputs".


I haven't been following this thread. But what exactly do you mean by clever marketing? the wavio device has two sets of i2s outputs, 1 set is isolated by NVE IL715 isolator chip and are on pin headers (you provide 'dac side' power for the i2s output), the other set of i2s outputs is non-isolated and on u.fl connectors.

What exactly is 'marketing' about that? It's fact as far as I can tell?
 
Hi Andrew,

The ripples you are showing occur at -144dB. I don't think it should be considered as a problem as is.

As the HP and LP will likely have different length and window, iterative optimization will give different result, so a subtractive solution would probably not give the best result for a given impulse length...

As for the ripples you showed me starting post #9 (low level ripples at the Nyquist frequency), I have found a way to reduce them using oversampling (and double the number of taps) and subsequent downsampling (with amplitude derivation being corrected during the fist iterative optimization step).
Not sure I will implement it in the next release though, as I would like to focus on measurement import first.

You may think it isn't problem, a simple one to fix. Calculation of high pass should be done buy calculating low pass and subtracting normalized value of one from peak sample. Additionally, linear phase version filters for IIR family is faster and more accurate to calculate IIR with 1/2 gain/slope, convolve with time reversed copy, trimming to desired tap count, and applying symmetrical fade in and fade out at ends.

Fare and away at moment is indeed import of user IR for response modeling, followed by solver for optimizing. Even REW approach is tedious compared to good technique with direct inversion.
 
Why not upsample to the nominal sampling freq before outputing to the DAC?
Making the downsampled stop band wide enough to allow a slow rolloff antialiasing filter limits the downsampling ratio. Between that, the cost of the antialiasing, and the minor impulse blurring from the pre-DAC antialiasing round one likely ends up with a more complex implementation and little or no computational savings for three ways and a good fraction of four ways.

Downsample+upsample might let you fit a tweeter+mid+high sub+low sub four way into a DSP that's more of a three way size, though. That's the kind of thing which wants a case study. It's not something I've looked into as three ways are more than capable of delivering SPLs I find uncomfortably loud.
 
You may think it isn't problem, a simple one to fix. Calculation of high pass should be done buy calculating low pass and subtracting normalized value of one from peak sample. Additionally, linear phase version filters for IIR family is faster and more accurate to calculate IIR with 1/2 gain/slope, convolve with time reversed copy, trimming to desired tap count, and applying symmetrical fade in and fade out at ends.

Fare and away at moment is indeed import of user IR for response modeling, followed by solver for optimizing. Even REW approach is tedious compared to good technique with direct inversion.

Subtracting is not the way it is done in rePhase, so 100% complementarity cannot be guaranteed. But you know what you get when looking at the ripples, and frankly a -144dB complementarity error is not something that would worry me. How is the complementarity of the acoustic filters?...
You can also use more taps for the given frequency and these complementarity problems will go even deeper in level as the result curve will fit the theoretical one better (and theoretical filters generated in rephase are 100% LP/HP complementary).

The IIR=>FIR generation method using cooledit is good, but only work for textbook filters whereas here any function (for both magnitude and phase) can be generated (Linkwitz-Riley, Horbach-Keele, reject high/low, overlapping, etc...).

There are room for many tools and methods for FIR filtering (automated inversion, integrated tools, etc.), and rePhase is just one of them, with a specific approach (manual correction and wysiwyg result).
 
Hello there and congrats for the ideea,
But......many of are not able to figure out how exactrly to work with the app...sooo..
it there any tutorial for using this program with...foobar for example? :D
Thank you, and good luck with your project!

Hi rvrazvan,

Thanks for the kind words :)

It depends on what you want to do with rePhase: correct the phase of an existing loudspeaker? Correct both phase and magnitude? Build the whole crossover with rePhase?...

There are some tutorial online, for example Thierry's here, with a melting pot of all the possible approaches, with a focus on PC VST convolution:
http://www.diyaudio.com/forums/pc-based/223805-easy-fir-crossover-pc-based-drc.html

Here is Another one in French by Jimmy Thomas, explaining how to build an entier crossover with rePhase and Jriver:
http://jimmy.thomas.free.fr/Jriver/Tuto-Jriver-RePhase-HolmImpulse.pdf

If you read French you will find additional information along the way on this topic:
rePhase: linéarisation de phase, EQ et filtrage FIR - Enceintes

Explain you situation and I will see how I can help (and this might be the first step to another tutorial).
 
Hi jmbee

Yes, your tutorial is more in line with what Rvrazvan seems to be looking for!
Especially the second part, "Test avec filtre iir standard L-R. trois voies", as the first part is dealing with a system that is already quite linear in phase :) (using a modified DCX2496 for substractive filtering)

By the way, when using the foobar convolver plugin, it is best to uncheck the "Auto level adjust" checkbox.
 

ra7

Member
Joined 2009
Paid Member
I don't think bypassing the convolver is a good idea. I generated an impulse that makes no correction and use it as the alternate to the 'fixed' impulse. So, the convolver runs for both the cases.

The big thing is not knowing what is being played when you do the listening.

How about this:
1. Play a song in Foobar with the corrected impulse and record the output of the soundcard.
2. Play the same song with uncorrected impulse with convolver running perfect impulse and record output of soundcard.
3. Play both recorded files through speakers using the ABX plugin in Foobar.

Will this capture the change correctly?
 
I don't think bypassing the convolver is a good idea. I generated an impulse that makes no correction and use it as the alternate to the 'fixed' impulse. So, the convolver runs for both the cases.

this is the simplest way to adjust level.
time to switch "flat impulse" to "corrected impulse" do not allow an accurate setting.
auditive memory is not required,when bypassing on the fly.

How about this:
1. Play a song in Foobar with the corrected impulse and record the output of the soundcard.
2. Play the same song with uncorrected impulse with convolver running perfect impulse and record output of soundcard.
3. Play both recorded files through speakers using the ABX plugin in Foobar

yes,you can convolve "offline" and record.
why don't use multiple instance of foobar instead ? play/pause for each instance.
 
Hi jmbee

Yes, your tutorial is more in line with what Rvrazvan seems to be looking for!
Especially the second part, "Test avec filtre iir standard L-R. trois voies", as the first part is dealing with a system that is already quite linear in phase :) (using a modified DCX2496 for substractive filtering)

By the way, when using the foobar convolver plugin, it is best to uncheck the "Auto level adjust" checkbox.

Hi Pos,

Thank you for the advice, i have corrected.
Even with the DCX in subtractive-delay, Rephase alows to improve low frequency response, less boominess, more focused.

crd
 

ra7

Member
Joined 2009
Paid Member
Offline convolution looks like a good solution indeed.
SoX should be able to do that using the txt impulse format (never tried though).

What are you loudspeakers and correction settings?
What improvements are you hearing (halucinating? :D) ?

It's a simple two-way with vented Deltalite2515 and SEOS12. I have large tractrix horns, but they are down for repair at the moment.

I corrected the vented response and the 6th order crossover at about 1200 Hz.

On one particular song, there is percussion with flute. With corrected phase, I seem to latch on to the flute, and everything makes sense. Without corrected phase, I latch on to the bass and the music doesn't make as much sense.

Instruments have more power in space, i.e., better defined, easily localized and I can follow them more easily. In general, it feels more relaxed as I can follow things more easily.