Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Stereo imbalance - free plugin for correction? (Read 6203 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Stereo imbalance - free plugin for correction?

I have a DJ mix that is mixed from vinyl. Most of the tracks have some stereo imbalance, that is, either the left or the right channel is louder than the other (sometimes the difference between the channels is about 1 dB, and this is due to the vinyl pressing).

Although there are for-pay plugins that do the job (such as GoldWave Max/Match) but I wonder whether there are free plugins for this?

Any help would be kindly appreciated!

Stereo imbalance - free plugin for correction?

Reply #1
Not only can the imbalance vary from record to record, but in my experience, it's usually not the same amount across the entire frequency spectrum, so just getting the average levels for 2 channels to match isn't enough. Sometimes you have to bring down the mids in one channel, or boost the bass, or vice-versa.

Adjusting the gain on a per-channel basis for consistent, average volume across a recording is easy (measure average level however you want in each channel, then boost one or reduce the other so they're the same). Whether it works out to truly balanced sound in your ears depends; it's not uncommon for something to sound balanced but not have the same average level in each channel.

Doing this with EQ is a tall order, especially considering that there's no way for the DSP to know what's off-balance and what's deliberately panned. Having EQ or volume be dynamically applied so that certain sections of a recording (songs in your DJ mix) are processed differently than others is an even taller order. I would not expect to see such a plug-in.

Stereo imbalance - free plugin for correction?

Reply #2
I think multiband compression does the job well on equalizing frequencies and control the bass-middle-treble ranges. Also the difference in stereo width from track to track can be solved with compressing the side track (in mid/side mode).

This far the only thing that I wasn't able to solve is the stereo imbalance. Compressing both channels separately does improve things but is far from being an optimal solution. Perhaps taking one channel as controller and matching the volume of the other channel to it (with some attack/decay options) could be a solution.

Stereo imbalance - free plugin for correction?

Reply #3
Quote
Although there are for-pay plugins that do the job (such as GoldWave Max/Match) but I wonder whether there are free plugins for this?
All you need is a way to measure the RMS (or average) and peak for each channel and a way to adjust the channel levels independently.

You should be able to do it with SOX.    I don't use SOX very often I won't attempt to give you the details, but I'll try to give you an outline.

Start by running stats and note the RMS & average for each channel.

- Start with the channel that has the greatest the greatest difference  between RMS and peak.      Normalize this channel for 0dB peaks.

- Normalization will bring-up the peak & average levels by the same dB amount, so from the original peak level (now 0dB after normalizing) you can calculate the new RMS level (or you can run stats again).

- Subtract the old RMS level of the other channel from the new RMS level of the 1st channel.

- Boost the 2nd channel by that amount so the RMS levels match. 


Or another approach...
- Check the RMS (or average level of each channel).

- Adjust the "louder" channel down to match the channel with the lower RMS/average level.

- Normalize the stereo channels together (maintaining the new matched channel balance).

The 2nd approach is "easier" but one of the channels gets adjusted twice so it's not as mathematically efficient.


Note that since the peak-to-average ratio on the 2nd channel is smaller than the 1st channel, the 2nd channel won't have 0dB normalized peaks.

Quote
Most of the tracks have some stereo imbalance, that is, either the left or the right channel is louder than the other (sometimes the difference between the channels is about 1 dB, and this is due to the vinyl pressing).
Sometimes it's intentional...  Sometimes a stereo recording has one channel louder for awhile, and then the other louder for awhile and it doesn't always "mathematically" balance-out or "look" exactly balanced on the meters, but it might still sound right.

Stereo imbalance - free plugin for correction?

Reply #4
Thanks DVDDoug for the excellent reply!

I do use SOX and it's a real must-have - it is really practical when there is a constant imbalance between channels (I combine it with WaveGain but the way you described is better).

However, we're talking about a long-long recording of a vinyl mix, where each music track has a different amount of imbalance. That depends on whether the vinyl is worn out or new, on the position of the track on the record, etc., like for example:
- track 1 in the mix is 0,8 dB louder on the left channel,
- track 2 is about equal on both channels,
- track 3 is 1 dB louder on the right channel,
- track 4 is 0,3 dB louder on the left....etc.

Fixing this manually is quite time consuming as each track has to be adjusted manually, especially the transitions between the tracks (the envelope function in many sound editors is a must). If a longer mix contains 25-30 tracks, it'd be quite a job without any automation...

Stereo imbalance - free plugin for correction?

Reply #5
Quote
However, we're talking about a long-long recording of a vinyl mix, where each music track has a different amount of imbalance. That depends on whether the vinyl is worn out or new, on the position of the track on the record, etc...
You'd have to know where each song starts & stops.    If you tried to do it automatically moment-by-moment (instead of song-by-song) you'd mess up the natural dynamics & balance of the song.

And, if there's a crossfade between songs you wouldn't want to suddenly change the gain of one channel where the songs overlap.  You'd need to "fade" from one setting to the next setting and you'd need to know when to start/end that fade.  That would be almost impossible to automate and very difficult to do manually.

I think the only practical solution is to balance the tracks individually before making the program mix.    20 or 30 tracks really isn't that big of a deal once you get into the swing of it.  You can use a spreadsheet to make the calculations (or just buy GoldWave*).

There's one more issue...    Normalizing (or "Max/Match") will not give you equal perceived loudness on tracks from different recordings.  You can approximate loudness matching by matching RMS levels, or you'll better results with WAVgain, or even better results by ear.    Volume matching 20 or 30 tracks by ear is not out of the question...  I'd at least check  them by ear after running WAVgain.




* GoldWave is $50 USD but upgrades are free.  I've had it for about 20 years, so the cost-per-year is insignificant.

Stereo imbalance - free plugin for correction?

Reply #6
Well, thanks for the input... it would be the best to be able to pre-balance the tracks separately (and then mix in software) but this is impossible if the whole thing is mixed and recorded from vinyl. Plus, if I'm remastering a DJ mix that was done in the 1980s or '90s, then I have to work with the (imbalanced) recording.

Anyway, if there would be an obvious (and free) plugin or solution (besides GoldWave), somebody would probably have already pointed to it. Looking forward for one to be developed since there seems to be a demand for it (there are similarly titled topics on KVRAudio, pointing to rather useless plugins).

Stereo imbalance - free plugin for correction?

Reply #7
Well, one kind user on the StereoTool Forums pointed me to the ClaessonEdwards Auto Balance 1.0 Winamp Plugin (thanks to Bojcha).

I think it does a very good job and using it with a long decay rate it doesn't affect those sudden hard-pans (of course, as mentioned, correcting each mix manually would be the best solution, but it seems to be an excellent compromise between manually processing several mixes or doing nothing at all).

Now - I have another question which might be slightly offtopic (should it be moved to a separate topic?)

Mixes also have different stereo width for each track, e.g. track1 is almost mono, track2 has a wide stereo image, track3 has only some mid-treble in the side channel...
My question would be that (since L/R imbalance can be auto-corrected), is there a plugin to nicely "auto-equalize" the stereo image of the whole mix aswell - so all tracks would have near similar stereo width?

(My tips would be compressing the side channel, or perhaps multiband-compressing the side channel ... any other ideas or maybe a plugin for this?)

Stereo imbalance - free plugin for correction?

Reply #8
I don't know...  I wouldn't recommend messing around with compression, although the balance plug-in you found is a kind of automatic gain control, which is a kind of compression, and you're happy with what that's doing....

Since it makes sounds more-equal, regular compression does tend to push sounds toward the center, unless they are panned 100% left or right so changing one channel doesn't "move" the sound.  That would make the width of the various tracks more-alike (more mono).  Compression applied independently to the left & right channels will also tend to balance the channels.



There are some "philosophical" issues... 

You can measure the difference in the left & right, but I'm not sure if the level/loudness of the difference will correlate with stereo width.    For example, a vocal remover effect subtracts the left from right and a "mono" file with identical left & right channels will give you silence (indicating that  there is zero stereo width).    But other than identifying a mono (or near mono) file I'm not if this will be helpful at all.    If you can't get a reliable measure of width, the process can't be automated.

You can't really  widen a track.  There are stereo widening effects that use phase inversion or delay to give the impression  of width, but these effects can't take a guitar that's panned slightly-left and pan it fully-left, and they can't convert a mono track into a stereo track with a realistic stereo image, etc.   

You can easily bend the left & right channels to reduce the width (to full-mono if you wish), but if you only "narrow" the stereo field without widening, you'll move everything to the "least common denominator", which in some cases could be a mono track.



P.S.
I guess the good news is that narrowing (blending) will bring the left & right channels more into-balance! 

Stereo imbalance - free plugin for correction?

Reply #9
I had to do a quick search as (being an amateur) I didn't know the difference between AGC (auto gain control) and compression... well, yes, the optimal solution would be some kind of AGC on the side channel, that is, reducing if there's too much width and adding to it if there's only little.

Instead of discussing it in theory, I think the best would be to try to solve it on actual audio. Here's an example, I extracted some few-second samples from a techno mix - it has several issues (I have corrected the stereo imbalance with the plugin) but let's focus on the stereo width difference issue now:
https://www.sendspace.com/file/aibz4j
varying_stereoimage.flac (7.87MB)

If we look at the side channel (in the picture, the first is the Mid, second is the Side), we see huge differences in levels, the fifth sample being almost mono. (Listening to the side channel would reveal that the peaks are mostly in the highs, due to the records or the turntable's cartridge being worn out)


I wonder if there's a way (or plugin) to reduce such differences in stereo width...

Stereo imbalance - free plugin for correction?

Reply #10
Quote
I wonder if there's a way (or plugin) to reduce such differences in stereo width...
Reducing width is simply a matter of blending the channels.   

Unlike "widening", there are usually no side effects.  Most stereo recordings are mixed to be "mono compatible" so there's no problem blending all the way to mono if you wanted to.  Some headphone listeners like blending (AKA 'crossfeed') and some headphone amps have a blending control.

With most audio editors, you'd use the pan control to pan the left & right channels toward the center.  GoldWave has a Channel Mixer where you can specify the percentage of original-channel into the new channels.    You can blend to mono by mixing 50/50 in both channels, or even reverse the channels by putting 100% of the left into the right (with zero percent left into left) and vice-versa.

Quote
(Listening to the side channel would reveal that the peaks are mostly in the highs, due to the records or the turntable's cartridge being worn out)
The bass is normally centered and in-phase so the difference (side channel) rarely contains any bass, but with most stereo recordings you'll get plenty of midrange (and highs).


P.S.
You do have this issue of wanting different amounts of pan/blend on different songs in the recording...    A DAW or advanced audio editor with automation would allow you to "fade the changes"during the crossfade between songs rather than suddenly applying them.   

Audacity has an Envelope  tool like that, but it only controls volume.    I haven't completely thought this out, but I think you could make 4 tracks in Audacity,  with for example, two original left-tracks with one panned left and the other right.    Then by using the Envelope tool, you can control the amount of moment-to-moment mix into each output-channel.  But, I think it would get very tricky trying to maintain channel balance with separate left & right volume-envelope controls.

Stereo imbalance - free plugin for correction?

Reply #11
Well, I think instead of just going towards mono by reducing stereo width (by blending/crossfeed or compressing the side track), the goal would be kind of opposite - I'd like to have a fairly wide stereo image through the whole mix and, most importantly, to keep it constant.

I have experimented with multiband compressing the side channel (which is usually seen as quite a radical thing to do) and got a smooth and constant stereo image but this introduced inevitable phase problems, sometimes audible.

I'm quite positive about this can be done in an automated fashion, just have to find the right plugin (or plugin chain combo).