• WANTED: Happy members who like to discuss audio and other topics related to our interest. Desire to learn and share knowledge of science required. 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!

How to fix stereo phase issues with digital recordings

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
856
Likes
1,423
I have the weirdest problem. There is an album that I like very much, but some songs in it always sounded to me a bit off. I couldn't put the finger on it, but today I finally realized what's going on – the stereo tracks or not in phase! What an absurd error by whoever mixed\mastered these tracks. Here is how It looks in audacity when zoomed in:

mob.png


As you can see, the peaks are misaligned between the left and right tracks. I don't know how this error could happen. And this is obviously an error, because it ruins the center image in stereo, and summing to mono have the distinct out of phase frequency cancelling sound.

My question is, is there a tool\app that can automatically resolve this? I could go into audacity and try to find the correct alignment by hand, but this seems a pretty inaccurate way to do this.
 

Eirikur

Senior Member
Joined
Jul 9, 2019
Messages
318
Likes
509
I have the weirdest problem. There is an album that I like very much, but some songs in it always sounded to me a bit off. I couldn't put the finger on it, but today I finally realized what's going on – the stereo tracks or not in phase! What an absurd error by whoever mixed\mastered these tracks. Here is how It looks in audacity when zoomed in:

View attachment 38006

As you can see, the peaks are misaligned between the left and right tracks. I don't know how this error could happen. And this is obviously an error, because it ruins the center image in stereo, and summing to mono have the distinct out of phase frequency cancelling sound.

My question is, is there a tool\app that can automatically resolve this? I could go into audacity and try to find the correct alignment by hand, but this seems a pretty inaccurate way to do this.

You may be able to use DeltaWave (by @pkane) if you first split the channels and then compare. Perhaps you could even ask for this phase comparison feature on a single stereo track.
Note that it is generally not possible to precisely correct for phase without sacrificing bit precision - your sampling frequency is unlikely to exactly match the phase compensation. In this particular case you can probably get away with it by up-sampling high enough (e.g. 352.8kHz) and settle for being off a little.
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,201
Likes
16,983
Location
Riverview FL
My question is, is there a tool\app that can automatically resolve this?


Not that I know of.


1. Split stereo track under this menu:

1573037592362.png


1573037764685.png



2. this tool lets you move a track in time. Grab and move.

Zoom in to where you can see the sample dots if you want to be real precise about it.

1573037425459.png



3. Select both tracks, and "Make Stereo Track" under the first menu.


It's not that hard. Should take you about a minute.
 
OP
Fluffy

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
856
Likes
1,423
@RayDunzl
Thanks. That was actually the first thing I did to make sure it's a problem with phase between the two channels. Manually realigning them generally solved it. But I'm looking for a more precise tool, because aligning by eye rely on estimating where are the true peaks in the waveform. Because it's a stereo track, the two channels are not identical, so I can only use the lower frequencies to estimate this. That means that it's not accurate enough to align high frequencies, whose peaks get lost in the waveform.

Actually, now I came up with another idea – maybe start with high-passing the track so I can zero in on the peaks in the high frequencies. once I know precisely by how much samples I need to nudge it by, I can do that to the full spectrum track. Do you think this will work?

@Eirikur
Complete bit perfection is not important to me, since I'm already passing the audio through EQ most of the time. Being precise down to the single sample at a 44khz rate is good enough for me.
As for the delta wave, what do you mean by asking for this feature? Can @pkane make a tool that performs this action?
 

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,205
Location
North-East
@Eirikur
Complete bit perfection is not important to me, since I'm already passing the audio through EQ most of the time. Being precise down to the single sample at a 44khz rate is good enough for me.
As for the delta wave, what do you mean by asking for this feature? Can @pkane make a tool that performs this action?

Not sure what the ask is... DeltaWave already computes the difference (in percent) between two waveforms, with 100% being bit-perfect. It also tells you how many bits the files would need to be reduced to in order to get to a 50% match. This is similar to the difference introduced by random dither. So while the two waveforms might match only for 1% at 24 bits, they might match 50% at say 13 bits.

DeltaWave also measures and displays phase differences between the two waveforms. It is able to correct for non-linear phase distortions if these are fixed/non-variable. You can high/low/notch filter the waveforms before or after processing, as well as split or combine stereo channels.

Is there something else that's needed?
 
OP
Fluffy

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
856
Likes
1,423
It is able to correct for non-linear phase distortions if these are fixed/non-variable.
I'm not sure this is the issue here. The problem appears to be simply that the two stereo channels are not aligned. But getting them realigned involves finding out exactly by how many samples they are out of phase. Can Deltawave do this? (by the way great software!)
 

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,205
Location
North-East
I'm not sure this is the issue here. The problem appears to be simply that the two stereo channels are not aligned. But getting them realigned involves finding out exactly by how many samples they are out of phase. Can Deltawave do this? (by the way great software!)

It can if you record the same mono track playing through both channels, and then use DW to match left and right. The result will be precise up to a tiny fraction of a sample if you use, say, a 1-2 minute music track.
 
OP
Fluffy

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
856
Likes
1,423
@pkane
But it's not a mono track, it's a stereo, so there is a slight difference between the channels. Aligning two mono tracks that are identical is something I can do by hand.

