ClearCoat adjustment

This commit is contained in:
Christopher Johnson 2023-11-06 15:27:24 -05:00
parent 743c48d6c6
commit eda72427e8
29 changed files with 1269 additions and 757 deletions

View file

@ -282,6 +282,8 @@ ComponentResult ClearCoat::Reset(AudioUnitScope inScope, AudioUnitElement inEle
shortP = 2366;
prevclearcoat = -1;
subAL = subAR = subBL = subBR = subCL = subCR = subDL = subDR = 0.0;
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
return noErr;
@ -419,6 +421,7 @@ OSStatus ClearCoat::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla
prevclearcoat = clearcoat;
}
double subRate = 0.001 / overallscale;
double wet = GetParameter( kParam_Two )*2.0;
double dry = 2.0 - wet;
if (wet > 1.0) wet = 1.0;
@ -628,6 +631,42 @@ OSStatus ClearCoat::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFla
//we are going through our references now
}
//begin SubTight section
double subSampleL = inputSampleL * subRate;
double subSampleR = inputSampleR * subRate;
double scale = 0.5+fabs(subSampleL*0.5);
subSampleL = (subAL+(sin(subAL-subSampleL)*scale));
subAL = subSampleL*scale;
scale = 0.5+fabs(subSampleR*0.5);
subSampleR = (subAR+(sin(subAR-subSampleR)*scale));
subAR = subSampleR*scale;
scale = 0.5+fabs(subSampleL*0.5);
subSampleL = (subBL+(sin(subBL-subSampleL)*scale));
subBL = subSampleL*scale;
scale = 0.5+fabs(subSampleR*0.5);
subSampleR = (subBR+(sin(subBR-subSampleR)*scale));
subBR = subSampleR*scale;
scale = 0.5+fabs(subSampleL*0.5);
subSampleL = (subCL+(sin(subCL-subSampleL)*scale));
subCL = subSampleL*scale;
scale = 0.5+fabs(subSampleR*0.5);
subSampleR = (subCR+(sin(subCR-subSampleR)*scale));
subCR = subSampleR*scale;
scale = 0.5+fabs(subSampleL*0.5);
subSampleL = (subDL+(sin(subDL-subSampleL)*scale));
subDL = subSampleL*scale;
scale = 0.5+fabs(subSampleR*0.5);
subSampleR = (subDR+(sin(subDR-subSampleR)*scale));
subDR = subSampleR*scale;
if (subSampleL > 0.25) subSampleL = 0.25;
if (subSampleL < -0.25) subSampleL = -0.25;
if (subSampleR > 0.25) subSampleR = 0.25;
if (subSampleR < -0.25) subSampleR = -0.25;
inputSampleL -= (subSampleL*16.0);
inputSampleR -= (subSampleR*16.0);
//end SubTight section
if (cycleEnd > 1) {
double outSample = (inputSampleL + tailL)*0.5;
tailL = inputSampleL; inputSampleL = outSample;

View file

@ -251,6 +251,15 @@ public:
int prevclearcoat;
double subAL;
double subAR;
double subBL;
double subBR;
double subCL;
double subCR;
double subDL;
double subDR;
uint32_t fpdL;
uint32_t fpdR;
};

View file

