# fixing windowing range?



## rewjack (Aug 24, 2011)

Hi
I uses windowing centered on the first arrival pulse of the signal for the IR window settings when I fine tune the phase matching at crossover position between two drivers.

In practice, I do not use the windowed SPL graph to see the XO frequency crossover point because of the influence of local dips and highs close to this point that gives a wrong idea of the real place to match the phases. I prefer use the non windowed graphs on all SPL window and do some A+B math to get a first appreciation of summations an the average XO position at the present delay settings.

All this to ask how to fix the right windowing range when I begin the process. I think it's easy to figure out the centered value on first arrival. But the before and after time scale (position) is a more difficult choice.

Like for the subwoofer to woofer setting, I used a 20ms before and a 50ms after, centered on 36ms (20-36-50) in my last measurements. I did tryed other and greater values for the after position too. It usually dépends on the presence of the SPL curve dipps or bumps around.

For Woofer to mid, my windowing looks around 10-30(first arr.)-30
For mid to tweeter, it's around something like 2-40-2.

These settings are examples of the values that served me the best to get a good phase overlay graph used to fine tuned the time delays between drivers. However,I saw that a change in the windowing before and after limits will change the phase matching results.

Is it clear enough? 

I Wonder if it is better to Windows only the first arrival small dip-peak and the firts big one, or take a larger sample?

Tell me wkat I should use.

thank-you
jacques 









t


----------



## jtalden (Mar 12, 2009)

I'm not sure I followed all your comments. Its a complicated process to put in a few words. There are various approaches depending on the situation. A specific example to work through would probably help. I will offer a couple of comments to see if they are helpful.

> If the IRs are shifted very far from 0 ms as is normal (with loopback engaged) then the slope of the trace in the phase chart is very steep and more problematic to read properly. I prefer to shift both IRs the same amount to put the HF IR at 0 ms. 

> The left window needs to be set just to the left of the initial IR rise. 1 ms before the initial rise is fine for most work. The right window can then be placed experimentally. With the left properly set REW will truncate the trace of the low frequencies that are outside the window setting. We can we can just reduce the right window setting until the room reflections are minimized in the trace. We always need to leave the truncation frequency a maximum of 1/8 the XO freq so that distortion of the trace is not an issue.

So, if we are working on a 2k XO and the TW IR peak is at 10.444 ms, we can shift both the TW and MF IRs by 10.444 ms to place them near zero. The worst case window settings can then be 1, 0, 3. This will provide a range of 4 ms and a lower freq limit of 250 Hz. The right window is best left larger than this if possible to still have clean trace of the direct signal. 

Be sure the window size works for the MW as well. It will when the delays are close to the final values.

It is often helpful to change the right window style to Blackman-Harris 4 to help clean up the trace. It does add a more trace distortion so the window width needs to be larger. I usually can set the right window setting significantly larger this way and thus end up with a net gain of accuracy. Do not change the left window style.

*Here* is a link to some info you may find helpful. 

With a close mic position for upper XOs as in the link, there is no problem avoiding room effects. The same process will work for SW to main alignment with the mic at the LP. In that case it sometimes does take a little experience to properly interpret the direct signal through the room effects. The extent of the problem will vary greatly depending on the room setup.

I find with REW that 1/48 smoothing is best when working on difficult SW-MW XO phase settings.

----------------

Edit:
Oops, I see I was distracted by the "phase matching" comment and you question was about the SPL chart. Sorry for the confusion. I will see if I can provide any guidelines for that as well. It is very different than the phase chart case.


----------



## jtalden (Mar 12, 2009)

Okay - if you are looking at the SPL chart in the SW-main XO range to set timing then there is no need for windowing. Just leave the default settings. It is often helpful to use some smoothing to make it easier to tell the net affect of timing differences. I often use 1/12 or even 1/6 to clean up the chart if needed. I think it would be risky to use any window settings that starts to impact the SPL in the XO region. The relatively narrow windows used for the phase chart will not work for the SW-main SPL chart. With the mic at the LP this is true for the higher XOs as well.

If you are working with near field mic locations on a >2k XO then the window can be used to isolate the direct field SPL. This probably would not impact the timing result significantly as the room effects are already minimized by the near field mic position. 

In summary, the windowing used is very dependent upon the job and chart at hand. Making any specific recommendations implies we have specific set of objectives and circumstances in mind. Since I am not entirely clear on your situation take all this advice accordingly.


----------



## rewjack (Aug 24, 2011)

It's very good, maybe précisions on my set-up will clarified some points


jtalden said:


> > If the IRs are shifted very far from 0 ms as is normal (with loopback engaged) then the slope of the trace in the phase chart is very steep and more problematic to read properly. I prefer to shift both IRs the same amount to put the HF IR at 0 ms.


I think you understood that It's a 3 way + subwoofer multiamps (4) and multi-channels (8) All DSP in Jriver's MC19 (RME sound card).
I start delays correction with the subwoofer's IR response for the chain of delays. It's around 36ms from the next driver in distance order, sub vs woofers. After having settled the SW/woofer delay at 0ms(sw) and 36ms(w), the Woofer has to keep this delay for further time settings with mids (minimum 36ms in settings). Mid and woofer centers haves about a 3cm distance. Mids and tweeters distance is around this also. At the end something like 0ms (sw), 36ms (w), 36.2ms (M) and 36.215 (tw). Reals numbers are in my other PC though I give aprox. values.

So the ZERO time is set at subwoofer (back wall) and the open baffle's drivers are 2 meters from it.



jtalden said:


> > The left window needs to be set just to the left of the initial IR rise. 1 ms before the initial rise is fine for most work. The right window can then be placed experimentally. With the left properly set REW will truncate the trace of the low frequencies that are outside the window setting. We can we can just reduce the right window setting until the room reflections are minimized in the trace. We always need to leave the truncation frequency a maximum of 1/8 the XO freq so that distortion of the trace is not an issue.


 This experimental right window is where I am more aware of. I find it difficult to choose.



