aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/WinVST
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/WinVST')
-rwxr-xr-xplugins/WinVST/Tape/.vs/VSTProject/v14/.suobin22528 -> 22528 bytes
-rwxr-xr-xplugins/WinVST/Tape/Tape.cpp8
-rwxr-xr-xplugins/WinVST/Tape/Tape.h4
-rwxr-xr-xplugins/WinVST/Tape/TapeProc.cpp10
4 files changed, 17 insertions, 5 deletions
diff --git a/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo b/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo
index 98df0af..8add20f 100755
--- a/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo
+++ b/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo
Binary files differ
diff --git a/plugins/WinVST/Tape/Tape.cpp b/plugins/WinVST/Tape/Tape.cpp
index eb3712c..a34d8b7 100755
--- a/plugins/WinVST/Tape/Tape.cpp
+++ b/plugins/WinVST/Tape/Tape.cpp
@@ -13,6 +13,7 @@ Tape::Tape(audioMasterCallback audioMaster) :
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
{
A = 0.5;
+ B = 0.5;
iirMidRollerAL = 0.0;
iirMidRollerBL = 0.0;
iirHeadBumpAL = 0.0;
@@ -61,6 +62,7 @@ VstInt32 Tape::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. */
@@ -73,6 +75,7 @@ VstInt32 Tape::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
@@ -83,6 +86,7 @@ VstInt32 Tape::setChunk (void* data, VstInt32 byteSize, bool isPreset)
void Tape::setParameter(VstInt32 index, float value) {
switch (index) {
case kParamA: A = value; break;
+ case kParamB: B = value; break;
default: throw; // unknown parameter, shouldn't happen!
}
}
@@ -90,6 +94,7 @@ void Tape::setParameter(VstInt32 index, float value) {
float Tape::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
}
@@ -97,6 +102,7 @@ float Tape::getParameter(VstInt32 index) {
void Tape::getParameterName(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "Slam", kVstMaxParamStrLen); break;
+ case kParamB: vst_strncpy (text, "Bump", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
} //this is our labels for displaying in the VST host
}
@@ -104,6 +110,7 @@ void Tape::getParameterName(VstInt32 index, char *text) {
void Tape::getParameterDisplay(VstInt32 index, char *text) {
switch (index) {
case kParamA: float2string ((A-0.5)*24.0, text, kVstMaxParamStrLen); break;
+ 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
}
@@ -111,6 +118,7 @@ void Tape::getParameterDisplay(VstInt32 index, char *text) {
void Tape::getParameterLabel(VstInt32 index, char *text) {
switch (index) {
case kParamA: vst_strncpy (text, "dB", kVstMaxParamStrLen); break;
+ case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break;
default: break; // unknown parameter, shouldn't happen!
}
}
diff --git a/plugins/WinVST/Tape/Tape.h b/plugins/WinVST/Tape/Tape.h
index 6c1dc00..932247b 100755
--- a/plugins/WinVST/Tape/Tape.h
+++ b/plugins/WinVST/Tape/Tape.h
@@ -17,7 +17,8 @@
enum {
kParamA = 0,
- kNumParameters = 1
+ kParamB = 1,
+ kNumParameters = 2
}; //
const int kNumPrograms = 0;
@@ -80,6 +81,7 @@ private:
//default stuff
float A;
+ float B;
};
#endif
diff --git a/plugins/WinVST/Tape/TapeProc.cpp b/plugins/WinVST/Tape/TapeProc.cpp
index e29f71a..d1ecb27 100755
--- a/plugins/WinVST/Tape/TapeProc.cpp
+++ b/plugins/WinVST/Tape/TapeProc.cpp
@@ -19,6 +19,7 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram
overallscale *= getSampleRate();
double inputgain = pow(10.0,((A-0.5)*24.0)/20.0);
+ double bumpgain = B*0.1;
double HeadBumpFreq = 0.12/overallscale;
double softness = 0.618033988749894848204586;
double RollAmount = (1.0 - softness) / overallscale;
@@ -205,8 +206,8 @@ void Tape::processReplacing(float **inputs, float **outputs, VstInt32 sampleFram
inputSampleL += groundSampleL; //apply UnBox processing
inputSampleR += groundSampleR; //apply UnBox processing
- inputSampleL += ((iirHeadBumpAL + iirHeadBumpBL) * 0.1);//and head bump
- inputSampleR += ((iirHeadBumpAR + iirHeadBumpBR) * 0.1);//and head bump
+ inputSampleL += ((iirHeadBumpAL + iirHeadBumpBL) * bumpgain);//and head bump
+ inputSampleR += ((iirHeadBumpAR + iirHeadBumpBR) * bumpgain);//and head bump
if (lastSampleL >= 0.99)
{
@@ -297,6 +298,7 @@ void Tape::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa
overallscale *= getSampleRate();
double inputgain = pow(10.0,((A-0.5)*24.0)/20.0);
+ double bumpgain = B*0.1;
double HeadBumpFreq = 0.12/overallscale;
double softness = 0.618033988749894848204586;
double RollAmount = (1.0 - softness) / overallscale;
@@ -489,8 +491,8 @@ void Tape::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sa
inputSampleL += groundSampleL; //apply UnBox processing
inputSampleR += groundSampleR; //apply UnBox processing
- inputSampleL += ((iirHeadBumpAL + iirHeadBumpBL) * 0.1);//and head bump
- inputSampleR += ((iirHeadBumpAR + iirHeadBumpBR) * 0.1);//and head bump
+ inputSampleL += ((iirHeadBumpAL + iirHeadBumpBL) * bumpgain);//and head bump
+ inputSampleR += ((iirHeadBumpAR + iirHeadBumpBR) * bumpgain);//and head bump
if (lastSampleL >= 0.99)
{