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/MacAU/Tape/Tape.cpp | 11 +++- plugins/MacAU/Tape/Tape.h | 5 +- .../Tape/Tape.xcodeproj/christopherjohnson.pbxuser | 71 +++++++++++++--------- .../christopherjohnson.perspectivev3 | 39 ++++++------ 4 files changed, 74 insertions(+), 52 deletions(-) (limited to 'plugins/MacAU') 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 -- cgit v1.2.3