Have a look inside
IPlugEffect.cpp
Code:
GetParam(kGain)->InitDouble("Gain", 50., 0., 100.0, 0.01, "%");
GetParam(kGain)->SetShape(2.);
We're initializing at 50 with a range of 0-100, however straight away we're calling SetShape() to achieve a logarithmic response. The reason for that is a few lines later:
Code:
double* in1 = inputs[0];
double* in2 = inputs[1];
double* out1 = outputs[0];
double* out2 = outputs[1];
for (int s = 0; s < nFrames; ++s, ++in1, ++in2, ++out1, ++out2)
{
*out1 = *in1 * mGain;
*out2 = *in2 * mGain;
}
The value of mGain is taken as-is, and we're using the linear to logarithmic conversion built right into parameters in IPlug.
SetShape() isn't yet documented on the live documentation (I have it almost done on my local machine), but I talked with Oli about it and the response is y = x^(1/shape), with a default value of 1. so it just passes through. No wonder you got about 2 oclock, a value of 0.5 (50/100) gives 0.5^(1/2)=0.7
Here's a graph of what we're doing: