Old 09-11-2017, 08:02 AM   #1
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default Waveform Asymmetry

One of my microphones produce a rather large asymmetry in the waveform. It is not a DC offset. It could be an issue when I normalize the track due to the difference in the amplitudes of positive and negative.

One way to solve this is using RX's adaptive phase rotation https://www.izotope.com/en/products/...res/phase.html

Is there any way to do this in Reaper?
cjunekim is offline   Reply With Quote
Old 09-11-2017, 08:45 AM   #2
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

ReaEQ has an all-pass filter that could help. Use as many as you think you need. A high pass filter might not be a bad idea either. Real assymetry can look and act like a DC because there's more total energy on one side or the other. A high pass will sometimes help it to "float" to a more neutral level.

Some sources are assymetrical, but if your mic is significantly skewed, then it's broken, and you should probably have it repaired or replaced. I'd imagine it sounds good enough to you, but...
ashcat_lt is offline   Reply With Quote
Old 09-11-2017, 09:01 AM   #3
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Quote:
Originally Posted by ashcat_lt View Post
ReaEQ has an all-pass filter that could help. Use as many as you think you need. A high pass filter might not be a bad idea either. Real assymetry can look and act like a DC because there's more total energy on one side or the other. A high pass will sometimes help it to "float" to a more neutral level.

Some sources are assymetrical, but if your mic is significantly skewed, then it's broken, and you should probably have it repaired or replaced. I'd imagine it sounds good enough to you, but...
Thanks, but how do I use an all pass filter? What does it do?

I already tried a high pass filter at 70hz but there was no visual difference.

I think the asymmetry comes from the positive air. Maybe it's the way the talent uses the mic.
cjunekim is offline   Reply With Quote
Old 09-11-2017, 09:06 AM   #4
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Phase rotator = allpass filter.

Stick them somewhere in the low end, maybe move them around or have a couple offset from one another. It's not an exact science. In fact, "randomness" seems to be the name of the game.

You are aware that you have to apply these FX in order for the waveform display to reflect them?

Edit - Actually, after reading about what Izotope is doing, an all-pass really is not the same thing. They're doing some FFT hocus pocus that I would tend to steer away from. It's essentially re-synthesis and almost has to create strange artifacts at times. ReaEQ's allpass is more like the "analog" solution, is always transparent, and is the way it's been done for like a century.

Last edited by ashcat_lt; 09-11-2017 at 09:13 AM.
ashcat_lt is offline   Reply With Quote
Old 09-11-2017, 01:09 PM   #5
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

Add a DC offset of the opposite polarity of the waveform bias
__________________
I like turtles
bezusheist is offline   Reply With Quote
Old 09-12-2017, 01:09 AM   #6
alanofoz
Human being with feelings
 
alanofoz's Avatar
 
Join Date: Sep 2009
Location: Oz - Blue Mountains NSW, formerly Geelong
Posts: 944
Default

No!!! According to the OP it's not a DC offset. So adding one is not the correct approach. (But I've probably just had my leg pulled?)

And here is an attempt at drawing an asymmetrical waveform with no DC offset, on a red horizontal axis. The tall skinny positive "bits" have the same energy* as the short fat negative "bits" which are half the height but twice the width (at least that's what I'm trying to depict). So the energy above and below the axis is the same, hence the positive and negative areas balance out and there is no DC offset.

And an all-pass filter will shift the phase of each harmonic and change the peak values. The right choice can make the waveform "look" symmetrical. All without changing the DC offset.

Code:
 _     _     _     _
| |   | |   | |   |
|_|___|_|___|_|___|_
  |___| |___| |___|

* Never mind that energy is a scalar quantity.
__________________
It's "its" except when it's "it is".

alanofoz, aka Alan of Australia
alanofoz is offline   Reply With Quote
Old 09-12-2017, 01:18 AM   #7
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

Quote:
Originally Posted by alanofoz View Post
No!!! According to the OP it's not a DC offset. So adding one is not the correct approach. (But I've probably just had my leg pulled?)
no leg pulling...serious answer. i am aware the problem is not a DC offset, it is just waveform asymmetry. but if the OP is worried about a difference in pos/neg amplitude, adding a DC offset can fix that.

the following shows an asymmetrical waveform (no DC) in green and then adjusted by adding DC in red...

Attached Images
File Type: png Screen Shot 2017-09-13 at 2.16.19 PM.png (46.4 KB, 1727 views)
__________________
I like turtles

Last edited by bezusheist; 09-13-2017 at 11:27 AM.
bezusheist is offline   Reply With Quote
Old 09-12-2017, 01:20 AM   #8
alanofoz
Human being with feelings
 