jtalden said:


> So, if we are working on a 2k XO and the TW IR peak is at 10.444 ms, we can shift both the TW and MF IRs by 10.444 ms to place them near zero. The worst case window settings can then be 1, 0, 3.


I change delays in Jriver in real time and I must keep real delays all the way to end with the right numbers already settled?? Maybe I am missing something here? I find it easyer this way.





jtalden said:


> Be sure the window size works for the MW as well. It will when the delays are close to the final values.


 The same size for MT and WM ? Can you develop, what you mean by the window size, They have different left and right limits. Is it the visual window? It must be it.



jtalden said:


> It is often helpful to change the right window style to Blackman-Harris 4 to help clean up the trace. It does add a more trace distortion so the window width needs to be larger. I usually can set the right window setting significantly larger this way and thus end up with a net gain of accuracy. Do not change the left window style.


OUPS!, I used Blackman-Harris 4 for all of them. Is that wrong?




jtalden said:


> Edit:
> Oops, I see I was distracted by the "phase matching" comment and you question was about the SPL chart. Sorry for the confusion. I will see if I can provide any guidelines for that as well. It is very different than the phase chart case.


That's fine, I was talking about phase chart, but I uses non windowed SPL to see the right XO region to be in phase in the windowed phase chart.

regards
jacques


----------



## jtalden (Mar 12, 2009)

I now am understanding you are adjusting delays based on mic at the LP using the phase chart in REW. If this is not correct please disregard. One my points of confusion is why the SPL chart enters into the discussion. Only the IR response, windowing and the phase chart are involved. Of course, we will eventually want to look at the SPL chart but then the window settings are completely different for that purpose.



rewjack said:


> It's very good, maybe précisions on my set-up will clarified some points
> 
> I think you understood that It's a 3 way + subwoofer multiamps (4) and multi-channels (8) All DSP in Jriver's MC19 (RME sound card).
> I start delays correction with the subwoofer's IR response for the chain of delays. It's around 36ms from the next driver in distance order, sub vs woofers. After having settled the SW/woofer delay at 0ms(sw) and 36ms(w), the Woofer has to keep this delay for further time settings with mids (minimum 36ms in settings). Mid and woofer centers haves about a 3cm distance. Mids and tweeters distance is around this also. At the end something like 0ms (sw), 36ms (w), 36.2ms (M) and 36.215 (tw). Reals numbers are in my other PC though I give aprox. values.
> ...


I understand. This is okay. Let's call the drivers SW, W, MR and TW.



> This experimental right window is where I am more aware of. I find it difficult to choose.


In general, we reduce the window until the room reflections are eliminated or reduced far enough so that the phase tracking of direct signal is clear. We cannot reduce it more that I indicated above or the direct phase starts to be impacted also. If the IR is not shifted to 0 ms the direct phase will be difficult to separate from the room reflections.



> I change delays in Jriver in real time and I must keep real delays all the way to end with the right numbers already settled?? Maybe I am missing something here? I find it easyer this way.


The delay numbers in JRiver would be the real numbers just as you describe above. The "shift" in my example is a manual shift to the IR position in REW, not to the delay numbers in JRiver. The shift is to confirm/adjust the JRiver delay setting by using the REW phase chart. When the REW IRs are delayed so far from zero it is more difficult to assure we have; selected the conventional timing alignment, are looking at the direct signal phase, and have good phase tracking through the entire range. It's a pain to shift all drivers IRs manually in REW, but well advised in my opinion. If we decide to add another 0.1 ms to the MR we add that to the MR and TW delay settings in JRiver.



> The same size for MT and WM ? Can you develop, what you mean by the window size, They have different left and right limits. Is it the visual window? It must be it.


For the purpose timing adjustment from the LP it is probably needed to adjust the IR window size differently for each XO. A good window for the W-MR would be different than for the MR-TW XO. So the window size for the MR depends on which XO is being looked at.

OUPS!, I used Blackman-Harris 4 for all of them. Is that wrong?

That will probably be okay. Just keep the left window close and be sure the window doesn't clip off any of the IR trace above zero. On occasion I have seen an apparent infringement of the IR peak when using 1 ms with a B-H 4 on the left window. This may only be a matter of the rendering of the window in REW rather than something that would actually impact the calculation. Leaving it at the default just saves a few mouse clicks and a little time with no negative impact on the result. When we change the window settings for multiple drivers several times, remeasure and repeat the process, then it's nice to eliminate unneeded clicks.

If you think I can be helpful it would probably much more efficient to discuss one of you actual measurement files. I'm a little (okay a lot) fixated on the IR shift as an issue while your question hinges on the right window width. I think they are related, but I maybe I am not be envisioning your situation. "Pictures with circles and arrows and paragraph on back..." is always helpful for understanding. A ".mdat" file is most helpful.


----------



## rewjack (Aug 24, 2011)

jtalden said:


> I now am understanding you are adjusting delays based on mic at the LP using the phase chart in REW. If this is not correct please disregard. One my points of confusion is why the SPL chart enters into the discussion. Only the IR response, windowing and the phase chart are involved. Of course, we will eventually want to look at the SPL chart but then the window settings are completely different for that purpose.


That's right, It's LP position.

I'll do like you suggested and try new windowing soon and I'll come back with REW files and pictures.

I agree that the SPL chart is a different issue but recently I found that it was usefull to follow the RTA results (SPL) while doing phase and time corrections because a couple of time, I ended with negative addition at crossover point after all the phase tuning work. When the freq response is also right with a good summation, It's faster (for me). I also play with lowpass and highpass filters to moove the XO position when things seems harder to fit together. A personnal habbit I guess.


Thank you again for these tips and stay around.

regards
jacques


----------



## jtalden (Mar 12, 2009)

