• Welcome to ASR. There are many reviews of audio hardware and expert members to help answer your questions. Click here to have your audio equipment measured for free!

Time Alignment with Wavelets

I didn't get this statement, it's not inverting polarity, it's just a change in the phase response (which reaches 180 degrees at the specified corner frequency for a biquad all pass hence is closing in on 180 at your chosen frequency given that's not so far from the corner frequency)

What I said was clumsily worded. Appearance of inverted polarity can be due to 3 things (1) actual inverted polarity (2) time shifts (3) phase shifts. I should have said, same start time = not a time shift, therefore it's either actual inverted polarity or phase shift. Well we know it's phase shift since I actually shifted the phase for the simulation!

Anyway it seems as if there are only 3 of us who are interested in this, we have probably bored the rest of ASR to tears.
 
Anyway it seems as if there are only 3 of us who are interested in this, we have probably bored the rest of ASR to tears.
I am very interested and not bored and trying to follow along. Wavelets and the SynAudcon method really bring into focus what it means to "align" a subwoofer, there is a lot more to it than I realized. When you combine trying to align polarity, phase, and timing, with the limitations and difficulty of in-room LF acoustic measurements, it becomes a lot to wrap your head around. Thanks for starting this thread and the DSP thread, I have learned a lot.
 
I've thrown together a quick schematic in a DSP processor that has a LR 24 dB/oct crossover @125Hz. A commonly used xover topology.
Idea here is the low pass side is an electrical sub; and the high pass side is an electrical main.


The dual channel FFT below is showing the summation of both sides of the LR24, giving flat magnitude and 360 degrees of phase rotation.
1747839971481.png



The two sides of the xover's wavelets can be compared to each other, directly from the processor simultaneously.

Scope Ch1 is the low-pass sub side; Ch2 is the high-pass main side.
Here's the two sides, no filtering beyond lpf and hpf. 125 Hz 6.5 cycle Hann.

1747840190991.png


Easy to see above that peaks align. Now to zoom in on the starts of that graph.
1747840438930.png


Make of the initial rises what you will.


That was as clean a low side to high side comparison as possible. A pure complementary xover summation.
Now I'll throw in a simple first order all-pass as a real world type anomaly to textbook electric...I could use any filter to make the point, or use unmatched xover orders...whatever that starts to deviate from pure complementary summations.

Here's the filter and the transfer function of the new summation.
1747840944224.png


Now for the new wavelets with the all-pass on the 'sub' channel.
1747841129161.png


Ok, let's just say the initial rises are the same, and need no fixed time delay adjustment. How do we get rid of whatever is causing the shift between wavelets.
Well, obviously through phase, by removing the phase shift......which in this case would be just turning off the all-pass put into play
But what when it's not a case of synthetic phase shift ..... and a case where the phase is different between the two sides due to different acoustic roll-offs?
Nothing we can just turn off.

The phase shift is mild enough in this example that the blue scope trace shows only slight asymmetry in the height of the peaks around the central peak.
So I'm going to ignore it and look at time between peaks.

1747842082660.png


Ok, now I'll delay the main high pass side by the 2.03ms between peaks,
and check the transfer function of the summation.

Transfer summation looks good, with only the slightest magnitude dip around 300Hz.
1747842367727.png


And last for the wavelets with all-pass on blue sub ch 2
& 2.03ms delay on yellow main ch 1.

1747842481930.png


Look at dem peaks !
 
Last edited:
I'm not bored at all! Just struggling to follow along and implement a lot of new technique and thought.

I actually wish there were more threads on ASR like this.
 
I watch the thread too, I like ways to verify stuff and this one looks good.
But unless something concrete come in (in the form of someone who probably has formal education about it) it seems that anything till now is guessing.

Good guessing maybe but actual, real life usable with actual measurable results? Anechoic is hard to do to confirm results but even something close could do.
Problem is that it's the lows that probably interest people and gated measurements there are useless.
 
If you want more proof that we should not be aligning to the peaks, here is a more dramatic example. We are using the same 50Hz wavelet, but this time the AP filter is 30Hz, with Q 0.3.

View attachment 452452

Just as before, red is the original, and blue is the wavelet convolved with the AP filter to simulate phase distortion.

View attachment 452451

First up, let's look at impulse start: it's the same. The fact that impulse start is the same tells me that the appearance of polarity inversion is actually polarity inversion and not time shift.

View attachment 452453

So we invert the polarity. Now the phase distortion causing the time shift of the impulse peak isn't subtle any more. I'm not going to bother showing the end of the impulse, you can guess that the waveform is stretched and so impulse end is delayed.