alanofoz's Avatar
 
Join Date: Sep 2009
Location: Oz - Blue Mountains NSW, formerly Geelong
Posts: 944
Default

Just looked at the iZotope web site for RX6 and can't see anything about FFT hocus pocus. It says it works by rotating the signal phase, which is what an all-pass filter will do.
__________________
It's "its" except when it's "it is".

alanofoz, aka Alan of Australia
alanofoz is offline   Reply With Quote
Old 09-12-2017, 01:26 AM   #9
alanofoz
Human being with feelings
 
alanofoz's Avatar
 
Join Date: Sep 2009
Location: Oz - Blue Mountains NSW, formerly Geelong
Posts: 944
Default

Quote:
Originally Posted by bezusheist View Post
no leg pulling...serious answer. i am aware the problem is not a DC offset, it is just waveform asymmetry. but if the OP is worried about a difference in pos/neg amplitude, adding a DC offset can fix that.
Not without creating other (possibly academic) problems though. I wouldn't call it best practice when there are other ways of solving the problem.

Putting all this into perspective, if this is just one track making up a final mix, the end product is unlikely to have a significant problem.
__________________
It's "its" except when it's "it is".

alanofoz, aka Alan of Australia
alanofoz is offline   Reply With Quote
Old 09-12-2017, 03:22 AM   #10
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

Quote:
Originally Posted by alanofoz View Post
Not without creating other (possibly academic) problems though. I wouldn't call it best practice when there are other ways of solving the problem.
the biggest issue i see is that more than likely the DC will be removed in the playback chain, putting you back to where you started, but now you have overs...so there is a bit of sillyness to my reply, but it does have a time and place (processing chain).

but here the OP's main concern is how things look and what the numbers are.
the most "transparent" way to deal with the 0 crossing /numerical asymmetry is to adjust with DC, because you keep the original waveform.
if you want to change the waveform symmetry and relation to 0 crossing, then rotating phase is a better option.
so it really depends on what look he is after.
it's hard to tell if he is more concerned about the actual waveform symmetry or having the pos/neg peaks being equidistant from 0 crossing...need more info.
__________________
I like turtles

Last edited by bezusheist; 09-12-2017 at 03:36 AM.
bezusheist is offline   Reply With Quote
Old 09-12-2017, 03:40 AM   #11
Bri1
Banned
 
Join Date: Dec 2016
Location: England
Posts: 2,432
Default

Please cast the eyes @ these rotations-shows on this jsfx @ low bpm.





Thoughts? I made an extended vid clip a while back showing phase shifting and waveform symmetries using reason's subtractor.
There was a tiny discuss with 1 user swearing the device was clipping-another user denying that-- it was showed to clip like shit with certain settings I then showed.
Bri1 is offline   Reply With Quote
Old 09-12-2017, 08:45 AM   #12
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Quote:
Originally Posted by alanofoz View Post
Just looked at the iZotope web site for RX6 and can't see anything about FFT hocus pocus. It says it works by rotating the signal phase, which is what an all-pass filter will do.
I found this, the bold parts are what led me to the conclusion that it's not a simple all-pass
Quote:
Adaptive Phase Rotation
Continuously analyzes the audio selection and applies the time-variable phase rotation to both left and right channels, resulting in a symmetrical waveform with minimal signal peak levels.

Adaptive phase rotation is best used on vocal material, as it can occasionally yield pitch artifacts on musical material.

Rotation (deg)
Rotates the channel’s phase by the specified degree.

When a waveform’s phase is rotated, every frequency is rotated equally. Rotating phase by 180 degrees inverts the waveform.
ashcat_lt is offline   Reply With Quote
Old 09-12-2017, 01:18 PM   #13
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

Quote:
Originally Posted by ashcat_lt View Post
I found this, the bold parts are what led me to the conclusion that it's not a simple all-pass
just checked it out with a 1 sample pulse to get the frequency response...(there is a HPF and what looks to be almost a "brick wall" LPF...(i would guess it's up-sampling or some FIR phase manipulation like EQuilibrium's analog phase mode))
it suggests "-58 degrees" for phase rotation...i would disagree...to make the pulse symmetrical it takes a 90 degree shift.
here's the impulse response pic > https://i.imgur.com/TW3Hg4t.png
i didn't really check it out too much because i never use such a feature but now i am a little curious what they're doing...
__________________
I like turtles

Last edited by bezusheist; 09-12-2017 at 01:24 PM.
bezusheist is offline   Reply With Quote
Old 09-13-2017, 04:00 AM   #14
jrk
Human being with feelings
 