That's the first that you mentioned that the SPL was using the RTA. That is a different method and it also works well when done properly. It is easier to explain and implement. There is nothing wrong with doing it that way. You can still confirm the final settings with sweep measurements and the Phase chart. The RTA method is not as sensitive for subtle adjustments, but there is also probably a negligible impact on the sound field as well.


There is no issue in using different filter orders or types (but, bes, L-R) for the LPF and HPF sections of an XO. Most all of my setups are that way. It is often possible to more accurately align the phase throughout the entire XO range when we have that flexibility. Because of my driver characteristics, it is also advantageous for me to have different frequency settings for the 2 sections. 

I'm often surprised at the differences that can be heard when some of these XO choices are made even when the different XO setups are very well aligned and EQed. It's tough to point at the measurements that explain the difference. It's also difficult to decide which settings I prefer.


----------



## rewjack (Aug 24, 2011)

Here's the data I promessed.
I've been able to make new measurement tonight, but only using my old way, Jriver's MC19 DSP delays and XO settings. When I talk about "XO" here I mean acoustic "XO" at LP. There is too many new learnings in one night if I want to work in REW alone and transfer numbers in Jriver after like you advided. I'll understand better in a more quiet and relax day with your appreciated help.

So I'm joining my measurements for the right side loudspeaker's 3 drivers and sub. I'm using the left channel for time reference on a dedicated DAC from which the subwoofer is using just one of the two outputs, (4 DACS, one for each driver pair). When measurements are done, I'm mixing left and right subwoofers channels to one of the sound card 8 outputs. The two sides loudspeakers will be aligned later.

I started with the subwoofer at "0" ms. The IR chart shows a first arrival at 42ms (fig 1) just where the pulse begins to go down. Need to have a standard way of fixing this center time IR window. It ended with a 30-42-10 ms windowing for the subwoofer as a starting point (10-100hz signal 256k). This windowing setting is quite different than what I used before (20-50-100).

Next is SW-Woofer matching. A 13,8ms delay brings the phases at 39,8 Hz XO with less than 4 deg. difference (fig 2), the allspl (fig 3) shows a fairly good A+B math addition. These are two 15" drivers (SW-W) where IR is less important than a good phase match. Remember, these are quick measurements and fine tuning will have to be performed later.

After several tryings, the woofer/mid range crossover would be around 117hz. The first arrival pulse is set to 25ms (fig 4) and the widowing is set to 10-25-8 ms. This is the part I want to clarify the most, the right side ms limit. A 19,2ms jJriver delay (including the woofer-SW 13,8 ms delay). In my prior measurement method, I used something like a 10-47-30 windowing setting, much more wide right limit than today. Results were also good though. The ALLSPL (fig 5) chart is less good but enough for now. The phase overlay is fine for me (fig 6), an excellent 1 deg difference at XO position.

The MR/TW XO was done rapidly. Firts arrival is aprox. at 28ms (fig 7) giving a 1-28-2ms setting for windowing. Used 4-28-4 before. AllSPL (fig 8) is showing a XO at 3140hz with an OK A+B. The phases are not perfects now. The IR overlay (Fig 9) will change a little. Finally, fig 10 shows the total RTA measurements with all drivers separatly and together.

An interesting additionnal information, I uses only 2 EQ corrections. A first one at 60hz with a small -3 db and a +4db at 16Khz. The freq response is quite flat if you consider that the blue lines are measurements at my left ear and the red ones at the right ear. This indicate the great importance of not taking only one position for EQing. You could be at a wrong or a good location, the best is the averaging of your left and right side. 

For today purpose, I'll attached mdat files. Hope this will give a clearer idea of the proceeding. I'll may work more with REW's tools for delays calculation and bring them into Jriver. But for now this is the way I'm used to. I'm waiting for advices.

jacques
PS: Sorry there is no number for fig. they are in order 1 to 10


----------



## jtalden (Mar 12, 2009)

I'll use your driver terminology; SR, WR, MR, TR.
I don't think you chose "conventional" XO tracking in all cases. Without shifting all the IRs it is difficult to tell so below we will walk through the process and see how well the phase tracks in each XO range. 

> The REW IRs must be manually moved to near 0 ms in order to read the phase chart clearly.
> In order to retain the relative delays between the IRs we need to shift them both by the same amount.
> We could shift all of the Drivers by the same amount except that if they are not very close to the correct timing they still will be very difficult to work with.

I suggest this method for your situation:
> Work with each XO separately.
> Move both drives by the amount the higher freq driver is offset from 0 ms.
> Evaluate the phase chart and determine if a correction is needed and change the relative delay accordingly. 
> Remeasure and confirm the correction (or just do the math A+B to confirm and only remeasure when all driver delays are corrected.)
> When the correct relative offset is found then the process is complete for that XO. The relative timing between them is recorded and must be used for the final addition of all the driver delays. 
> To simplify this process start with the 3.4 kHz XO and work down. We can work up, from low to high freq XO but that is a little more complicated to do.

