aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacVST
diff options
context:
space:
mode:
authorChris Johnson <jinx6568@sover.net>2020-04-19 20:15:15 -0400
committerChris Johnson <jinx6568@sover.net>2020-04-19 20:15:15 -0400
commit32e2e4d41d8926b684329b508c576b640c547959 (patch)
treeba14e69ca092f60b2005a210667f7dfefe083f18 /plugins/MacVST
parent6303bd453cc0defc93801713fe3100f0c857f389 (diff)
downloadairwindows-lv2-port-32e2e4d41d8926b684329b508c576b640c547959.tar.gz
airwindows-lv2-port-32e2e4d41d8926b684329b508c576b640c547959.tar.bz2
airwindows-lv2-port-32e2e4d41d8926b684329b508c576b640c547959.zip
Tape Redux
Modifications to allow for a Bump control that enables level setting on the head bump
Diffstat (limited to 'plugins/MacVST')
-rwxr-xr-xplugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.pbxuser44
-rwxr-xr-xplugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.perspectivev321
-rwxr-xr-xplugins/MacVST/Tape/source/Tape.cpp8
-rwxr-xr-xplugins/MacVST/Tape/source/Tape.h4
-rwxr-xr-xplugins/MacVST/Tape/source/TapeProc.cpp10
5 files changed, 52 insertions, 35 deletions
diff --git a/plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.pbxuser
index e624c93..635e3be 100755
--- a/plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.pbxuser
+++ b/plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.pbxuser
@@ -49,14 +49,14 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 602110889;
- PBXWorkspaceStateSaveDate = 602110889;
+ PBXPerProjectTemplateStateSaveDate = 608502034;
+ PBXWorkspaceStateSaveDate = 608502034;
};
perUserProjectItems = {
8B043CDA23DCE7AD00DF857C /* PBXTextBookmark */ = 8B043CDA23DCE7AD00DF857C /* PBXTextBookmark */;
8B043D1923DCFF6200DF857C /* PBXTextBookmark */ = 8B043D1923DCFF6200DF857C /* PBXTextBookmark */;
+ 8B7A75F32445042300014B55 /* PBXTextBookmark */ = 8B7A75F32445042300014B55 /* PBXTextBookmark */;
8BA0D9C023E37DB300721922 /* PBXTextBookmark */ = 8BA0D9C023E37DB300721922 /* PBXTextBookmark */;
- 8BA0D9C123E37DB300721922 /* PBXBookmark */ = 8BA0D9C123E37DB300721922 /* PBXBookmark */;
8BA0D9C223E37DB300721922 /* PBXTextBookmark */ = 8BA0D9C223E37DB300721922 /* PBXTextBookmark */;
};
sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */;
@@ -65,17 +65,17 @@
};
2407DEB6089929BA00EB68BF /* Tape.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {848, 1742}}";
- sepNavSelRange = "{515, 0}";
- sepNavVisRange = "{2798, 1803}";
+ sepNavIntBoundsRect = "{{0, 0}, {848, 1833}}";
+ sepNavSelRange = "{4328, 0}";
+ sepNavVisRange = "{2979, 1986}";
sepNavWindowFrame = "{{12, 57}, {895, 821}}";
};
};
245463B80991757100464AD3 /* Tape.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {866, 1261}}";
- sepNavSelRange = "{517, 0}";
- sepNavVisRange = "{427, 180}";
+ sepNavIntBoundsRect = "{{0, 0}, {866, 1144}}";
+ sepNavSelRange = "{2663, 0}";
+ sepNavVisRange = "{672, 2237}";
sepNavWindowFrame = "{{20, 57}, {895, 821}}";
};
};
@@ -89,9 +89,9 @@
};
24D8286F09A914000093AEF8 /* TapeProc.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {740, 7371}}";
- sepNavSelRange = "{23627, 0}";
- sepNavVisRange = "{23438, 235}";
+ sepNavIntBoundsRect = "{{0, 0}, {740, 7579}}";
+ sepNavSelRange = "{23699, 0}";
+ sepNavVisRange = "{23459, 168}";
sepNavWindowFrame = "{{545, 57}, {895, 821}}";
};
};
@@ -114,7 +114,7 @@
fRef = 2407DEB6089929BA00EB68BF /* Tape.cpp */;
name = "Tape.cpp: 21";
rLen = 0;
- rLoc = 857;
+ rLoc = 867;
rType = 0;
vrLen = 331;
vrLoc = 436;
@@ -124,11 +124,21 @@
fRef = 245463B80991757100464AD3 /* Tape.h */;
name = "Tape.h: 26";
rLen = 0;
- rLoc = 517;
+ rLoc = 531;
rType = 0;
vrLen = 180;
vrLoc = 427;
};
+ 8B7A75F32445042300014B55 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 24D8286F09A914000093AEF8 /* TapeProc.cpp */;
+ name = "TapeProc.cpp: 555";
+ rLen = 0;
+ rLoc = 23699;
+ rType = 0;
+ vrLen = 168;
+ vrLoc = 23459;
+ };
8BA0D9C023E37DB300721922 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */;
@@ -139,16 +149,12 @@
vrLen = 280;
vrLoc = 10459;
};
- 8BA0D9C123E37DB300721922 /* PBXBookmark */ = {
- isa = PBXBookmark;
- fRef = 24D8286F09A914000093AEF8 /* TapeProc.cpp */;
- };
8BA0D9C223E37DB300721922 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 24D8286F09A914000093AEF8 /* TapeProc.cpp */;
name = "TapeProc.cpp: 553";
rLen = 0;
- rLoc = 23627;
+ rLoc = 23699;
rType = 0;
vrLen = 235;
vrLoc = 23438;
diff --git a/plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3
index ad3683d..1278b55 100755
--- a/plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3
+++ b/plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3
@@ -351,13 +351,13 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>8BA0D9C223E37DB300721922</string>
+ <string>8B7A75F32445042300014B55</string>
<key>history</key>
<array>
<string>8B043CDA23DCE7AD00DF857C</string>
<string>8B043D1923DCFF6200DF857C</string>
<string>8BA0D9C023E37DB300721922</string>
- <string>8BA0D9C123E37DB300721922</string>
+ <string>8BA0D9C223E37DB300721922</string>
</array>
</dict>
<key>SplitCount</key>
@@ -371,18 +371,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {603, 102}}</string>
+ <string>{{0, 0}, {603, 86}}</string>
<key>RubberWindowFrame</key>
<string>530 344 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>102pt</string>
+ <string>86pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>339pt</string>
+ <string>355pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -396,7 +396,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {603, 312}}</string>
+ <string>{{10, 27}, {603, 328}}</string>
<key>RubberWindowFrame</key>
<string>530 344 810 487 0 0 1440 878 </string>
</dict>
@@ -480,11 +480,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>8BA0D9C323E37DB300721922</string>
+ <string>8B7A75F42445042300014B55</string>
<string>1CA23ED40692098700951B8B</string>
- <string>8BA0D9C423E37DB300721922</string>
+ <string>8B7A75F52445042300014B55</string>
<string>8B0237581D42B1C400E1E8C8</string>
- <string>8BA0D9C523E37DB300721922</string>
+ <string>8B7A75F62445042300014B55</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -637,7 +637,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>602111411.395051</real>
+ <real>608502819.69231403</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -654,7 +654,6 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>8BA0D9C623E37DB300721922</string>
<string>/Users/christopherjohnson/Desktop/Plugins/MacVST/Tape/Tape.xcodeproj</string>
</array>
<key>WindowString</key>
diff --git a/plugins/MacVST/Tape/source/Tape.cpp b/plugins/MacVST/Tape/source/Tape.cpp
index eb3712c..a34d8b7 100755
--- a/plugins/MacVST/Tape/source/Tape.cpp
+++ b/plugins/MacVST/Tape/source/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/MacVST/Tape/source/Tape.h b/plugins/MacVST/Tape/source/Tape.h
index 6c1dc00..932247b 100755
--- a/plugins/MacVST/Tape/source/Tape.h
+++ b/plugins/MacVST/Tape/source/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/MacVST/Tape/source/TapeProc.cpp b/plugins/MacVST/Tape/source/TapeProc.cpp
index e29f71a..d1ecb27 100755
--- a/plugins/MacVST/Tape/source/TapeProc.cpp
+++ b/plugins/MacVST/Tape/source/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)
{