Join Date: Aug 2015
Posts: 2,969
Default

So, what's wrong with the OP's microphone?
__________________
it's meant to sound like that...
jrk is offline   Reply With Quote
Old 09-13-2017, 04:27 AM   #15
alanofoz
Human being with feelings
 
alanofoz's Avatar
 
Join Date: Sep 2009
Location: Oz - Blue Mountains NSW, formerly Geelong
Posts: 944
Default

Quote:
Originally Posted by bezusheist View Post
no leg pulling...serious answer. i am aware the problem is not a DC offset, it is just waveform asymmetry. but if the OP is worried about a difference in pos/neg amplitude, adding a DC offset can fix that.

the following shows an asymmetrical waveform (no DC) in green and then adjusted by adding DC in red...

without DC peak values are...
pos = 0 dBFS
neg = -4.43 dBFS

with DC peak values are...
pos & neg = -3.52 dBFS
That waveform looks wrong to me. If you just add DC to a waveform, the peak-to-peak value will remain unchanged. The whole waveform will move up or down. Not the case in that image.

Also, the vertical axis is very odd - each value appears twice, clearly an impossibility, making it impossible for me to read the peak values!

Apart from that, if you add DC to a waveform, then that DC will reach the analogue circuit where it will be filtered out anyway, so what's the point? (If you have a circuit with a response down to DC, then DC will reach the loudspeaker - not good. Do you know of a real-world audio amp that reaches DC?)
__________________
It's "its" except when it's "it is".

alanofoz, aka Alan of Australia
alanofoz is offline   Reply With Quote
Old 09-13-2017, 04:35 AM   #16
mpl
Human being with feelings
 
mpl's Avatar
 
Join Date: Oct 2013
Location: Moscow, Russia
Posts: 3,984
Default

It seems that problem is with microphone distance. But from REAPER side this is what I got somehow working today:



Lua script called Generate DC offset envelope from asymmetric waveform. JSFX called DC Offset. It analyze polarity drift through media item samples and generate compensating envelope for relative jsfx slider.

Requirements: Reaper 5.40, ReaPack 1.2beta2+, Lua script and JSFX installed via ReaPack.

Last edited by mpl; 09-13-2017 at 04:45 AM.
mpl is offline   Reply With Quote
Old 09-13-2017, 05:11 AM   #17
alanofoz
Human being with feelings
 
alanofoz's Avatar
 
Join Date: Sep 2009
Location: Oz - Blue Mountains NSW, formerly Geelong
Posts: 944
Default

Quote:
Originally Posted by ashcat_lt View Post
I found this, the bold parts are what led me to the conclusion that it's not a simple all-pass
No, I don't think it is a simple all-pass. The key word is adaptive. I think there might be a bit of sales-speak there too.

Yeah, of course rotating all frequencies by 180 results in an inverted waveform. But what about 90 degrees? 120? etc.

Still looks & feels like an all-pass filter to me, sorry.

If you get a chance, have a look and play with the Graphic Phase Shifter in Adobe Audition - very instructive.

Quote:
Adaptive Phase Rotation
Continuously analyzes the audio selection and applies the time-variable phase rotation to both left and right channels, resulting in a symmetrical waveform with minimal signal peak levels.

Adaptive phase rotation is best used on vocal material, as it can occasionally yield pitch artifacts on musical material.

Rotation (deg)
Rotates the channel’s phase by the specified degree.

When a waveform’s phase is rotated, every frequency is rotated equally. Rotating phase by 180 degrees inverts the waveform.
Was this from the iZotope web site? Haven't had time to look.
__________________
It's "its" except when it's "it is".

alanofoz, aka Alan of Australia
alanofoz is offline   Reply With Quote
Old 09-13-2017, 09:30 AM   #18
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Quote:
Originally Posted by alanofoz View Post
Also, the vertical axis is very odd - each value appears twice, clearly an impossibility, making it impossible for me to read the peak values!
Yeah, using a dbFS scale for that kind of thing is pretty screwey, but they do it all the time. You certainly can't calculate any meaningful peak-to peak information from it until you convert to "voltage". I did that, though, and if the peak values listed in the post are correct, then the total peak-to-peak IS different after the DC is added. That should not be true, so I don't know what's happening there...


