Hide Plugin Controls

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

Post

Hello, maybe this is a little weird, but I want to put a fixed Highshelf in a plug'n script, but I want to hide all the controls so the user just sees an empty plugin, how can I do this, I tried commenting out the array string, but that causes errors, is it possible?

Any help much appreciated.
Thanks

Post

Code: Select all

array<string> inputParametersNames={"Frequency","Bandwidth","Boost"};
array<double> inputParameters(inputParametersNames.length);
array<double> inputParametersDefault={.5,0,.5};
From the code above posted in your ticket, you can do the following:

Code: Select all

double frequency=.5;
double bandwidth=0;
double boost=.5;
And everywhere else in the code, replace "inputParameters[0]" with frequency, "inputParameters[1]" with bandwidth, and "inputParameters[2]" with boost.

Post

Thanks for this, much appreciated.

Post

I know I am probably doing something really stupid here, it obviously wrong, any help where I am going wrong, much appreciated

/* Define our parameters.
* One parameter for cutoff frequency
*/
//array<string> inputParametersNames={"Frequency","Bandwidth","Boost"};
double inputParamValue0=.5;
double inputParamValue0=.0;
double inputParamValue0=.5;

//string name="Peak Filter";

/* Define our internal variables.
*
*/
KittyDSP::Biquad::Filter filter(audioInputsCount);
double frequency=.5;
double bandwidth=0;
double boost=.5;

/* per-sample processing function: called for every sample with updated parameters values.
*
*/
void processSample(array<double>& ioSample)
{
filter.processSample(ioSample);
}

/* update internal parameters from inputParameters array.
* called every sample before processSample method or every buffer before process method
*/
void updateInputParameters()
{
filter.setPeak(freqFactor*pow(1000,inputParameters[.5]),minBw+inputParameters[0]*bwRange,pow(10,-.5+inputParameters[.5]));
}

Post

You haven’t commented out the second half of the inputParameters definition or is that just the forum doing the text wrapping?

Post

What’s the problem you are having?

Post

Thanks for getting back to me, where do mean I haven't commented out, sorry very new to all this.
Thanks

Post

You see I want to create an EQ plugin with fixed settings, but am getting confused in how to implement the code.

Post

I haven’t used the filter module but I’d try this.

First remove the lines

//array<string> inputParametersNames={"Frequency","Bandwidth","Boost"};
double inputParamValue0=.5;
double inputParamValue0=.0;
double inputParamValue0=.5;

Replace references to inputParameters with the frequency, bandwidth and boost.

You have to define and give values to variables like minBw, bwRange and freqFactor.

The best way to do what you want is to start with code here

https://github.com/bluecataudio/plugnsc ... r-peak.cxx

and follow the instructions given above by Blue Cat Audio.

Post

Did you ever figure this out? I've asked Blue Cat too and they seem to keep talking about input parameters when I don't want to have any input parameters. Just a fixed EQ that defaults to a frequency that the user never sees in GUI.

Post

kelsoncamp wrote: Sun Dec 11, 2022 7:21 pm Did you ever figure this out? I've asked Blue Cat too and they seem to keep talking about input parameters when I don't want to have any input parameters. Just a fixed EQ that defaults to a frequency that the user never sees in GUI.
As explained in the post above if you do not want input parameters, you can remove their definition and replace them with static values.

Post

Thank you. So I now have a script with two static EQ's. My problem is that they only run one at a time and not together. I know they need to be different names but I think I'm missing where the difference matters:

/** \file
*
*
*
*/

#include "library/BiquadFilter.hxx"
#include "library/Constants.hxx"






///*
KittyDSP::Biquad::Filter filter1(audioInputsCount);
double freqRange=2*PI*1000/sampleRate;
double gain=0;
double postGain=1;



void initialize()
{
double freqFactor = 2. * PI * 20. / sampleRate;
double bwRange = 1;
double minBw = 1. / 10.;

double frequency = .9;
double bandwidth = 1.;
double boost = .8;

double theta = freqFactor * pow(1000., frequency);
double halfBwInOctava = minBw + bandwidth * bwRange;
double sqrtGain = pow(10, -.5 + boost);

filter1.setPeak(theta, halfBwInOctava, sqrtGain);
}

void processSample(array<double>& ioSample)
{
filter1.processSample(ioSample);


}

//*/

KittyDSP::Biquad::Filter filter2(audioOutputsCount);

void initialize()
{
double freqFactor = 2. * PI * 20. / sampleRate;
double bwRange = 1.;
double minBw = 1. / 10.;

double frequency = .5;
double bandwidth = 0.;
double boost = .5;

double theta = freqFactor * pow(1000., frequency);
double halfBwInOctava = minBw + bandwidth * bwRange;
double sqrtGain = pow(10, -.5 + boost);

print("theta: " + theta + ", halfBw: " + halfBwInOctava + ", sqrtGain: " + sqrtGain);

filter2.setHighPass(theta);
//filter.setPeak(theta, halfBwInOctava, sqrtGain);
}



void processSample(array<double>& ioSample)
{
filter2.processSample(ioSample);


}

Post

The DSP script can only contain a single instance of the initialize and process functions. What you want to do is chain your filters by yourself inside your global filter, by processing them one after another. Something like this:

Code: Select all

#include "library/BiquadFilter.hxx"
#include "library/Constants.hxx"

KittyDSP::Biquad::Filter filter1(audioInputsCount);
KittyDSP::Biquad::Filter filter2(audioInputsCount);

double freqRange=2*PI*1000/sampleRate;
double gain=0;
double postGain=1;

void initialize()
{
double freqFactor = 2. * PI * 20. / sampleRate;
double bwRange = 1;
double minBw = 1. / 10.;

double frequency = .9;
double bandwidth = 1.;
double boost = .8;

double theta = freqFactor * pow(1000., frequency);
double halfBwInOctava = minBw + bandwidth * bwRange;
double sqrtGain = pow(10, -.5 + boost);

filter1.setPeak(theta, halfBwInOctava, sqrtGain);
filter2.setHighPass(theta);
}

void processSample(array<double>& ioSample)
{
    // process filter 1 then filter 2
    filter1.processSample(ioSample);
    filter2.processSample(ioSample);
}


Post Reply

Return to “Blue Cat Audio”