Your Data:
[I am working with your windowed traces since they are duplicates of the unwindowed traces. My first change is to widen the window setting as they are incorrect for this purpose. (okay - the current settings are incorrect for any purpose.  We will window again later if needed.] 

MR-TR XO:
> Inspect the TR IR position and find that its rise is at ~29.5 ms (a nice round number in the ballpark)
> Move both driver IR manually by this amount in REW so they now both fall near 0 ms.
Below is how they now look. The same relative position to each other, but both are now near 0 ms.








> Now we look at the phase chart and decide if we need to window the data. Yes we do, as room reflections make it difficult to read the direct phase (not shown). I reset the window for both drivers to 1,0,4 as shown on the chart below. This establishes a lower limit at 200 Hz. This is low enough for a 3.4 kHz XO. The result is a pretty clear picture of the direct signal phase for both drivers. As shown below the phase tracking is not ideal. At 1 kHz the drivers are ~180° out of phase. At the XO point they are ~70° out and then they converge for the upper end of the range.








> We know that the lower end of a drivers range does not respond to a change in delay as much as the higher freqs. So to obtain better phase tracking I first inverted the MR IR (change the polarity to negative). That aligned the lower part of the range pretty well. Then I shifted the MR IR -0.090 ms (more delay) to rotate the upper end of the range to better match the TR trace. Below is the resulting IR positions and following that the resulting phase tracking.















We can see the phase tracking is now much better across the entire XO range. Since we increased the delay on the MR that pushed it even further delayed from the TW. [Most often the TR would be more delayed than the MR so your driver situation is a little unusual.] Using your previous delay settings above MR = 36.215 and TR = 36.2 we need to add 0.090 ms more delay to the MR so the relative delay of the MR changes from +0.015 to +0.105 ms relative to the TR. Since eventually we will be adding delays starting from the SR at 0 ms it is better to record this as "TR delay = MR delay - 0.105 ms".

The SPL chart below is the A + B of the new alignment. We can see there is now good SPL support through the entire XO range. For this math I; removed the window (back near defaults), removed smoothing, did the math and then smoothed the result to better show the impact.








So the relative delay is now defined between the MR and TR and we can now evaluate the WR-MR XO in a similar way. 

That's a lot to absorb. I will stop here for questions. 

We can clear up questions and then decide if you want to:
> Try the next XO yourself. [use the current measurements (remember to invert the WR and then find the relative delay correction to match with the WR)]
> Have me do another XO
> Have me suggest delay settings that works for all drivers.


----------



## rewjack (Aug 24, 2011)

Hi jtalden
We are going somewhere.


jtalden said:


> > The REW IRs must be manually moved to near 0 ms in order to read the phase chart clearly.
> .


I thought that there was no difference to bring them to zero ms or living them further as long they were brought together at the begining of the reference driver. However you say that it is important to bring them to the real ''0''ms on the chart. OK them I'll do it.



jtalden said:


> > To simplify this process start with the 3.4 kHz XO and work down. We can work up, from low to high freq XO but that is a little more complicated to do. .


Unfortunatly, you took the only XO that I diid not worked before sending the files. This MR-TR can usually be phased well for all XO region, but not easilly. The ''0'' setting was probably the mistake that render that one so difficult ? 

I used to begin from subwoofer because I fix it at 0ms and the way up, delays had to be added to others. Jriver doesn't accept negative numbers. OK it's all relative and it can be calculated to add the difference to all and bring it to zero.



jtalden said:


> We can clear up questions and then decide if you want to:
> > Try the next XO yourself. [use the current measurements (remember to invert the WR and then find the relative delay correction to match with the WR)]
> > Have me do another XO
> > Have me suggest delay settings that works for all drivers.


Hard choise

If you ask, my choice would be that you try the WR-MR XO too.:T:bigsmile:
Meanwhile I'll try it myself. I need to modify the W-M xo slopes. I've changed the Hpass filter from 24db to 48db because the MR shoulder of the MR side was well patching a hole(dip) that is alway there (110-180hz) with lower slopes. But the result is too harsh to my ears. A greater overlap sounds better. I'll bring it back to 24db from around 105hz. Though it's an other topic. We will stay with REW procedure for now.
Thank you again
jacques


----------



## rewjack (Aug 24, 2011)

jtalden said:


> Using your previous delay settings above MR = 36.215 and TR = 36.2 we need to add 0.090 ms more delay to the MR so the relative delay of the MR changes from +0.015 to +0.105 ms relative to the TR. Since eventually we will be adding delays starting from the SR at 0 ms it is better to record this as "TR delay = MR delay - 0.105 ms".


Just to say that this 36,215ms was changed to 19,2ms in the data I've later attached. Look that they changed from first post to last one.

You may have did it in a purpose that I overlooked, in that case forget this message.

cheers
jacques


----------



## jtalden (Mar 12, 2009)

rewjack said:


> We are going somewhere.


Someplace warmer would be nice. It's 18°F here now and my toes are cold.  



> I thought that there was no difference to bring them to zero ms or living them further as long they were brought together at the begining of the reference driver. However you say that it is important to bring them to the real ''0''ms on the chart. OK them I'll do it.


The phase data is technically "correct" no matter the IR location, but a T driver measured from the LP is almost impossible to read when it is shifted so far from 0 ms. I sure can't do it accurately. As we get to lower freq and closer to 0 ms for the lower XOs it may be more feasible, but I never try it that way.



> Unfortunately, you took the only XO that I did not worked before sending the files. This MR-TR can usually be phased well for all XO region, but not easilly. The ''0'' setting was probably the mistake that render that one so difficult ?


Probably.



> I used to begin from subwoofer because I fix it at 0ms and the way up, delays had to be added to others. Jriver doesn't accept negative numbers. OK it's all relative and it can be calculated to add the difference to all and bring it to zero.


We can work in any order or direction we like. We will get to the same settings in the end. I have several minor reasons why I thought it would be easier to explain if I start with the M-T XO. One of those is that it highlights that a shift to 0 ms is very helpful with REW. [This is only needed because of the way the REW controls are designed. Also, because of the way REW works, the phase charts are much easier to read when using 1/48 smoothing. Any greater smoothing distorts our ability to pick out the direct phase from the reflections.]



> Hard choise
> 
> If you ask, my choice would be that you try the WR-MR XO too.:T:bigsmile:
> Meanwhile I'll try it myself. I need to modify the W-M xo slopes. I've changed the Hpass filter from 24db to 48db because the MR shoulder of the MR side was well patching a hole(dip) that is alway there (110-180hz) with lower slopes. But the result is too harsh to my ears. A greater overlap sounds better. I'll bring it back to 24db from around 105hz. Though it's an other topic. We will stay with REW procedure for now.


I will do the W-M XO alignment on the current file so you can compare results. You should also let me know if you can get the same results that I did on the M-T XO. Once you have the process down then you can try all sorts of XO settings. 

Regarding XO slopes, I must say that after several years of experimentation, I have found that I also prefer the lower XO slopes. This is true even if I convolve the resulting higher slope XO setup so that the resulting phase rotation of both is linear phase, but that is another subject.


----------



## rewjack (Aug 24, 2011)

A work in progress question.
I'm doing WR-MR now and I Wonder if I just moove delays or shift phase to get closer phase for a first moove?
with 3 ms correction more for MR than WR they end at about the same phase diff. as a phase shift. 
How a polarity shist won't mixed up results?

Now I'm doing a windowing with the 3ms diff setting and no polarity shift.


----------



## rewjack (Aug 24, 2011)

Well, 
I had to invert polarity of the MR to get it right.

Here are the results for best delays WR(24ms)-MR(19,2ms).
Fair A+B no smoothing


How do I have to manage this inversion now in Jriver?


----------



## jtalden (Mar 12, 2009)

W-M XO Phase Tracking Investigation:

I see you have posted your results so I will look them over. I just finished my analysis below so you can see what I came up with.

> Used the W and M "win" measurements.
> Removed the window setting - back to defaults.
> Chose to offset both IRs by 28.6 ms in REW to put them nearer 0 ms for phase clarity.
> Determined that some windowing would help the direct phase isolation and reset the window for both to 3, 0 100.
Below is the resulting IR and phase chart representing the current state of relative IR positions and phase tracking:
















The current phase tracking has the 2 drivers in phase at the XO of ~100 Hz but it crosses and diverges to almost 180° at the end of the range. As you show in your SPL charts that results in good SPL support throughout the range. This may work as well as conventional alignment. However, for a conventional alignment, we would like to achieve better tracking throughout the range.

> Inverted the M IR in REW as determined necessary in the M-T XO Investigation. The above chart show this will also help with this XO phase tracking.
> Shifted the W IR -4.6 ms (more delay) and ended up with the alignment shown below. 
















The phase tracking is improved. The new relative delays for this setup are:
Using your estimated original values from above [36ms (w), 36.2ms (M)] the original timing has the M delayed 0.2ms more than the W. Now we delayed the W by 4.6 ms more so the new relative delay is the W delayed 4.4 ms more that the M.


----------



## jtalden (Mar 12, 2009)

rewjack said:


> A work in progress question.
> I'm doing WR-MR now and I Wonder if I just moove delays or shift phase to get closer phase for a first moove?
> with 3 ms correction more for MR than WR they end at about the same phase diff. as a phase shift.
> How a polarity shist won't mixed up results?
> ...


I don't know difference you mean by "shift phase" Vs "move delays". Maybe you are referring to using a variable phase control in JRiver similar to those included on a SW amp? These have no value if the other controls are properly used.

Working in REW we shift the IR. That has the equivalent impact to changing the delay in JRiver and measuring again. You can either work on existing data in REW or actually make the change in JRiver and measure again to confirm the results. You can do whichever is easiest for you.

I can only work in REW with the data you provide.


----------



## jtalden (Mar 12, 2009)

rewjack said:


> Well,
> I had to invert polarity of the MR to get it right.
> 
> Here are the results for best delays WR(24ms)-MR(19,2ms).
> Fair A+B no smoothing


Good job! We both found approximately the same alignment. Your difference is 4.8 ms and mine was 4.4 ms. This is a trivial difference at 100 Hz.

2nd set of phase traces (the windowed ones) are not correct or helpful. They are too heavily windowed and do not represent the true direct phase. I am not sure why you included them. It looks like you found the correct delay without windowing and that is okay when you can do it. I will probably not be possible on the M-T XO however. I can try again to provide some general guidelines for placing of windows if you like.



> How do I have to manage this inversion now in Jriver?


Good Question. I don't use JRiver so I can't help, but I'm confident the control is there someplace.


----------



## rewjack (Aug 24, 2011)

jtalden said:


> I don't know difference you mean by "shift phase" Vs "move delays". Maybe you are referring to using a variable phase control in JRiver similar to those included on a SW amp? These have no value if the other controls are properly used.
> 
> Working in REW we shift the IR. That has the equivalent impact to changing the delay in JRiver and measuring again. You can either work on existing data in REW or actually make the change in JRiver and measure again to confirm the results. You can do whichever is easiest for you.
> 
> I can only work in REW with the data you provide.


No, no, my mistake. I wrote phase and I ment polarity:yikes:

When I look at the phase chart, phase traces are quite distant. I tried two solutions, A) shift the polarity like you suggested and B) just change delays.