I also wondered whether the impulse peak of the phase distorted version would change if we used a longer train of wavelets (i.e. that the measurement may be influenced by the test signal). So I simulated that, too. I'm not going to show you the curves but the short answer is: no difference.

Glad to see others besides have interest too. So I'll comment on this post.

Let me pull out from above "First up, let's look at impulse start: it's the same. The fact that impulse start is the same tells me that the appearance of polarity inversion is actually polarity inversion and not time shift."

It's not a polarity inversion. If it were, the wavelets would be pure mirror images over the x-axis....with no deviation from mirror images anywhere, including starts and tails.
 
Time for a simulation to clear this up.

View attachment 452421

Take a 50Hz wavelet (red). Create a 50Hz all-pass filter with a Q of 0.3. Convolve the AP filter with the wavelet. The result is in blue. We can see that an all-pass filter changes the waveform dramatically. Let's see what the differences are.

View attachment 452432

The impulse start has not changed. If you don't believe me, here is an extreme zoom of the impulse start (look at the vertical scale on the left to see how much I have zoomed in).
View attachment 452424

This is impulse end. We can see that the AP filter has stretched the impulse by about 76.5 ms (I didn't bother trying to place the cursor exactly ... but I think i've made the point).

View attachment 452428

Now we invert the polarity of the distorted wavelet. We can see it is a better match to the original, and we can see that the "shoulders" of the waveform are asymmetrical.

View attachment 452431

This is an extreme zoom of the impulse peak. It's subtle, but you can see that the wavelet with the phase distortion is slightly delayed compared to the original. I measured it at 0.0625ms.

So we can see that phase distortion:

1. Stretches the waveform and distorts the left/right halves on either side of the main peak
2. Does not change the delay to impulse start
3. Changes the delay to impulse peak due to waveform distortion
4. Does not change the frequency
5. May give the appearance of inverted polarity

If someone wants to make the same simulation in REW, this is the procedure:
- Go to that wavelet generator and save to file. Then reopen it in REW.
- Use rePhase to make a few AP filters with the same freq but with different Q's. Then import all of those into REW.
- Trace Arithmetic A*B with A = wavelet and B = AP filter. Do this for each AP filter.

I don't think REW can be used to make AP filters. Or if it can, I haven't found the setting yet.
Funny how someone who used to bash REW all the time has become a REW expert and even reporting bugs to John lately! ;)

Anyway, you have allpass filters in REW under EQ, among eq types in slots 1-20. You can also time invert them with 1/A or invert them in a frequency range with "Invert A phase". There's everything in REW, some say there's even a hidden Pacman game with the right key combination.
 
there's even a hidden Pacman game with the right key combination.

Time to start diving deeper lol....
 
  • Like
Reactions: OCA
We don't have the ability to peer that deeply with our FFT measurements (despite what the bandwidth filtered impulse math might say ime)
We also have to question the validity of low frequency information captured by those measurements, give the wavelengths involved and the length ot the time window needed to capture the low freq info.

The 6.5 period wavelet again is a compromise, to try to overcome those difficulties/limitations. A way of looking at both time and phase together...and most importantly, a way to act on the information gleaned.
You said this a few times (my bold) but I don't recall (reasonably hard) evidence for the doubt, is there any?

The phase shift is mild enough in this example that the blue scope trace shows only slight asymmetry in the height of the peaks around the central peak.
So I'm going to ignore it and look at time between peaks.
but the Q is whether this is the right value isn't it otherwise it's just another number thrown up by one of the many ways to analyse this & one that looks at a v narrow bandwidth only when, in reality, we (or at least, I) care about the performance throughout the crossover.

for example, if I put the same into REW and use it's alignment tool to manually line things up (by looking at the phase response), if I use 2.03ms then we can see we aligned phase *at 125Hz* and that results in a small dip a bit later. It's basically the same result as "align phase at the cursor" option (if you put the cursor at the right place).

1747898619037.png


if my focus is the spl sum then I can improve on this by changing the delay to get a closer match throughout the crossover region (NB: this is basically how I design a passive crossover given you don't have control over delay, you aim to get them close and prioritise consistency through the range)

1747898765217.png


finally if you were to look purely at the IR then none of these are aligned at either the start or the peak because of the nature of the respective band limited responses :)

so, in the end, we're back where we started of having n different ways to look at the data, all can give slightly different answers and you get to pick which one based on what you're actually trying to optimise for
 
You said this a few times (my bold) but I don't recall (reasonably hard) evidence for the doubt, is there any?

Yeah, look at @boxerfan88's measurements and my reply here. I was really surprised that I managed to capture clean looking measurements, I was totally convinced it would be a waste of time. But you never know until you try!
 
