Hi Folks,
I'm trying to create a simple wet/dry fader control for an aux channel. It would take a sidechain input of a dry signal and mix it in with a wet signal. I want it to have one % knob.
I don't know how to script, but I have been trying to piece it together from what I could learn in the presets and user uploaded scripts. Here is my script:
/**
* Fade Between a Wet and Dry Signal.
*/
/** Script metadata.
*/
string name = “Wet Dry“;
string author = “Phillip Broste”;
string description = "Very simple Wet Dry Fader”;
/** Define our parameters.
*/
array<string> inputParametersNames={"DryWet"};
array<string> inputParametersUnits={“%”};
array<double> inputParameters(inputParametersNames.length);
array<double> inputParametersMin = {0};
array<double> inputParametersMax = {100};
array<double> inputParametersDefault = {100};
array<double> inputParameters(inputParametersNames.length);
/** Define our internal variables.
*
*/
double inputGain=0;
double sideChainGain=0;
double DryWet=0;
uint commonInputsCount=audioInputsCount;
void initialize()
{
// compute common number of channels
if(auxAudioInputsCount<commonInputsCount)
commonInputsCount=auxAudioInputsCount;
}
void processSample(array<double>& ioSample)
{
for(uint channel=0;channel<commonInputsCount;channel++)
{
ioSample[channel]=ioSample[channel]*inputGain+ioSample[channel+audioInputsCount]*sideChainGain;
}
for(uint channel=commonInputsCount;channel<audioInputsCount;channel++)
{
ioSample[channel]*=inputGain;
}
}
void updateInputParameters()
{
inputGain=inputParameters[0]*.01;
sideChainGain=1-sideChainGain;
}
And here is the error I get:
Loading script file: /Users/prbroste/Documents/Blue Cat Audio/Blue Cat's Plug'n Script/Scripts/Wet Dry.cxx
Error: Non-terminated string literal in /Users/prbroste/Documents/Blue Cat Audio/Blue Cat's Plug'n Script/Scripts/Wet Dry.cxx(13:44)
Error: failed to initialize script
If anyone with a knowledge of scripting can help me make this work I would be truly grateful.
Thanks,
Phil B.
Trying to Debug an Error in Plug n' Script
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- 6349 posts since 8 Sep, 2004 from Paris (France)
Hi Phil,
Thank you for giving a try to the plug-in. It's hard to tell from the pasted script, but it looks like you are using several different versions of the double quote character ("). This may happen if copying/pasting from a web page. I might be wrong, but this could be the reason for the error. Maybe you should download the text file and modify it instead of doing a copy/paste from the web page. Or simply re-write all double quotes manually, but it might take longer
.
Thank you for giving a try to the plug-in. It's hard to tell from the pasted script, but it looks like you are using several different versions of the double quote character ("). This may happen if copying/pasting from a web page. I might be wrong, but this could be the reason for the error. Maybe you should download the text file and modify it instead of doing a copy/paste from the web page. Or simply re-write all double quotes manually, but it might take longer
-
- KVRer
- Topic Starter
- 2 posts since 26 Nov, 2015
Thank you so much! It is working!
I did some research and got the square root curve working too. This puts an end to a long and frustrating search! Thank you so much!
Next thing I want to do is design a cool interface, but I know very little about XML. Expect some questions!
I am also already thinking of more features. A bypass/solo button for each input would be cool. RMS or peak metering.
I will upload soon. Thanks again so very, very much. Will buy the full version first thing in the am.
Cheers,
Phil B.
I did some research and got the square root curve working too. This puts an end to a long and frustrating search! Thank you so much!
Next thing I want to do is design a cool interface, but I know very little about XML. Expect some questions!
I am also already thinking of more features. A bypass/solo button for each input would be cool. RMS or peak metering.
I will upload soon. Thanks again so very, very much. Will buy the full version first thing in the am.
Cheers,
Phil B.
-
Blue Cat Audio Blue Cat Audio https://www.kvraudio.com/forum/memberlist.php?mode=viewprofile&u=39981
- KVRAF
- 6349 posts since 8 Sep, 2004 from Paris (France)
Great! Welcome to the dsp scripters community
! Feel free to ask any question, that's what the forum is for!