Quote:
Apart from that, if you add DC to a waveform, then that DC will reach the analogue circuit where it will be filtered out anyway, so what's the point? (If you have a circuit with a response down to DC, then DC will reach the loudspeaker - not good. Do you know of a real-world audio amp that reaches DC?)
Well, the OP is trying to do this on a single track, presumably within a mix. That DC offset might help that track use its own headroom better, but then it's fader will scale that a bit before adding the whole thing to the mix. But it will end up adding that DC offset to the entire mix, which theoretically puts that one track back to being offset from the rest of the mix, and the whole mix offset from zero. It's really not the best way to do this. mpl's way of automating the DC offset is a little better...

Quote:
Yeah, of course rotating all frequencies by 180 results in an inverted waveform. But what about 90 degrees? 120? etc.
That part I don't get. Changing phase of every frequency in a waveform is is first of all not possible without FFT hocus-pocus and secondly it doesn't change the phase relationship between the different frequencies, and therefore cannot affect symmetry at all. In analog, this would necessarily be just a broadband delay. FFT introduces a delay, too, but if that latency is compensated out, it can be said that it is not actually a delay.

But, I think it's the adaptive rotation that corrects assymetry by somehow analyzing the signal and changing phase of different frequencies differently until it works better. I don't know for sure how they go about calculating that, but I'd be willing to bet it uses the same FFT magic as the other static parameter.

An analog or IIR allpass always rotates different frequencies differently.
ashcat_lt is offline   Reply With Quote
Old 09-13-2017, 10:18 AM   #19
bezusheist
Human being with feelings
 
bezusheist's Avatar
 
Join Date: Nov 2010
Location: Mullet
Posts: 829
Default

Quote:
Originally Posted by alanofoz View Post
That waveform looks wrong to me. If you just add DC to a waveform, the peak-to-peak value will remain unchanged. The whole waveform will move up or down. Not the case in that image.
Yeh, I didn't think that looked right...might have something to do with the fact I used the tone generator(s) in realtime and maybe they lost sync somehow...(fixed it)
__________________
I like turtles

Last edited by bezusheist; 09-13-2017 at 11:22 AM.
bezusheist is offline   Reply With Quote
Old 09-13-2017, 10:41 AM   #20
Bri1
Banned
 
Join Date: Dec 2016
Location: England
Posts: 2,432
Default

Quote:
Is there any way to do this in Reaper?
Simple answer=yes.Think there are js that will rotate phase-just search and find.
If your having issues with actual waveform symmetry,rather than dc offset--well that's down to the input device your using yeah-- so there's not much todo about that other than fixing @ source,which kinda defeats the devices unique output-- you may very much like that.
With the dc offsets-db will clip if audio is already close to 0db,and it gets shifted either way +/-. __ with symmetry it's just saying 'give me more positive,or,give me more negative'-- it's safe if within 0db still-- just a visual distraction if anything eh.

Each single sampled frequency cycle is getting a pole shift + 2 stages of amp--unless it's rectified.
JS desc: dc filter >sorts some problems--- try it on input fx perhaps.

From this>



+ this offset file in grey--- green is with the dc js..... >

Bri1 is offline   Reply With Quote
Old 09-13-2017, 01:53 PM   #21
Alexey Lukin
Human being with feelings
 
Alexey Lukin's Avatar
 
Join Date: Sep 2011
Posts: 8
Default

Quote:
Originally Posted by ashcat_lt View Post
Changing phase of every frequency in a waveform is is first of all not possible without FFT hocus-pocus and secondly it doesn't change the phase relationship between the different frequencies, and therefore cannot affect symmetry at all. In analog, this would necessarily be just a broadband delay.
Broadband delay corresponds to a linear phase shift, when each phase is shifted proportionally to its frequency. Phase rotation is different: it applies the same phase shift to each frequency. So, it's not equivalent to a broadband delay. Phase rotation is usually done via an allpass filter. It can be either a recursive IIR filter (like in analog hardware) or a convolution-based FIR filter (like in RX).

Quote:
Originally Posted by ashcat_lt View Post
But, I think it's the adaptive rotation that corrects asymetry by somehow analyzing the signal and changing phase of different frequencies differently until it works better.
While phase rotation can change asymmetry in a random way, adaptive phase rotation in RX seeks the best phase rotation degree for each section of the waveform to minimize its peak levels. Because the amount of phase shift can vary in time, its use is not recommended on continuous music. It's rather made for spoken voice. For music, a fixed amount of phase rotation would work better. A Suggest button finds the best fixed phase shift for every signal.
Alexey Lukin is offline   Reply With Quote
Old 09-14-2017, 06:37 AM   #22
alanofoz
Human being with feelings
 
alanofoz's Avatar
 
Join Date: Sep 2009
Location: Oz - Blue Mountains NSW, formerly Geelong
Posts: 944
Default