You said this a few times (my bold) but I don't recall (reasonably hard) evidence for the doubt, is there any?

Honestly, I'm dumbfounded that anyone can question the difficulty of making repeatable valid low frequency measurements in small spaces.
Among professional practicians of audio measurement, the low frequency difficulty is as well known and well accepted, as is the fundamental measurement dilemma posed by the time/frequency tradeoff.
It's all about what are we actually measuring imho....direct, reflected, which reflected?

The reasonably hard evidence needed (imso) .....is the other way around......... we need reasonably hard evidence that such measurements can be made.
You said this a few times (my bold) but I don't recall (reasonably hard) evidence for the doubt, is there any?


but the Q is whether this is the right value isn't it otherwise it's just another number thrown up by one of the many ways to analyse this & one that looks at a v narrow bandwidth only when, in reality, we (or at least, I) care about the performance throughout the crossover.

for example, if I put the same into REW and use it's alignment tool to manually line things up (by looking at the phase response), if I use 2.03ms then we can see we aligned phase *at 125Hz* and that results in a small dip a bit later. It's basically the same result as "align phase at the cursor" option (if you put the cursor at the right place).

View attachment 452620

if my focus is the spl sum then I can improve on this by changing the delay to get a closer match throughout the crossover region (NB: this is basically how I design a passive crossover given you don't have control over delay, you aim to get them close and prioritise consistency through the range)

View attachment 452621

finally if you were to look purely at the IR then none of these are aligned at either the start or the peak because of the nature of the respective band limited responses :)

so, in the end, we're back where we started of having n different ways to look at the data, all can give slightly different answers and you get to pick which one based on what you're actually trying to optimise for
Yes sir! All valid techniques should give the same answer. :)
Both of the techniques, wavelet like I showed, and REW like you showed, give the same result. Both show that 2.03ms is not a perfect substitute for the low-pass filter I inserted into the low-pass channel.
As we know, constant time, and frequency dependent phase, aren't really substitutes for each other.
(tell that to the general passive xover crowd (not meaning you:)) Lol

Of course, the more correct process with the wavelet example I showed would have been to negate the all-pass I inserted to get symmetry in the wavelet peaks around the central peak...like would be done in a real world example. Then the minor magnitude dip at 300Hz would disappear.

I haven't used the wavelet method for alignment in several years, because like @boxerfan88 and others found, results away from nearfield get quickly hard to read.
I have used the wavelet method to explore envelope warping thru xover. And also to explore the outputs of porst and the driver on vented subs (with a mic on each)...really interesting there.

Bottom line imo, use whatever measurement tools we are most comfortable with, that fit the measurement task at hand. For me, it's a combination of Crosslite+, Smaart, REW, & occasionally ARTA, in that order.
Crosslite+ has a nifty post capture tool called Single Wavelet, that is akin to Filtered IR in REW, and wavelets in general albeit with finer resolution. When used with frequency dependent windowing, I has given the most repeatability in reflected environments I 've found. That said, FDW with REW really helps too.
 
Honestly, I'm dumbfounded that anyone can question the difficulty of making repeatable valid low frequency measurements in small spaces.
Among professional practicians of audio measurement, the low frequency difficulty is as well known and well accepted, as is the fundamental measurement dilemma posed by the time/frequency tradeoff.
It's all about what are we actually measuring imho....direct, reflected, which reflected?

The reasonably hard evidence needed (imso) .....is the other way around......... we need reasonably hard evidence that such measurements can be made.

Yes sir! All valid techniques should give the same answer. :)
Both of the techniques, wavelet like I showed, and REW like you showed, give the same result. Both show that 2.03ms is not a perfect substitute for the low-pass filter I inserted into the low-pass channel.
As we know, constant time, and frequency dependent phase, aren't really substitutes for each other.
(tell that to the general passive xover crowd (not meaning you:)) Lol

Of course, the more correct process with the wavelet example I showed would have been to negate the all-pass I inserted to get symmetry in the wavelet peaks around the central peak...like would be done in a real world example. Then the minor magnitude dip at 300Hz would disappear.

I haven't used the wavelet method for alignment in several years, because like @boxerfan88 and others found, results away from nearfield get quickly hard to read.
I have used the wavelet method to explore envelope warping thru xover. And also to explore the outputs of porst and the driver on vented subs (with a mic on each)...really interesting there.