After checking further results, It apeared that polarity inversion was the most effective.

The question is what I implies? This inversion has to be considered some how in the system settings, right or wrong?

Looking to my actual results, If i includes the new delays in Jriver and repeat measurements, they match perfectly the IR curve. Though, I can say the are right.

Otherwise, I have to invert the amps outputs to match the windowed phase response in new measurements. The unwindowed phase response do not match anymore for the same signal. I can only suppose that the wall réflexions are involved in this phase deviation. ?

By the way I would prefered your 18deg compared with the -31 Celsius we have here this morning (-24 F). Your toes are happier where you are.


----------



## rewjack (Aug 24, 2011)

Additionnal question

I see that your windowing for WR-MR is set at 3-0-100.

I used 5-0-10.....


----------



## rewjack (Aug 24, 2011)

jtalden said:


> Good job! We both found approximately the same alignment. Your difference is 4.8 ms and mine was 4.4 ms. This is a trivial difference at 100 Hz.
> 
> 2nd set of phase traces (the windowed ones) are not correct or helpful. They are too heavily windowed and do not represent the true direct phase. I am not sure why you included them. It looks like you found the correct delay without windowing and that is okay when you can do it. I will probably not be possible on the M-T XO however. I can try again to provide some general guidelines for placing of windows if you like.
> 
> ...


This is related ro my starting question, the windowing limits. In the process, I've learn to work with REW alone, it is more rapid than repeat all measurements with different delays.

I'm still a bit confused about the direct signal determination. It is a major cause of error, delays are changing when Windows limits change.

It comes back where you said that the right windowing limit is variable. What would be the best clue to choose a good approximation?


----------



## jtalden (Mar 12, 2009)

rewjack said:


> When I look at the phase chart, phase traces are quite distant. I tried two solutions, A) shift the polarity like you suggested and B) just change delays.
> 
> After checking further results, It apeared that polarity inversion was the most effective.
> 
> The question is what I implies? This inversion has to be considered some how in the system settings, right or wrong?


The adjustments we make in REW are virtual. After we model a solution in REW we then need to translate the new settings into JRiver in order to realize them. So if we invert the M and shift the distance between the W and M in REW to find a solution. We then need to translate that change into settings in JRiver if we want to remeasure and view the actual result. Trust me, if model changes are correctly translated into the settings in JRiver then the measured results will be the same. These REW guys are clever.  The trick is not to get confused and shift things the wrong way (as I often do). The good news is that if it doesn't work is our fault, not REW's.



> Looking to my actual results, If i includes the new delays in JRiver and repeat measurements, they match perfectly the IR curve. Though, I can say the are right.


I am not sure I understand. If the IRs are in the correct relationship (delays correct) and the polarity is correct per the REW model then the results should be correct. Are you saying that the new measurements do not show good phase tracking and good SPL reinforcement across the XO range as our modeling predicted?



> Otherwise, I have to invert the amps outputs to match the windowed phase response in new measurements. The unwindowed phase response do not match anymore for the same signal. I can only suppose that the wall réflexions are involved in this phase deviation. ?


JRiver must have a control to invert the polarity within the program - no need to swap wires. It is a common situation that different drivers need different polarities. Maybe they call it something else? 

Room reflections were eliminated in our analysis of direct phase alignment and then added back in to see the SPL response so that is not the issue.



> By the way I would prefered your 18deg compared with the -31 Celsius we have here this morning (-24 F). Your toes are happier where you are.


-31°C !! I think I am going to have nightmares!
Well, at least the view out the window is nice... but my toes are still cold.


----------



## jtalden (Mar 12, 2009)

rewjack said:


> This is related ro my starting question, the windowing limits. In the process, I've learn to work with REW alone, it is more rapid than repeat all measurements with different delays.
> 
> I'm still a bit confused about the direct signal determination. It is a major cause of error, delays are changing when Windows limits change.
> 
> It comes back where you said that the right windowing limit is variable. What would be the best clue to choose a good approximation?


I will work up a guideline on "windowing for phase purposes" to get you started, but it will still probably take a lot of experimentation before you become comfortable.


----------



## rewjack (Aug 24, 2011)

jtalden said:


> -31°C !! I think I am going to have nightmares!
> Well, at least the view out the window is nice... but my toes are still cold.
> View attachment 45428


Wow!
This river below is incridible. Could be on a classical music cover.


----------



## rewjack (Aug 24, 2011)

jtalden said:


> I will work up a guideline on "windowing for phase purposes" to get you started, but it will still probably take a lot of experimentation before you become comfortable.


Good idea.

I had the idea that the direct signal phases would be more significant on a windowed chart for the XO region because it is not corrupted by réflexions. I would not expect they would be in phase out of this region because the drivers are quiet in the isolation zone of the oposite one? This is the reason that I was using this phase windowed chart.

I now have a problem to have a good phase chart for MR-TR like yours. When it is not windowed, I have breaks in linearity, passing from clusters of close -180 to +180 lines
and then, wider spaced and lower angled ones. You see what I mean?. Is there a special setting for the one you showed previously? This may be trivial.

I am in the impression that a good windowing would includes the first rise of the IR seen in the Db Fs view rather than % Fs. The phase lines are getting more parallel with lower limits but large enough to include this rise and a part of the descending followings. What do you think of this observation?

I'm closing the MR-TR XO and listen for a while.

thanks
jacques


----------



## jtalden (Mar 12, 2009)

Window settings for phase alignment purposes:
These are my personal practices just drawn from my own experimentation and influenced by comments from other posters. I don't have a reference to a more authoritative source. 

Let's just look at your original "TR" measurement and set an appropriate window for that measurement. Please follow along with your REW session.

Below are the original IR and phase of the TR:
I set default windows and removed smoothing.















> Note that I zoomed way out on the IR chart so we could see the shape and extents of the default window. The window shows us that the any data within it will be used for calculations.
The default window is set very wide to capture almost any trace entirely within its boundaries. Our trace is easily in the mid part of the window so no part of the IR is clipped/truncated in any way. We can easily see the initial IR rise is offset from 0 ms and the window is much broader on both sides that we need to capture all the data.
> Note that the phase seem to make no sense. There are 2 reasons for this:
1- The IR is far from the 0 ms reference point and thus there is lots of excess phase rotation possibly thousands of degrees. If we were to "unwrap" that trace using REW control panel we would see the line is almost vertical. [REW unwraps phase using the cursor position as the reference positions for the process.]
2- The room reflection masks the direct phase.

