From 32e2e4d41d8926b684329b508c576b640c547959 Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Sun, 19 Apr 2020 20:15:15 -0400 Subject: Tape Redux Modifications to allow for a Bump control that enables level setting on the head bump --- plugins/LinuxVST/src/Tape/Tape.cpp | 8 +++ plugins/LinuxVST/src/Tape/Tape.h | 4 +- plugins/LinuxVST/src/Tape/TapeProc.cpp | 10 +-- plugins/MacAU/Tape/Tape.cpp | 11 +++- plugins/MacAU/Tape/Tape.h | 5 +- .../Tape/Tape.xcodeproj/christopherjohnson.pbxuser | 71 ++++++++++++--------- .../christopherjohnson.perspectivev3 | 39 ++++++----- .../Tape/Tape.xcodeproj/christopherjohnson.pbxuser | 44 +++++++------ .../christopherjohnson.perspectivev3 | 21 +++--- plugins/MacVST/Tape/source/Tape.cpp | 8 +++ plugins/MacVST/Tape/source/Tape.h | 4 +- plugins/MacVST/Tape/source/TapeProc.cpp | 10 +-- plugins/WinVST/Tape/.vs/VSTProject/v14/.suo | Bin 22528 -> 22528 bytes plugins/WinVST/Tape/Tape.cpp | 8 +++ plugins/WinVST/Tape/Tape.h | 4 +- plugins/WinVST/Tape/TapeProc.cpp | 10 +-- 16 files changed, 160 insertions(+), 97 deletions(-) diff --git a/plugins/LinuxVST/src/Tape/Tape.cpp b/plugins/LinuxVST/src/Tape/Tape.cpp index eb3712c..a34d8b7 100755 --- a/plugins/LinuxVST/src/Tape/Tape.cpp +++ b/plugins/LinuxVST/src/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/LinuxVST/src/Tape/Tape.h b/plugins/LinuxVST/src/Tape/Tape.h index 6c1dc00..932247b 100755 --- a/plugins/LinuxVST/src/Tape/Tape.h +++ b/plugins/LinuxVST/src/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/LinuxVST/src/Tape/TapeProc.cpp b/plugins/LinuxVST/src/Tape/TapeProc.cpp index e29f71a..d1ecb27 100755 --- a/plugins/LinuxVST/src/Tape/TapeProc.cpp +++ b/plugins/LinuxVST/src/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) { diff --git a/plugins/MacAU/Tape/Tape.cpp b/plugins/MacAU/Tape/Tape.cpp index 75b7ae3..b441eeb 100755 --- a/plugins/MacAU/Tape/Tape.cpp +++ b/plugins/MacAU/Tape/Tape.cpp @@ -60,6 +60,7 @@ Tape::Tape(AudioUnit component) CreateElements(); Globals()->UseIndexedParameters(kNumberOfParameters); SetParameter(kParam_One, kDefaultValue_ParamOne ); + SetParameter(kParam_Two, kDefaultValue_ParamTwo ); #if AU_DEBUG_DISPATCHER mDebugDispatcher = new AUDebugDispatcher (this); @@ -102,6 +103,13 @@ ComponentResult Tape::GetParameterInfo(AudioUnitScope inScope, outParameterInfo.minValue = -12.0; outParameterInfo.maxValue = 12.0; outParameterInfo.defaultValue = kDefaultValue_ParamOne; + break; + case kParam_Two: + AUBase::FillInParameterName (outParameterInfo, kParameterTwoName, false); + outParameterInfo.unit = kAudioUnitParameterUnit_Generic; + outParameterInfo.minValue = 0.0; + outParameterInfo.maxValue = 1.0; + outParameterInfo.defaultValue = kDefaultValue_ParamTwo; break; default: result = kAudioUnitErr_InvalidParameter; @@ -185,6 +193,7 @@ void Tape::TapeKernel::Process( const Float32 *inSourceP, overallscale *= GetSampleRate(); Float64 inputgain = pow(10.0,GetParameter( kParam_One )/20.0); + Float64 bumpgain = GetParameter( kParam_Two ) * 0.1; Float64 HeadBumpFreq = 0.12/overallscale; Float64 softness = 0.618033988749894848204586; Float64 RollAmount = (1.0 - softness) / overallscale; @@ -303,7 +312,7 @@ void Tape::TapeKernel::Process( const Float32 *inSourceP, inputSample += groundSample; //apply UnBox processing - inputSample += ((iirHeadBumpA + iirHeadBumpB) * 0.1);//and head bump + inputSample += ((iirHeadBumpA + iirHeadBumpB) * bumpgain);//and head bump if (lastSample >= 0.99) { diff --git a/plugins/MacAU/Tape/Tape.h b/plugins/MacAU/Tape/Tape.h index 463ddb7..2aa9a8f 100755 --- a/plugins/MacAU/Tape/Tape.h +++ b/plugins/MacAU/Tape/Tape.h @@ -55,13 +55,16 @@ // parameters static const float kDefaultValue_ParamOne = 0.0; +static const float kDefaultValue_ParamTwo = 0.5; static CFStringRef kParameterOneName = CFSTR("Slam"); +static CFStringRef kParameterTwoName = CFSTR("Bump"); enum { kParam_One =0, + kParam_Two =1, //Add your parameters here... - kNumberOfParameters=1 + kNumberOfParameters=2 }; #pragma mark ____Tape diff --git a/plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.pbxuser index f642afa..ebc5341 100755 --- a/plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.pbxuser @@ -49,13 +49,14 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 602113855; - PBXWorkspaceStateSaveDate = 602113855; + PBXPerProjectTemplateStateSaveDate = 608501411; + PBXWorkspaceStateSaveDate = 608501411; }; perUserProjectItems = { 8B043C9B23DA71E500DF857C /* PlistBookmark */ = 8B043C9B23DA71E500DF857C /* PlistBookmark */; - 8BA0D9F523E3880200721922 /* PBXTextBookmark */ = 8BA0D9F523E3880200721922 /* PBXTextBookmark */; - 8BA0D9F623E3880200721922 /* PBXTextBookmark */ = 8BA0D9F623E3880200721922 /* PBXTextBookmark */; + 8B7A75C92445009800014B55 /* PBXTextBookmark */ = 8B7A75C92445009800014B55 /* PBXTextBookmark */; + 8B7A75CE244500B600014B55 /* PBXTextBookmark */ = 8B7A75CE244500B600014B55 /* PBXTextBookmark */; + 8BE00CB7244181FC008A6BAB /* PBXTextBookmark */ = 8BE00CB7244181FC008A6BAB /* PBXTextBookmark */; }; sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */; userBuildSettings = { @@ -73,12 +74,32 @@ rLen = 0; rLoc = 9223372036854775808; }; + 8B7A75C92445009800014B55 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Tape.h */; + name = "Tape.h: 62"; + rLen = 0; + rLoc = 3000; + rType = 0; + vrLen = 422; + vrLoc = 3883; + }; + 8B7A75CE244500B600014B55 /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BC6025B073B072D006C4272 /* Tape.h */; + name = "Tape.h: 62"; + rLen = 0; + rLoc = 3000; + rType = 0; + vrLen = 422; + vrLoc = 3883; + }; 8BA05A660720730100365D66 /* Tape.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {670, 4654}}"; - sepNavSelRange = "{9468, 0}"; - sepNavVisRange = "{9192, 345}"; - sepNavWindowFrame = "{{570, 65}, {870, 813}}"; + sepNavIntBoundsRect = "{{0, 0}, {824, 4498}}"; + sepNavSelRange = "{13706, 0}"; + sepNavVisRange = "{0, 2900}"; + sepNavWindowFrame = "{{531, 58}, {870, 813}}"; }; }; 8BA05A690720730100365D66 /* TapeVersion.h */ = { @@ -89,31 +110,11 @@ sepNavWindowFrame = "{{15, 60}, {870, 813}}"; }; }; - 8BA0D9F523E3880200721922 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Tape.cpp */; - name = "Tape.cpp: 222"; - rLen = 0; - rLoc = 9468; - rType = 0; - vrLen = 345; - vrLoc = 9192; - }; - 8BA0D9F623E3880200721922 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 8BA05A660720730100365D66 /* Tape.cpp */; - name = "Tape.cpp: 222"; - rLen = 0; - rLoc = 9468; - rType = 0; - vrLen = 345; - vrLoc = 9192; - }; 8BC6025B073B072D006C4272 /* Tape.h */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {894, 1872}}"; - sepNavSelRange = "{2893, 0}"; - sepNavVisRange = "{3805, 1496}"; + sepNavSelRange = "{3000, 0}"; + sepNavVisRange = "{3883, 422}"; sepNavWindowFrame = "{{570, 65}, {870, 813}}"; }; }; @@ -131,6 +132,16 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; + 8BE00CB7244181FC008A6BAB /* PBXTextBookmark */ = { + isa = PBXTextBookmark; + fRef = 8BA05A660720730100365D66 /* Tape.cpp */; + name = "Tape.cpp: 222"; + rLen = 0; + rLoc = 9950; + rType = 0; + vrLen = 314; + vrLoc = 9223; + }; 8D01CCC60486CAD60068D4B7 /* Tape */ = { activeExec = 0; }; diff --git a/plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3 index 57f04e8..a5ad5c6 100755 --- a/plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3 @@ -256,8 +256,6 @@ Layout - BecomeActive - ContentConfiguration PBXBottomSmartGroupGIDs @@ -326,7 +324,7 @@ 288 RubberWindowFrame - 599 197 841 654 0 0 1440 878 + 492 212 841 654 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -342,7 +340,7 @@ PBXProjectModuleGUID 8BD7274A1D46E5A5000176F0 PBXProjectModuleLabel - Tape.cpp + Tape.h PBXSplitModuleInNavigatorKey Split0 @@ -350,15 +348,16 @@ PBXProjectModuleGUID 8BD7274B1D46E5A5000176F0 PBXProjectModuleLabel - Tape.cpp + Tape.h _historyCapacity 0 bookmark - 8BA0D9F623E3880200721922 + 8B7A75CE244500B600014B55 history 8B043C9B23DA71E500DF857C - 8BA0D9F523E3880200721922 + 8BE00CB7244181FC008A6BAB + 8B7A75C92445009800014B55 SplitCount @@ -372,18 +371,18 @@ GeometryConfiguration Frame - {{0, 0}, {531, 188}} + {{0, 0}, {531, 158}} RubberWindowFrame - 599 197 841 654 0 0 1440 878 + 492 212 841 654 0 0 1440 878 Module PBXNavigatorGroup Proportion - 188pt + 158pt Proportion - 420pt + 450pt Tabs @@ -397,9 +396,7 @@ GeometryConfiguration Frame - {{10, 27}, {531, 393}} - RubberWindowFrame - 599 197 841 654 0 0 1440 878 + {{10, 27}, {531, 423}} Module XCDetailModule @@ -453,7 +450,9 @@ GeometryConfiguration Frame - {{10, 27}, {531, 365}} + {{10, 27}, {531, 423}} + RubberWindowFrame + 492 212 841 654 0 0 1440 878 Module PBXBuildResultsModule @@ -481,11 +480,11 @@ TableOfContents - 8BA0D9F723E3880200721922 + 8B7A75CF244500B600014B55 1CA23ED40692098700951B8B - 8BA0D9F823E3880200721922 + 8B7A75D0244500B600014B55 8BD7274A1D46E5A5000176F0 - 8BA0D9F923E3880200721922 + 8B7A75D1244500B600014B55 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -658,7 +657,7 @@ StatusbarIsVisible TimeStamp - 602114050.79568899 + 608501942.76587403 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -678,7 +677,7 @@ /Users/christopherjohnson/Desktop/Plugins/MacAU/Tape/Tape.xcodeproj WindowString - 599 197 841 654 0 0 1440 878 + 492 212 841 654 0 0 1440 878 WindowToolsV3 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 @@ _historyCapacity 0 bookmark - 8BA0D9C223E37DB300721922 + 8B7A75F32445042300014B55 history 8B043CDA23DCE7AD00DF857C 8B043D1923DCFF6200DF857C 8BA0D9C023E37DB300721922 - 8BA0D9C123E37DB300721922 + 8BA0D9C223E37DB300721922 SplitCount @@ -371,18 +371,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 102}} + {{0, 0}, {603, 86}} RubberWindowFrame 530 344 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 102pt + 86pt Proportion - 339pt + 355pt Tabs @@ -396,7 +396,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 312}} + {{10, 27}, {603, 328}} RubberWindowFrame 530 344 810 487 0 0 1440 878 @@ -480,11 +480,11 @@ TableOfContents - 8BA0D9C323E37DB300721922 + 8B7A75F42445042300014B55 1CA23ED40692098700951B8B - 8BA0D9C423E37DB300721922 + 8B7A75F52445042300014B55 8B0237581D42B1C400E1E8C8 - 8BA0D9C523E37DB300721922 + 8B7A75F62445042300014B55 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -637,7 +637,7 @@ StatusbarIsVisible TimeStamp - 602111411.395051 + 608502819.69231403 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -654,7 +654,6 @@ 5 WindowOrderList - 8BA0D9C623E37DB300721922 /Users/christopherjohnson/Desktop/Plugins/MacVST/Tape/Tape.xcodeproj WindowString 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) { diff --git a/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo b/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo index 98df0af..8add20f 100755 Binary files a/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo and b/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo 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) { -- cgit v1.2.3