What is this array for in PnS

Official support for: bluecataudio.com
KVRist
34 posts since 6 May, 2021

Post Wed Nov 10, 2021 3:10 am

Hello, I am wondering why we need this in the array, what exactly does it do?

Code: Select all

array<double> inputParameters(inputParametersNames.length);
Thank you.

KVRer
25 posts since 17 May, 2008

Post Wed Nov 10, 2021 3:22 am

This is the array that holds the values of each of the input parameters you have declared and you generally use it in the updateInputParameters function. For example,

lfoFreq = inputParameters[2];

PnS actually puts the values into this array but you have to declare it so your programme can access those values.

This declares the array to have the same number of elements as the number of input parameter names you have already declared so PnS has a space to store each parameters value.

KVRist

Topic Starter

34 posts since 6 May, 2021

Post Wed Nov 10, 2021 6:21 am

Thanks for getting back to me. But I have seen some of the scripts do have not it, the gain plugin for example?

User avatar
KVRAF
4779 posts since 8 Sep, 2004 from Paris (France)

Post Wed Nov 10, 2021 6:40 am

Only scripts that do not have parameters will not have it. The gain example has this definition at the beginning.

KVRist

Topic Starter

34 posts since 6 May, 2021

Post Wed Nov 10, 2021 7:53 am

Ok many thanks for explaining that.

Return to “Blue Cat Audio”