Blue Cat's Plug'n Script - Scripting the Level Meter Range

Official support for: bluecataudio.com
Post Reply New Topic
RELATED
PRODUCTS
Plug'n Script

Post

Hello,

I was demoing the Blue Cat's Plug'n Script, and tried to do some simple changes to the script "Level Meter". I wanted the readings to go to -120 dB instead of -60 dB

I could change the visuals, but not the readings – it just doesn't "see" audio below -60 dB. Is this a limitation of the building block, or am I just missing something in the code?

Thanks.

Post

Thank you for trying our plug-in. There are two places in the script that need to be modified, for the definition and then the computation of the outputs:

Code: Select all

    Line 32: parameters range definition
for(uint i=0;i<audioInputsCount;i++)
    {
        outputParametersUnits[i]="dB";
        outputParametersMin[i]=-120; ///< CHANGED TO -120dB
        outputParametersMax[i]=0;
    }

Code: Select all

 Line 75: meter value computation
void computeOutputData()
{
    for(uint i=0;i<audioInputsCount;i++)
    {
        if(levels[i]>pow(10,-6)) ///< CHANGED TO -120 dB limit
            outputParameters[i]=20*log10(levels[i]);
        else
            outputParameters[i]=-120; ///< CHANGED TO -120 dB minimum value
    }
}
Hope this helps!

Post

Thanks! That did the job.

One more question:
I did a test comparing the CPU usage of the "Blue Cat's Plug'n Script" with the Level Meter script – and "Blue Cat's DP Meter Pro".
The DAW said that "Plug'n Script" used twice as much CPU as "DP Meter Pro", and when I turned off all meters – four times as much. Can this be correct?
(I want to get the level info into another application via CC and I want to keep the CPU usage as low as possible. I thought that the Plug'n Script would be the least taxing, but it seems like it’s not.)

Thanks again.

Post

CPU usage with scripts may indeed be higher than with native plug-ins, for several reasons:
First, the scripts compiler will not be able to perform as many optimizations as with native C++ code that we use for our own plug-ins.

Also, with some hosts (such as Pro Tools), the CPU usage may look higher, even if it is not the case, because the Plug'n Script plug-in is using its own thread to run scripts, and CPU reporting sometimes does not work properly because of this.

Post

OK. Good to know. Thanks for the info.

Post Reply

Return to “Blue Cat Audio”