aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/WinVST/Dark/Dark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/WinVST/Dark/Dark.cpp')
-rwxr-xr-xplugins/WinVST/Dark/Dark.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/plugins/WinVST/Dark/Dark.cpp b/plugins/WinVST/Dark/Dark.cpp
index 0f9721c..bae0428 100755
--- a/plugins/WinVST/Dark/Dark.cpp
+++ b/plugins/WinVST/Dark/Dark.cpp
@@ -13,6 +13,7 @@ Dark::Dark(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 1.0;
+ B = 0.0;
for(int count = 0; count < 99; count++) {
lastSampleL[count] = 0;
lastSampleR[count] = 0;
@@ -50,6 +51,7 @@ VstInt32 Dark::getChunk (void** data, bool isPreset)
{
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
chunkData[0] = A;
+ chunkData[1] = B;
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
started with. */
@@ -62,6 +64,7 @@ VstInt32 Dark::setChunk (void* data, VstInt32 byteSize, bool isPreset)
{
float *chunkData = (float *)data;
A = pinParameter(chunkData[0]);
+ B = pinParameter(chunkData[1]);
/* We're ignoring byteSize as we found it to be a filthy liar */
/* calculate any other fields you need here - you could copy in
@@ -72,6 +75,7 @@ VstInt32 Dark::setChunk (void* data, VstInt32 byteSize, bool isPreset)
void Dark::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamA: A = value; break;
+ case kParamB: B = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
@@ -79,6 +83,7 @@ void Dark::setParameter(VstInt32 index, float value) {
float Dark::getParameter(VstInt32 index) {
switch (index) {
case kParamA: return A; break;
+ case kParamB: return B; break;
default: break; // unknown parameter, shouldn't happen!
} return 0.0; //we only need to update the relevant name, this is simple to manage
}
@@ -86,6 +91,7 @@ float Dark::getParameter(VstInt32 index) {
void Dark::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Quant", kVstMaxParamStrLen); break;
+ case kParamB: vst_strncpy (text, "DeRez", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
@@ -97,6 +103,7 @@ void Dark::getParameterDisplay(VstInt32 index, char *text) {
case 1: vst_strncpy (text, "HD 24", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} break; //completed consoletype 'popup' parameter, exit
+ case kParamB: float2string (B, text, kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this displays the values and handles 'popups' where it's discrete choices
}
@@ -104,6 +111,7 @@ void Dark::getParameterDisplay(VstInt32 index, char *text) {
void Dark::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
+ case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}