COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 02-01-2017, 04:55 AM   #1
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default Help me implementing this compressor & GR METER

I'm really new on compressors.

For now i created analog modeling EQs but i have no luck about compressors.Just trying to understand howw to use compressor with this design.It's old Chuck's simplecomp.

Here is my project.

I can't process audio...

Please show me how to use this.

https://dl.dropboxusercontent.com/u/...PlugEffect.zip
Thanks.

Last edited by Tunca; 02-02-2017 at 11:56 AM.
Tunca is offline   Reply With Quote
Old 02-02-2017, 03:12 AM   #2
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

Still can't figure it out...

My starting point is IPlugEffect as you can see.

Added all necessary source and header files.Wrote "SimpleComp mComp" in IPlugEffect.h.

And then i'm setting parameters in IPlugEffect.cpp.

And writing output like this "*out1 = mComp.process(*in1)"

But it says "No matching member function for call to 'process'".

How can i process?
Tunca is offline   Reply With Quote
Old 02-02-2017, 04:23 AM   #3
debian
Human being with feelings
 
debian's Avatar
 
Join Date: Nov 2008
Posts: 31
Default

I think you need to create an instance of SimpleComp with new

in .h file
SimpleComp *mComp;

in constructor of the IPlugEffect
mComp = new SimpleComp();

then you need to use "->" insted of "."
mComp->process(*in1);
__________________
ojoj...
debian is offline   Reply With Quote
Old 02-02-2017, 05:00 AM   #4
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

Quote:
Originally Posted by debian View Post
I think you need to create an instance of SimpleComp with new

in .h file
SimpleComp *mComp;

in constructor of the IPlugEffect
mComp = new SimpleComp();

then you need to use "->" insted of "."
mComp->process(*in1);
Thanks for reply.

Tried that but no luck.

I tried this one but it's working like expander instead of compressor.

mComp.setThresh(mGain);
mComp.setRatio(2);
mComp.setAttack(1);
mComp.setRelease(100);

mComp.process(*in1,*in2);

*out1 = *in1;
*out2 = *in2;
Tunca is offline   Reply With Quote
Old 02-02-2017, 05:20 AM   #5
gstuff
Human being with feelings
 
Join Date: Feb 2014
Posts: 42
Default

Check your kvr post, i posted some working code.
gstuff is offline   Reply With Quote
Old 02-02-2017, 05:48 AM   #6
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

Quote:
Originally Posted by gstuff View Post
Check your kvr post, i posted some working code.
Just saw it and tried your code.Now made it work!Thank you so much.

But threshold working with minus values.Not between 0 and 1.
Tunca is offline   Reply With Quote
Old 02-02-2017, 05:56 AM   #7
gstuff
Human being with feelings
 
Join Date: Feb 2014
Posts: 42
Default

I know see: mComp.setThresh(-GetParam(kGain)->Value());
gstuff is offline   Reply With Quote
Old 02-02-2017, 06:01 AM   #8
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

Quote:
Originally Posted by gstuff View Post
I know see: mComp.setThresh(-GetParam(kGain)->Value());
Yes,i noticed it now.

But why ratio between 0 and 1? No way to set it between for example 2 and 20?
Tunca is offline   Reply With Quote
Old 02-02-2017, 07:39 AM   #9
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

Now i'm trying to add simple GR meter.But i never worked with vu meters before.

Trying this example.

https://github.com/tappleby/hush-vst.../IPlug/Example

I added necessary thing to .cpp and .header files.But getting some errors with source code.

For example...

peakL = MAX(peakL, fabs(*out1));
peakR = MAX(peakR, fabs(*out2));
}

const double METER_ATTACK = 0.6, METER_DECAY = 0.1;
double xL = (peakL < prevL ? METER_DECAY : METER_ATTACK);
double xR = (peakR < prevR ? METER_DECAY : METER_ATTACK);

peakL = peakL * xL + prevL * (1.0 - xL);
peakR = peakR * xR + prevR * (1.0 - xR);

prevL = peakL;
prevR = peakR;

if (GetGUI()) {
GetGUI()->SetControlFromPlug(mMeterIdx_L, peakL);
GetGUI()->SetControlFromPlug(mMeterIdx_R, peakR);

I tried this code but it can't see peakL and peakR.But i defined them like this "double peakL = 0.0, peakR = 0.0;".
Tunca is offline   Reply With Quote
Old 02-02-2017, 08:16 AM   #10
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

I implemented this meter source into my project.

But meter not moving if i select output as source.I tried to select input as source,meter moving for only one time and staying where it go.

Last edited by Tunca; 02-02-2017 at 09:27 AM.
Tunca is offline   Reply With Quote
Old 02-02-2017, 12:32 PM   #11
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

Still can't figure it out.Even can't make it works as simple vu meter.

As i see,it's under "ProcessDoubleReplacing".But still meter not moving.
Tunca is offline   Reply With Quote
Old 02-02-2017, 01:20 PM   #12
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

Finally make it works as simple vu meter!

Now time to convert it to GR meter...
Tunca is offline   Reply With Quote
Old 02-19-2017, 09:50 PM   #13
CaptnWillie
Human being with feelings
 
Join Date: Dec 2016
Posts: 44
Default

If you got it working, could you please share the steps you took to achieve this? Thanks
CaptnWillie is offline   Reply With Quote
Old 02-20-2017, 01:58 PM   #14
Tunca
Human being with feelings
 
Join Date: Apr 2016
Posts: 107
Default

Quote:
Originally Posted by CaptnWillie View Post
If you got it working, could you please share the steps you took to achieve this? Thanks
What would you want to know?Cause i didn't solve this correctly.For example i can build meter as vu meter or GR meter but i can't build selectable meter for GR and vu.
Tunca is offline   Reply With Quote
Old 02-20-2017, 11:51 PM   #15
Bobflip
Human being with feelings
 
Join Date: Nov 2016
Posts: 77
Default

To get a switchable control you'd want to go to your meter class and create a private variable 'displayMode' and a public method like this:

Code:
void setDisplayMode(int value) {
   displayMode = value;
}
Then in your main code's OnParamChange you can call it like this:

Code:
switch (paramIdx)
{
   case kVUGainDisplay:
      pVUGainDisplay->setDisplayMode(GetParam(kVUGainDisplay)->Value());
      break;
}
Now in the class's draw() method, you can choose how to draw the control with an if statement.
Bobflip 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:46 PM.


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