Bottom line imo, use whatever measurement tools we are most comfortable with, that fit the measurement task at hand. For me, it's a combination of Crosslite+, Smaart, REW, & occasionally ARTA, in that order.
Crosslite+ has a nifty post capture tool called Single Wavelet, that is akin to Filtered IR in REW, and wavelets in general albeit with finer resolution. When used with frequency dependent windowing, I has given the most repeatability in reflected environments I 've found. That said, FDW with REW really helps too.
I had never heard of Crosslite, the 3D wavelets seemed impressive but comes at a considerable cost.
 
Honestly, I'm dumbfounded that anyone can question the difficulty of making repeatable valid low frequency measurements in small spaces.
It's not really what was said though, to be clear your posts read like "fft analysis at low frequency is unreliable, wavelet is not". It's not hard to find people using the former reliably though and I can't see evidence for this assertion.

Yes sir! All valid techniques should give the same answer.
Well you said fft analysis is unreliable but both of them give the same result so perhaps both are unreliable :)
 
It's not really what was said though, to be clear your posts read like "fft analysis at low frequency is unreliable, wavelet is not". It's not hard to find people using the former reliably though and I can't see evidence for this assertion.

Sorry if my posts have read that way....but frankly, I don't see how you formed that interpretation. Most of this thread has simply been about aligning peaks vs initial rises.

My central theme with small-room low-frequency measurements at listening position, is that ALL are suspect,
including wavelets which are the best technique I've found so far.

Here's a post of mine from the related State of DSP thread that conveys that theme...

Even in anechoic conditions, the nature of FFT measurements' linear data sampling vs frequency, makes sub frequency measurements difficult at best.
The number of data points simply isn't there, like it is for higher frequency.

Then there's the issue of, it's not the 'already hard to find sub impulse peak' we want for time alignment, it's the initial impulse rise from zero.
Good luck putting a finger on that consistently, even if you do have a repeatable impulse peak. It's a mathematical stab.

And still worse, indoors sub reflections are often so near the strength of the direct sub arrival, which one does the mic and FFT listen to?

Frankly, I think the whole idea of sub time alignment indoors is a lot of wishful thinking.....
Even the wavelet tone burst method, the most accurate sub distance finder I've found yet, doesn't have great repeatability.
Still hoping though.....
 
I had never heard of Crosslite, the 3D wavelets seemed impressive but comes at a considerable cost.
I hadn't either until a year or two ago...some prosound guys I've learned to respect their opinions, started touting it. Yep, costs a bit, but less than some other prosound alternatives. And I'm a measurement junkie.
The wavelet graphics are very impressive, entire image can rotate in 3D, and be sliced apart. I don't use them much yet, sigh.....still learning the core functions.
You know, I could happily skip all the wavelet, waterfall, spectrograph, etc, stuff.
Give me accurate transfer functions, and the all various forms of impulse. The pretty graphs are mainly to show off the good work done with those, I think.
1747930784283.png


1747930923739.png
 
All right, I think this is the end of this wavelet saga for me. I have concluded that:

1. It is likely to be of limited utility in small rooms. I explained why I think this in this post. Essentially, the length of the wavelet is so long that reflections will distort the wavelet making it difficult to read. I experimented with a 1 cycle wavelet in this post to avoid / reduce the problem of reflections, but what that does is show up how much subwoofers distort the impulse in the time domain. This makes the actual peak difficult to read.

2. I received an email from someone who reads my ASR posts and sends me emails criticizing me for being wrong ;) He pointed out that wavelets are misleading because they are too short to reach steady-state. I spent the evening doing simulations to check what he said, and this is what I found:

1747934159064.png


First, make a simulation of a subwoofer. In black is an actual subwoofer measurement, upper graph = freq response, lower graph = phase. I made a LR5 bandpass with corner freqs of 20Hz and 80Hz (red). You can see that my model roughly matches my actual sub. I made this model to avoid all the usual uncertainties of working with actual measurements, so if you see something funny (and we will see funny things very shortly) it is due to the pure phase behaviour of the minphase sub model.

1747934432562.png


Now we take two test signals. In green is a 7 cycle 50Hz wavelet with Hanning window applied. In blue is a 50Hz sinewave. Convolve both of them with the subwoofer model and let's see what we get.

1747935404005.png


First up, subwoofer model + sine wave (pink) vs sine wave (blue). We can see both impulses start at the same time, but there is a transition period before the "subwoofer" reaches a steady state. During this time, the amplitude of the peaks build up then wiggle up and down a bit before they settle to a consistent amplitude. In this particular model, it takes 4 amplitude peaks for the response to settle. During the transition period, the initial waves are also stretched causing the a delay. As I have shown in other examples in this thread, sometimes the transition period is long enough to make the waves appear to have opposite polarity. This is due to the minimum-phase behaviour of the subwoofer alone (non-constant group delay, etc). We can count four peaks at 50Hz before it settles to steady state.

1747936051740.png


In case you have trouble seeing the peaks, here is a close-up where you can clearly see the amplitude of the peaks wiggling.

1747935881079.png


If we look at our 7 cycle wavelet, this means that these four peaks are within the transition period as well and by that time the wavelet is almost over.

So:

1. Wavelets that are too short = does not account for transition period.
2. Wavelets that are too long = useless in small rooms.

Conclusion: as Pat Brown indicated in his video, this is for outdoor measurements. I'm not sure what Pat Brown thinks of the transition period since he recommends a 6.5 cycle wavelet.
 
Sorry if my posts have read that way....but frankly, I don't see how you formed that interpretation. Most of this thread has simply been about aligning peaks vs initial rises.
Fair enough, it's just the impression I formed. In any case, my point is just that repeatable measurements in the same room is not so hard but interpreting those measurements is frequently v hard but perhaps that's much the same point and I am just a bit pedantic.
 
If we look at our 7 cycle wavelet, this means that these four peaks are within the transition period as well and by that time the wavelet is almost over.

So:

1. Wavelets that are too short = does not account for transition period.
2. Wavelets that are too long = useless in small rooms.
At least in my case, in my audio rig, in my listening room, I used/tested 8-wave, 3-wave, 1-wave rectangular tone-burst (wavelet) for measurement and tuning of time-alignment, SP transient behavior measurements/observation, as well as sound-reflection wall/plane identification. All of my careful and intensive studies and tone-burst utilizations gave useful and worthwhile information and tuning results thereof.

The selection of tone-burst (wavelet) shape and length would depend on what we would reliably and reproducibly measure/observe/tune, I believe.
Of course, "the methods" should have been fully validated (e.g. by using deliberately/intentionally delayed DSP settings; ref. #494) for our objectives beforehand.
- Precision measurement and adjustment of time alignment for speaker (SP) units: Part-1_ Precision pulse wave matching method: #493
- Precision measurement and adjustment of time alignment for speaker (SP) units: Part-2_ Energy peak matching method: #494
- Precision measurement and adjustment of time alignment for speaker (SP) units: Part-3_ Precision single sine wave matching method in 0.1 msec accuracy: #504, #507

- Measurement of transient characteristics of Yamaha 30 cm woofer JA-3058 in sealed cabinet and Yamaha active sub-woofer YST-SW1000: #495, #497, #503, #507

- Identification of sound reflecting plane/wall by strong excitation of SP unit and room acoustics: #498

- Short communication on my preference in room acoustics: #502

- Perfect (0.1 msec precision) time alignment of all the SP drivers greatly contributes to amazing disappearance of SPs, tightness and cleanliness of the sound, and superior 3D sound stage: #520


If you would be seriously interested in using/playing-with the tone-burst signals I prepared and utilized in above measurements and tunings, please contact me through PM communication; I will be more than happy sharing them (as well as analysis software tools) with you.

- Not only the precision (0.1 msec level) time alignment over all the SP drivers but also SP facing directions and sound-deadening space behind the SPs plus behind our listening position would be critically important for effective (perfect?) disappearance of speakers: #687

- The latest system setup of my DSP-based multichannel multi-SP-driver multi-amplifier fully active audio rig, including updated startup/ignition sequences and shutdown sequences: as of June 26, 2024: #931

Edit:
I have fully validated and found that the "time-shifted tone-burst sequence method" (ref. #493) is really effective and reproducible for 1 msec precision (I believe which is precise enough in such low-Fq range) time-alignment tuning between subwoofer(s) and woofers.
I prefer, on the other hand, 0.1 msec precision time-alignment using "wave-shape matching method" among woofers, tweeters, super-tweeters (ref. here and here).

Furthermore, in principle, this "time-shifted tone-burst sequence method" is easily applicable in rather acoustically "live" small listening room with more or less reflections/resonances/standing-wave(s) of low-Fq tones.

Of course, as I have repeatedly emphasized, the final fine DSP tunings should be done through careful and intensive subjective listening session, before and after, using you/our own preferable/suitable "consistent audio reference/sampler music playlist" consists of various genres of music in excellent recording quality. In my case, you can find mine here.
An Attempt Sharing Reference Quality Music Playlist: at least a portion and/or whole track being analyzed by 3D color spectrum of Adobe Audition

The optimal (for your ears and brain) DSP and other tunings sometimes (or often?) may vary/differ depending on "nature" of each music track and/or on each of the music genre.
 
Last edited:
Back
Top Bottom