Maybe I'll rephrase the question – can Deltawaves find by how many samples are the left and right of a stereo track misaligned? Given that the left\right contain some similar information and some different information.
 

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,205
Location
North-East
@pkane
But it's not a mono track, it's a stereo, so there is a slight difference between the channels. Aligning two mono tracks that are identical is something I can do by hand.

Maybe I'll rephrase the question – can Deltawaves find by how many samples are the left and right of a stereo track misaligned? Given that the left\right contain some similar information and some different information.

In many cases it can, depending on how different the channels are. It's worth a try.
 
OP
Fluffy

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
856
Likes
1,423
:cool: That's about what I had in mind - hope it sounds great now! What's the album/track?
Yep, the vocals and kick drum are dead center now, instead of swinging to the sides. It seems that the stereo image got narrower, but that's expected since it was artificially widened before.

The album is Covertà by Adrenaline Mob. It's basically metal covers of classic hard rock songs. Some of the tracks have the offset (which is always 61 samples), some don't. Very weird. The guy who did the master should be fired :p
 

Eirikur

Senior Member
Joined
Jul 9, 2019
Messages
318
Likes
509
Not sure what the ask is... DeltaWave already computes the difference (in percent) between two waveforms, with 100% being bit-perfect. It also tells you how many bits the files would need to be reduced to in order to get to a 50% match. This is similar to the difference introduced by random dither. So while the two waveforms might match only for 1% at 24 bits, they might match 50% at say 13 bits.

DeltaWave also measures and displays phase differences between the two waveforms. It is able to correct for non-linear phase distortions if these are fixed/non-variable. You can high/low/notch filter the waveforms before or after processing, as well as split or combine stereo channels.

Is there something else that's needed?
Hi Paul, what I meant is a special feature that compares the channels of a single input file, rather than comparing each channel of two input files. Should be a "simple" matter of redirecting the channels as if there were two separate mono inputs + some GUI work, everything else exists I believe.
 

pkane

Master Contributor
Forum Donor
Joined
Aug 18, 2017
Messages
5,632
Likes
10,205
Location
North-East
Hi Paul, what I meant is a special feature that compares the channels of a single input file, rather than comparing each channel of two input files. Should be a "simple" matter of redirecting the channels as if there were two separate mono inputs + some GUI work, everything else exists I believe.

DW works with any two tracks, one is a reference, the other a comparison. You can choose the same file for both, and select left channel for reference and right channel for comparison.
1573062564546.png
 

Hipper

Addicted to Fun and Learning
Joined
Jun 16, 2019
Messages
753
Likes
625
Location
Herts., England
You are to be congratulated on finding this error.

You might contact the source of the album to tell them?

You could also post something on the Steve Hoffman Music Forum to see if anyone else has noticed this.:

https://forums.stevehoffman.tv/forums/music-corner.2/
 

flowjm

Member
Joined
Aug 24, 2019
Messages
95
Likes
197
You are to be congratulated on finding this error.

You might contact the source of the album to tell them?

You could also post something on the Steve Hoffman Music Forum to see if anyone else has noticed this.:

https://forums.stevehoffman.tv/forums/music-corner.2/

Seconded. Would be very interested to hear the band's response, if they give you one.

I wonder how many other albums exhibit similar mastering errors?
 
OP
Fluffy

Fluffy

Addicted to Fun and Learning
Joined
Sep 14, 2019
Messages
856
Likes
1,423
You are to be congratulated on finding this error.

You might contact the source of the album to tell them?

You could also post something on the Steve Hoffman Music Forum to see if anyone else has noticed this.:

https://forums.stevehoffman.tv/forums/music-corner.2/
Thanks, but I have little faith that someone would really care about this. It's a little known EP by a niche band, no one would bother remastering it because of this slight error in three tracks… I mostly wanted to get some peace of mind as to why these specific songs sounded off to me.


Seconded. Would be very interested to hear the band's response, if they give you one.

I wonder how many other albums exhibit similar mastering errors?
Do people actually post these kinds of mastering errors on that forum? Do artists\bands ever respond to that?
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,201
Likes
16,983
Location
Riverview FL
Because it's a stereo track, the two channels are not identical, so I can only use the lower frequencies to estimate this. That means that it's not accurate enough to align high frequencies, whose peaks get lost in the waveform.

Well...


Actually, now I came up with another idea – maybe start with high-passing the track so I can zero in on the peaks in the high frequencies. once I know precisely by how much samples I need to nudge it by, I can do that to the full spectrum track. Do you think this will work?

HF is what I'd look at.

Specifically, for HF that "should" be in the phantom center of the stereo image.


Ok I found a method. DW told me the offset is 61 samples

DW is a nice tool. I've written code in the dim past. MacIntosh was pretty easy, Windows completely baffling.


The waveform looks aligned now

Visual alignment at the sample level is all I do when trying to match an in-room mono recording with its stereo digital source.
 

RayDunzl

Grand Contributor
Central Scrutinizer
Joined
Mar 9, 2016
Messages
13,201
Likes
16,983
Location
Riverview FL
I mostly wanted to get some peace of mind as to why these specific songs sounded off to me.

61 samples at 44.1kHz = about 1.3ms

So, the channel balance was off by a little more than a foot using speakers.

Retry the original, but move right in your seat a little, it should clear up.

---

I have a 3CD set where the tracks are out of phase. Invert one channel, it sounds right again.

Emailed the (budget) record company (about my bargain bin purchase), they said something like "Oh. Yeah. Well. Whatever. Have a nice day".
 
Top Bottom