COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 10-07-2016, 07:45 AM   #1
nofish
Human being with feelings
 
nofish's Avatar
 
Join Date: Oct 2007
Location: home is where the heart is
Posts: 12,096
Default Applying distortion without (perceived) gain change

How could I go applying distortion / clipping to a signal without changing perceived output volume ?

I've looked into WDL-OL included IPlugDistortion example, there seems a basic gain compensation method built in (mGain), but gain change is still quite apparent.



Would be a way to do gain compensation via RMS detection or any other approach ?

Thanks.
nofish is offline   Reply With Quote
Old 10-07-2016, 07:59 AM   #2
Tired_Joe
Human being with feelings
 
Join Date: Apr 2015
Posts: 55
Default

It looks like with 50% Distortion you have -6dB and with 100% -12dB

I would try a simple gain multiplication from *1 to *4
Tired_Joe is offline   Reply With Quote
Old 10-07-2016, 10:53 AM   #3
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

Every time the knob is changed, you could recalculate the output value of a sample with the input of +1. If you set a variable to this value, you can multiply the output of the distortion by this value to get the same peak output level...

But, the distortion is going to cause the output to become compressed and sound a lot louder, regardless of the peak value. You could calculate the RMS of the input and output, then compensate the output. I think this would be highly dependent on the type of source material (e.g., distorted guitar, drums, harpsichord, etc.). Something that already has a lot of compression/distortion may sound a lot different than a source with more dynamic range.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 10-10-2016, 10:37 PM   #4
bozmillar
Human being with feelings
 
bozmillar's Avatar
 
Join Date: Sep 2009
Posts: 623
Default

There's no perfect way to do it. The simplest way would be to just apply the inverse of the input gain after you distort it, but this stops working under extreme distortion conditions.
__________________
http://www.bozdigitallabs.com
bozmillar is offline   Reply With Quote
Old 10-11-2016, 12:48 AM   #5
Nowhk
Human being with feelings
 
Join Date: Mar 2016
Posts: 234
Default

Maybe this can help you?

https://www.kvraudio.com/forum/viewt...?f=33&t=460808
Nowhk 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 11:35 PM.


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