To improve these charts first we shift the IR to near 0 ms. Below I manually shifted the IR 29.5 ms (the same number I used in the original analysis.















> Note that the initial rise of the IR now appears to be near 0 ms. This can't be seen accurately as we are still zoomed out so the window setting can still be seen.
> Note that we can see a little clearer phase chart. WE have removed the excess phase rotation and the direct phase is starting to reveal itself. The room reflections still make the direct phase difficult to pick out however. 

With the mic is at the LP, it helps to know the expected typical phase rotation of a driver. That's because it is always easier to see an expected shape hidden amongst a bunch of noise. 
[Note that if we want to see the direct phase of the TR we could just move the mic to close to the driver. Anything less than 1 m is close enough. There, we can use a lower volume setting. The room reflections will be much weaker than the direct signal. We will easily see the direct phase of any tweeter in this way. For lower freq drivers we need to get much closer.]

Below is the IR and phase with more reasonable window settings of 1, 0, 10















Note that:
> Now zoomed in on the IR chart.
> The left IR window is placed just before the IR starts to rise.
> I like to use a B-H4 style window on right hand side so that is included here. I left the default Tukey 0.25 for
the left hand window style. The B-H4 window weights early data near 100% and later data is tapered off (we know the room reflections arrive later than the direct signal).
> The right window is chosen to completely capture the initial several peaks without attenuation. The window (Blue) tells us that the IR data at 2 ms is now weighted only 80% and at 4 ms the IR data is weighted only 40%.
> The window box now indicates the low cutoff freq is ~90 Hz so this is still not impinging on the accuracy of the direct phase in our range of interest. 
[Note that if the left window is not close to first IR data then the window includes excess zero data in the calculation. Therefore the lower cutoff freq will be reported artificially low. If we move the IR data entirely to the left or right of the window then no data in included in the calculations, but the cutoff freq reported is still dependent upon the total width of the window. This cutoff freq only makes sense when the window is properly placed around the data.
> Much of the room reflections have already been eliminated now. We only have one major impact at ~3.1 kHz. If we ignore that spike and instead visualize a best fit curves line through all the remaining small ripples - that is the direct phase. This is where I would normally stop as the direct phase is clear enough and the window setting is still generous.

For interest, we can tighten the window a little further making sure the reported minimum freq is still well below the lowest freq of interest. A window of 1, 0, 4 reports a cutoff of 200 Hz as shown below: 
















This is about as tight as we can go without starting to impact the direct signal. I used that setting in the analysis above as I wanted to show the cleanest direct phase trace that is possible for your measurement at the LP. You can experiment yourself too see what happens when the window truncates the IR data too much. 

I did not show the "MR" window process as it is similar to the TR. 
> Note that, the final windows need to be properly set for both drivers. If the initial relative IR positions vary much from the correct final positions then tight window setting may result in truncated data when an IR shift is made. So it is better to leave generous settings at least until the IRs are close to their final positions.
> Note that, the right and left window setting do not need to be the same for the 2 drivers as the IR positions and shapes are not the same. We do need to keep the reference position at 0 ms however. 

I forgot to point out that the IR chart will show the IR data truncation if the "Windowed" box is selected on the chart. It will also give a good idea of the data impact of a window setting.

I also forgot to remind you that with REW only the 1/48 smoothing works best for picking out the direct phase clearly when there are still room reflections present in the data. I used no smoothing here. That is the only other one that works well. It is often the same as 1/48 depending on your personal REW settings. 

This covers all the basics and a couple of the finer points. If you can follow this then you should be able to accurately window for phase alignment purposes. It does take some experimentation to really understand it well.


----------



## jtalden (Mar 12, 2009)

rewjack said:


> Good idea.
> 
> I had the idea that the direct signal phases would be more significant on a windowed chart for the XO region because it is not corrupted by réflexions. I would not expect they would be in phase out of this region because the drivers are quiet in the isolation zone of the oposite one? This is the reason that I was using this phase windowed chart.
> 
> ...


hopefully my above post clears up the questions here.


----------



## rewjack (Aug 24, 2011)

jtalden said:


> Window settings for phase alignment purposes:
> > Note that, the right and left window setting do not need to be the same for the 2 drivers as the IR positions and shapes are not the same. We do need to keep the reference position at 0 ms however.


Hey jtalden, this is a very nice and clear short course.:T
It may look trivial for experts? But sometime errors are made in surprizing places.

I had too many gray zones while doing all sort of experiments, many mistakes. It was not realy a pure lost of time, practice is always good, but maybe to much when you miss an important practical point.

You lighten up many remaining questions in that post. This moorning I just spent close to two hours to try best fit subwoofer-woofer IR best window trying every possible mooves keeping the exact IR window limits the same:scratch:

Now if they can have different limits except for the zero position, my problem is gone.

The rest will be easy now.

Great work.

Are you a teacher? (hope not in English, I'm bad :innocent

thanks a lot

jacques


----------



## jtalden (Mar 12, 2009)

rewjack said:


> Now if they can have different limits except for the zero position, my problem is gone.


It is often some small part that of the process that eludes us. I'm glad we finally got the sun to come out! :sn:



> Are you a teacher?


I was and engineer and had lots of experience trying to present technical concepts to non technical management, customers, etc.

When you get all tuned in I would be interested an .mdat of that right channel so I can see the final result.


----------



## rewjack (Aug 24, 2011)

jtalden said:


> It is often some small part that of the process that eludes us. I'm glad we finally got the sun to come out! :sn:
> 
> I was and engineer and had lots of experience trying to present technical concepts to non technical management, customers, etc.
> 
> When you get all tuned in I would be interested an .mdat of that right channel so I can see the final result.


This is it for now.
delays for Jriver
SW= 0ms
WR= 34ms (34)
MR = 39,4ms (5,4)
TR= 40,2ms (0,8)

delays in REW to bring sig close to "0"
SW-WR= 32ms, WR-MR=45ms and MR-TR =49,5ms

Tell me your's

cheers
jacques


----------



## jtalden (Mar 12, 2009)

Your settings are pretty close to what I would suggest for the current speaker polarities. 

Below are the settings that I would suggest to achieve the best phase tracking through the XO ranges. These require the polarity of 2 of the drivers to be reversed.

Note that in the table below, I just assumed all you current polarities are Positive. It is difficult to tell for sure with high order filters engaged. Regardless of what they are now, I am suggesting that the WR and MR be reversed in polarity. Of course, optionally the SW and TW could be reversed instead.

The impact on SPL at the XOs is probably not significant, but there would be a small amount. The improved phase tracking through the XO may not be audible either. I often think I can hear a difference of this type, but it is subtle and it's difficult to say which one is better sounding. This is more just to achieve a technically more conventional target for phase alignment. You may want to evaluate both and decide for yourself.


No code has to be inserted here.


No code has to be inserted here.

























FYI: I opened up the right window setting for my graphs a little. Yours are okay but are pushing the limit. I wanted to be sure the direct phase was not impacted too much. I approximately doubled you right window settings. I also changed the SW-WR shift a little just to clean up the graph a little and make it easier to read. It has no practical effect on the results. It just changes the location of the upper end of the traces. Their relative positions remain unchanged.


----------



## rewjack (Aug 24, 2011)

jtalden said:


> Your settings are pretty close to what I would suggest for the current speaker polarities.
> 
> Below are the settings that I would suggest to achieve the best phase tracking through the XO ranges. These require the polarity of 2 of the drivers to be reversed.
> 
> ...


Great improvement, not a large one but subtile in tiny tone variations of guitar and other nice flowing sounds.

I've made some new changes. The MR was cut at 105hz in the LF with a 12 db/oct filter and I came back to 24db at 80hz in order to have a better A+B result, delays were done after and did not changed these settings. Doing this, I had to raise the SW and WR volumes on the soundcard outputs. It is quite usefull to control the 8 channels separately without having to use filters.

My new settings are very,very,very good. The best ever, thanks to you.

I, for the moment, did not inverted polarity like you suggested. I would like to discuss further this part with you later, using IR charts. No time today, but I'll be back. To give you a hint, I see that the WR driver shows a large first pulse where the MR double the pulse frequency (not hz, just numbers per ms). So I imagine that the MR negative peak has began with a small positive one that rapidly changed for negative. Would it be a positive one. This needs an anoted chart. 

The other point would be the phase chart using windowed IR. I've previously told you that I think that outside XO region, the drivers wont have to be in phase. Though using windowed IR limited to the XO region should be OK. This is only my impression based on this personal comprehension. I'd like to know your opinion on this.


jacques


----------



## jtalden (Mar 12, 2009)

rewjack said:


> I would like to discuss further this part with you later, using IR charts. No time today, but I'll be back. To give you a hint, I see that the WR driver shows a large first pulse where the MR double the pulse frequency (not hz, just numbers per ms). So I imagine that the MR negative peak has began with a small positive one that rapidly changed for negative. Would it be a positive one. This needs an anoted chart.


The higher the freq that is swept, the closer the IR peaks will be placed in time. The WR starts falling off at 110 Hz and MR sweep continues to 300 Hz in your data so its peaks are more closely spaced. Not sure if that was your question, but if not, I will be here when you have more time to elaborate. 



> The other point would be the phase chart using windowed IR. I've previously told you that I think that outside XO region, the drivers wont have to be in phase. Though using windowed IR limited to the XO region should be OK. This is only my impression based on this personal comprehension. I'd like to know your opinion on this.


Yes, that is correct, outside the XO range they don't need to in phase. 

What is the extent of the XO range though? We could define the XO range as when the SPL drops by 20, 30, 40, 50 ... dB? We could say when it hits to noise floor, but that depends on the measurement SPL level and our noise floor level. 

We can assert (and back with studies) that the phase doesn't matter and we should only be concerned that there is enough SPL support for our house curve. There have been many well regarded speakers that apparently did not go beyond choosing the polarity that provides the most SPL support. Is the SPL support really the only criteria that is needed for good sound? 

For a "conventional" alignment why not just chose to find the best possible alignment over the entire XO range that we can see using our standard measuring SPL level and our noise floor? That is what I did for my recommendation. It only takes setting the polarities and adjusting the delays. We can fine tune it further by changing the LPF or HPF to help enable even closer phase tracking than I achieved with your current data.

If we are not going for a conventional alignment and purposefully crossing phase curves at the XO freq then what are the tradeoffs? I have experimented with having linear phase except at the XO ranges where they rise to 90°. That way, much of the freq range is near 0° and the total GD is reduced a little. The SPL is still similar in the XO range so it is difficult to know which setup is better. I think they do sound different, but which one is more correct? Is it basically a tradeoff? 

With a setup like yours you can experiment with dozens of good setups and decide for yourself. I was only pointing you to a "conventional" alignment as that seems to be the most common target discussed when using IIR filters. I consider it to be a safe final setting for those that want to get out of the setup business and into the listening business. It is also the initial benchmark I would suggest to those that want to experiment with some of the other options.


----------



## rewjack (Aug 24, 2011)

EDITED I changed the drivers names by mistake... (wrong names on picture)

So they are SW and WR, not WR and MR

Polarity check


jtalden said:


> The higher the freq that is swept, the closer the IR peaks will be placed in time. The WR starts falling off at 110 Hz and MR sweep continues to 300 Hz in your data so its peaks are more closely spaced. Not sure if that was your question, but if not, I will be here when you have more time to elaborate.


Here is the IR chart for SR and WR. Without any other reason than the first rise direction (up) I would have think that they both have a positive polarity. I suppose that is not the case?

If it's not right, show me how to define this very trivial question.

jacques


----------



## jtalden (Mar 12, 2009)

Oh good, a simple question! 

High order filters cause significant phase rotation and thus the IR develops additional peaks. The initial rise is then no longer a reliable indicator. A 4th order filter can result in a small peak starting in the opposite direction. With higher orders it grows larger until it eventually rolls back again. If you want to be sure of the polarity disable all the filters and make a sweep. Near field is good. The rise of the IR will then be indicative of the polarity. Of course we need to be sure the entire measurement chain is correctly calibrated first via a loopback measurement. 1st or 2nd order filters (as a speaker in a box) will not be a problem.

Since we intend to measure and set the polarity to align the phase in the manner we want, and may reverse the polarity anyway to achieve that alignment, it is not important which way we are wired to start with.


----------