@ -49,14 +49,14 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
PBXPerProjectTemplateStateSaveDate = 719864074;
PBXWorkspaceStateSaveDate = 719864074;
PBXPerProjectTemplateStateSaveDate = 720986511;
PBXWorkspaceStateSaveDate = 720986511;
};
perUserProjectItems = {
8B1FFB7B2AE848C4004C416B /* PBXTextBookmark */ = 8B1FFB7B2AE848C4004C416B /* PBXTextBookmark */;
8B1FFB7C2AE848C4004C416B /* PBXTextBookmark */ = 8B1FFB7C2AE848C4004C416B /* PBXTextBookmark */;
8B1FFB7D2AE848C4004C416B /* PBXBookmark */ = 8B1FFB7D2AE848C4004C416B /* PBXBookmark */;
8B1FFB7E2AE848C4004C416B /* PBXTextBookmark */ = 8B1FFB7E2AE848C4004C416B /* PBXTextBookmark */;
8B2448B22AF95CC000F56D14 /* PBXTextBookmark */ = 8B2448B22AF95CC000F56D14 /* PBXTextBookmark */;
8B24490A2AF9620A00F56D14 /* PBXTextBookmark */ = 8B24490A2AF9620A00F56D14 /* PBXTextBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
@ -77,38 +77,44 @@
fRef = 8BA05A660720730100365D66 /* ClearCoat.cpp */;
name = "ClearCoat.cpp: 633";
rLen = 270;
rLoc = 29022;
rLoc = 30491;
rType = 0;
vrLen = 217;
vrLoc = 29026;
};
8B1FFB7D2AE848C4004C416B /* PBXBookmark */ = {
isa = PBXBookmark;
fRef = 8BA05A690720730100365D66 /* ClearCoatVersion.h */;
};
8B1FFB7E2AE848C4004C416B /* PBXTextBookmark */ = {
8B2448B22AF95CC000F56D14 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BA05A690720730100365D66 /* ClearCoatVersion.h */;
name = "ClearCoatVersion.h: 54";
rLen = 0;
rLoc = 2907;
rType = 0;
vrLen = 181;
vrLen = 180;
vrLoc = 2781;
};
8B24490A2AF9620A00F56D14 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BA05A690720730100365D66 /* ClearCoatVersion.h */;
name = "ClearCoatVersion.h: 54";
rLen = 0;
rLoc = 2907;
rType = 0;
vrLen = 128;
vrLoc = 2833;
};
8BA05A660720730100365D66 /* ClearCoat.cpp */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {2748, 12150}}";
sepNavSelRange = "{20031, 9580}";
sepNavVisRange = "{28900, 1352}";
sepNavWindowFrame = "{{659, 40}, {771, 838}}";
sepNavIntBoundsRect = "{{0, 0}, {2748, 11916}}";
sepNavSelRange = "{19391, 40}";
sepNavVisRange = "{16783, 3054}";
sepNavWindowFrame = "{{51, 40}, {771, 838}}";
};
};
8BA05A690720730100365D66 /* ClearCoatVersion.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1056, 1152}}";
sepNavIntBoundsRect = "{{0, 0}, {696, 1314}}";
sepNavSelRange = "{2907, 0}";
sepNavVisRange = "{2781, 181}";
sepNavVisRange = "{2833, 128}";
sepNavWindowFrame = "{{15, 38}, {896, 840}}";
};
};
@ -121,10 +127,10 @@
};
8BC6025B073B072D006C4272 /* ClearCoat.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1056, 3834}}";
sepNavSelRange = "{3285, 0}";
sepNavVisRange = "{2146, 1005}";
sepNavWindowFrame = "{{641, 119}, {1060, 701}}";
sepNavIntBoundsRect = "{{0, 0}, {1013, 5832}}";
sepNavSelRange = "{7432, 0}";
sepNavVisRange = "{7132, 441}";
sepNavWindowFrame = "{{380, 119}, {1060, 701}}";
};
};
8BD3CCB8148830B20062E48C /* Source Control */ = {

View file

@ -324,7 +324,7 @@
<real>185</real>
</array>
<key>RubberWindowFrame</key>
<string>609 346 810 487 0 0 1440 878 </string>
<string>37 335 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@ -352,12 +352,12 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>8B1FFB7E2AE848C4004C416B</string>
<string>8B24490A2AF9620A00F56D14</string>
<key>history</key>
<array>
<string>8B1FFB7B2AE848C4004C416B</string>
<string>8B1FFB7C2AE848C4004C416B</string>
<string>8B1FFB7D2AE848C4004C416B</string>
<string>8B2448B22AF95CC000F56D14</string>
</array>
</dict>
<key>SplitCount</key>
@ -371,18 +371,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{0, 0}, {603, 117}}</string>
<string>{{0, 0}, {603, 86}}</string>
<key>RubberWindowFrame</key>
<string>609 346 810 487 0 0 1440 878 </string>
<string>37 335 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
<string>117pt</string>
<string>86pt</string>
</dict>
<dict>
<key>Proportion</key>
<string>324pt</string>
<string>355pt</string>
<key>Tabs</key>
<array>
<dict>
@ -396,9 +396,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {603, 297}}</string>
<string>{{10, 27}, {603, 328}}</string>
<key>RubberWindowFrame</key>
<string>609 346 810 487 0 0 1440 878 </string>
<string>37 335 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@ -452,7 +452,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
<string>{{10, 27}, {603, 414}}</string>
<string>{{10, 27}, {603, 312}}</string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@ -480,11 +480,11 @@
</array>
<key>TableOfContents</key>
<array>
<string>8B1FFB7F2AE848C4004C416B</string>
<string>8B24490B2AF9620A00F56D14</string>
<string>1CA23ED40692098700951B8B</string>
<string>8B1FFB802AE848C4004C416B</string>
<string>8B24490C2AF9620A00F56D14</string>
<string>8B80DD832AE71ACE0036BE63</string>
<string>8B1FFB812AE848C4004C416B</string>
<string>8B24490D2AF9620A00F56D14</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@ -637,7 +637,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
<real>719866052.44707799</real>
<real>720986634.347139</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@ -654,11 +654,11 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>8B1FFB822AE848C4004C416B</string>
<string>8B24490E2AF9620A00F56D14</string>
<string>/Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ClearCoat/ClearCoat.xcodeproj</string>
</array>
<key>WindowString</key>
<string>609 346 810 487 0 0 1440 878 </string>
<string>37 335 810 487 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>