diff options
author | Chris Johnson <jinx6568@sover.net> | 2020-04-19 20:15:15 -0400 |
---|---|---|
committer | Chris Johnson <jinx6568@sover.net> | 2020-04-19 20:15:15 -0400 |
commit | 32e2e4d41d8926b684329b508c576b640c547959 (patch) | |
tree | ba14e69ca092f60b2005a210667f7dfefe083f18 | |
parent | 6303bd453cc0defc93801713fe3100f0c857f389 (diff) | |
download | airwindows-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
-rwxr-xr-x | plugins/LinuxVST/src/Tape/Tape.cpp | 8 | ||||
-rwxr-xr-x | plugins/LinuxVST/src/Tape/Tape.h | 4 | ||||
-rwxr-xr-x | plugins/LinuxVST/src/Tape/TapeProc.cpp | 10 | ||||
-rwxr-xr-x | plugins/MacAU/Tape/Tape.cpp | 11 | ||||
-rwxr-xr-x | plugins/MacAU/Tape/Tape.h | 5 | ||||
-rwxr-xr-x | plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.pbxuser | 71 | ||||
-rwxr-xr-x | plugins/MacAU/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3 | 39 | ||||
-rwxr-xr-x | plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.pbxuser | 44 | ||||
-rwxr-xr-x | plugins/MacVST/Tape/Tape.xcodeproj/christopherjohnson.perspectivev3 | 21 | ||||
-rwxr-xr-x | plugins/MacVST/Tape/source/Tape.cpp | 8 | ||||
-rwxr-xr-x | plugins/MacVST/Tape/source/Tape.h | 4 | ||||
-rwxr-xr-x | plugins/MacVST/Tape/source/TapeProc.cpp | 10 | ||||
-rwxr-xr-x | plugins/WinVST/Tape/.vs/VSTProject/v14/.suo | bin | 22528 -> 22528 bytes | |||
-rwxr-xr-x | plugins/WinVST/Tape/Tape.cpp | 8 | ||||
-rwxr-xr-x | plugins/WinVST/Tape/Tape.h | 4 | ||||
-rwxr-xr-x | 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); @@ -103,6 +104,13 @@ ComponentResult Tape::GetParameterInfo(AudioUnitScope inScope, 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; break; @@ -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 @@ <key>Layout</key> <array> <dict> - <key>BecomeActive</key> - <true/> <key>ContentConfiguration</key> <dict> <key>PBXBottomSmartGroupGIDs</key> @@ -326,7 +324,7 @@ <real>288</real> </array> <key>RubberWindowFrame</key> - <string>599 197 841 654 0 0 1440 878 </string> + <string>492 212 841 654 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> @@ -342,7 +340,7 @@ <key>PBXProjectModuleGUID</key> <string>8BD7274A1D46E5A5000176F0</string> <key>PBXProjectModuleLabel</key> - <string>Tape.cpp</string> + <string>Tape.h</string> <key>PBXSplitModuleInNavigatorKey</key> <dict> <key>Split0</key> @@ -350,15 +348,16 @@ <key>PBXProjectModuleGUID</key> <string>8BD7274B1D46E5A5000176F0</string> <key>PBXProjectModuleLabel</key> - <string>Tape.cpp</string> + <string>Tape.h</string> <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>8BA0D9F623E3880200721922</string> + <string>8B7A75CE244500B600014B55</string> <key>history</key> <array> <string>8B043C9B23DA71E500DF857C</string> - <string>8BA0D9F523E3880200721922</string> + <string>8BE00CB7244181FC008A6BAB</string> + <string>8B7A75C92445009800014B55</string> </array> </dict> <key>SplitCount</key> @@ -372,18 +371,18 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{0, 0}, {531, 188}}</string> + <string>{{0, 0}, {531, 158}}</string> <key>RubberWindowFrame</key> - <string>599 197 841 654 0 0 1440 878 </string> + <string>492 212 841 654 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXNavigatorGroup</string> <key>Proportion</key> - <string>188pt</string> + <string>158pt</string> </dict> <dict> <key>Proportion</key> - <string>420pt</string> + <string>450pt</string> <key>Tabs</key> <array> <dict> @@ -397,9 +396,7 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {531, 393}}</string> - <key>RubberWindowFrame</key> - <string>599 197 841 654 0 0 1440 878 </string> + <string>{{10, 27}, {531, 423}}</string> </dict> <key>Module</key> <string>XCDetailModule</string> @@ -453,7 +450,9 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {531, 365}}</string> + <string>{{10, 27}, {531, 423}}</string> + <key>RubberWindowFrame</key> + <string>492 212 841 654 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXBuildResultsModule</string> @@ -481,11 +480,11 @@ </array> <key>TableOfContents</key> <array> - <string>8BA0D9F723E3880200721922</string> + <string>8B7A75CF244500B600014B55</string> <string>1CA23ED40692098700951B8B</string> - <string>8BA0D9F823E3880200721922</string> + <string>8B7A75D0244500B600014B55</string> <string>8BD7274A1D46E5A5000176F0</string> - <string>8BA0D9F923E3880200721922</string> + <string>8B7A75D1244500B600014B55</string> <string>1CA23EDF0692099D00951B8B</string> <string>1CA23EE00692099D00951B8B</string> <string>1CA23EE10692099D00951B8B</string> @@ -658,7 +657,7 @@ <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> - <real>602114050.79568899</real> + <real>608501942.76587403</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> @@ -678,7 +677,7 @@ <string>/Users/christopherjohnson/Desktop/Plugins/MacAU/Tape/Tape.xcodeproj</string> </array> <key>WindowString</key> - <string>599 197 841 654 0 0 1440 878 </string> + <string>492 212 841 654 0 0 1440 878 </string> <key>WindowToolsV3</key> <array> <dict> 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) { diff --git a/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo b/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo Binary files differindex 98df0af..8add20f 100755 --- a/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo +++ b/plugins/WinVST/Tape/.vs/VSTProject/v14/.suo 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) { |