Hide Plugin Controls
-
- KVRist
- 40 posts since 6 May, 2021
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
Any help much appreciated.
Thanks
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- 6335 posts since 8 Sep, 2004 from Paris (France)
From the code above posted in your ticket, you can do the following:Code: Select all
array<string> inputParametersNames={"Frequency","Bandwidth","Boost"}; array<double> inputParameters(inputParametersNames.length); array<double> inputParametersDefault={.5,0,.5};
Code: Select all
double frequency=.5;
double bandwidth=0;
double boost=.5;
-
- KVRist
- Topic Starter
- 40 posts since 6 May, 2021
Thanks for this, much appreciated.
-
- KVRist
- Topic Starter
- 40 posts since 6 May, 2021
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]));
}
/* 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]));
}
-
- KVRist
- Topic Starter
- 40 posts since 6 May, 2021
Thanks for getting back to me, where do mean I haven't commented out, sorry very new to all this.
Thanks
Thanks
-
- KVRist
- Topic Starter
- 40 posts since 6 May, 2021
You see I want to create an EQ plugin with fixed settings, but am getting confused in how to implement the code.
-
- KVRer
- 28 posts since 17 May, 2008
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.
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.
-
- KVRer
- 15 posts since 8 Dec, 2022
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.
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- 6335 posts since 8 Sep, 2004 from Paris (France)
As explained in the post above if you do not want input parameters, you can remove their definition and replace them with static values.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.
-
- KVRer
- 15 posts since 8 Dec, 2022
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);
}
/** \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);
}
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- 6335 posts since 8 Sep, 2004 from Paris (France)
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);
}