Quote:
Originally Posted by ashcat_lt View Post
That part I don't get. Changing phase of every frequency in a waveform is is first of all not possible without FFT hocus-pocus and secondly it doesn't change the phase relationship between the different frequencies, and therefore cannot affect symmetry at all. In analog, this would necessarily be just a broadband delay. FFT introduces a delay, too, but if that latency is compensated out, it can be said that it is not actually a delay.
Yeah, that can be difficult to follow at first. I'm sure you've seen Alexey Lukin's post by now. A pretty good answer IMHO.
__________________
It's "its" except when it's "it is".

alanofoz, aka Alan of Australia
alanofoz is offline   Reply With Quote
Old 09-14-2017, 09:49 AM   #23
ashcat_lt
Human being with feelings
 
Join Date: Dec 2012
Posts: 7,293
Default

Quote:
Originally Posted by alanofoz View Post
Yeah, that can be difficult to follow at first. I'm sure you've seen Alexey Lukin's post by now. A pretty good answer IMHO.
I admit that I had some things a little screwed in there. Sorry.

But I do know that an analog or regular old iir allpass (ReaEQ etc) rotates different frequencies by different amounts. You can tick the "show phase" box to prove it. This is "natural" consequence of the way these filters work. And it works, and has worked for quite a long while now.

AFAIK, you can't rotate each and every frequency by exactly the same amount - say 60 degrees - without literally tearing it apart into a finite number of individual sin waves, adjusting their phase, and then sticking them back together. That's resynthesis, and to me it's magic. I'm intrigued by the idea - the possibilities. I do see where it could help. But it freaks me out. I've heard the artifacts. They're not always pretty and not always acceptable. One might say "Well if it's going to mp3 anyway...", but I won't have it. I understand that it's the basis of much of what that plug does, and it seems they do it really well, but I just kinda don't need it.
ashcat_lt is offline   Reply With Quote
Old 09-16-2017, 06:55 AM   #24
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Hi everyone

I want to share my recent findings. I have tried reaEQ's allpass. With two or three allpass bands and along with a realtime waveform display plugin(s(M)exoscope) I could get mostly symmetric waveform. However, it was a time-taking process with trial and error. On the other hand, RX iZotope's adaptive phase correction's result was almost perfect with no hassle. The waveform was very symmetric.

However, there was a surprise hidden. I started to work on the result from RX's adaptive phase correction. I applied a few vst plug-ins as usual. HPF/LPF, gate, noise reduction(Wave's NS1 and RX de-noiser), TriLeveler and so on. The end waveform was weirdly asymmetric, dancing up and down. The asymmetry was much more emphasized. Probably most of the vst plugins that work on frequencies(FFT) exaggerate the phase rotation.

I'd rather keep away from the adaptive phase correction or use it just before the last few steps(for example, trileveler and limiting) only.

Last edited by cjunekim; 09-16-2017 at 08:55 AM.
cjunekim is offline   Reply With Quote
Old 09-17-2017, 04:17 AM   #25
xinky
Human being with feelings
 
Join Date: Apr 2016
Posts: 68
Default

I'll give u some advice.
It's all about preamps. When you have preamp which is no so Good it turns into asymmetry. But! It's often up to some freq. For ex. I know for my preamp mostly it's Good to use - 39 phase rotator to 378hz. You can do it with js crossover, and routing.

But it' hard for me to Discover the crossing freq and phase rotation. Maybe someone have tip for that? Mostly i find rotation by izotope (but i Haven't buy it so i must ask Friend all the time), and then try to found crossing freq by mistakes..
xinky is offline   Reply With Quote
Old 09-17-2017, 06:55 AM   #26
cjunekim
Human being with feelings
 
Join Date: Dec 2016
Posts: 255
Default

Quote:
Originally Posted by xinky View Post
I'll give u some advice.
It's all about preamps. When you have preamp which is no so Good it turns into asymmetry. But! It's often up to some freq. For ex. I know for my preamp mostly it's Good to use - 39 phase rotator to 378hz. You can do it with js crossover, and routing.

But it' hard for me to Discover the crossing freq and phase rotation. Maybe someone have tip for that? Mostly i find rotation by izotope (but i Haven't buy it so i must ask Friend all the time), and then try to found crossing freq by mistakes..
Well, I have RX 6 standard. Yet, I don't know how to find out that crossing frequency with it. I know I can find the phase rotation -- by Phase module, using Suggest feature. But how do I find the crossing freq? And once I find out the rotation degree and the frequency, how do I utilize that information to correct the asymmetry? Could you please elaborate?
cjunekim is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 05:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.