aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacAU/IronOxideClassic
diff options
context:
space:
mode:
authorChris Johnson <jinx6568@sover.net>2019-01-27 21:13:54 -0500
committerChris Johnson <jinx6568@sover.net>2019-01-27 21:13:54 -0500
commit966f2d253cd2ee6ce140ad68095a20a9d2b63052 (patch)
treeb0400d95bd06512531ade6ddf55190a58b6a5623 /plugins/MacAU/IronOxideClassic
parent0887543349dbbec0721a1fc8b1c7deba9afefa8b (diff)
downloadairwindows-lv2-port-966f2d253cd2ee6ce140ad68095a20a9d2b63052.tar.gz
airwindows-lv2-port-966f2d253cd2ee6ce140ad68095a20a9d2b63052.tar.bz2
airwindows-lv2-port-966f2d253cd2ee6ce140ad68095a20a9d2b63052.zip
Floating Point Dither For All
Diffstat (limited to 'plugins/MacAU/IronOxideClassic')
-rwxr-xr-xplugins/MacAU/IronOxideClassic/IronOxideClassic.cpp27
-rwxr-xr-xplugins/MacAU/IronOxideClassic/IronOxideClassic.h3
-rwxr-xr-xplugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.pbxuser40
-rwxr-xr-xplugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.perspectivev335
4 files changed, 44 insertions, 61 deletions
diff --git a/plugins/MacAU/IronOxideClassic/IronOxideClassic.cpp b/plugins/MacAU/IronOxideClassic/IronOxideClassic.cpp
index 54c5821..4bd736f 100755
--- a/plugins/MacAU/IronOxideClassic/IronOxideClassic.cpp
+++ b/plugins/MacAU/IronOxideClassic/IronOxideClassic.cpp
@@ -180,8 +180,7 @@ void IronOxideClassic::IronOxideClassicKernel::Reset()
gcount = 0;
fastIIRA = fastIIRB = slowIIRA = slowIIRB = 0.0;
iirSampleA = iirSampleB = 0.0;
- fpNShapeA = 0.0;
- fpNShapeB = 0.0;
+ fpNShape = 0.0;
fpFlip = true;
}
@@ -223,11 +222,6 @@ void IronOxideClassic::IronOxideClassicKernel::Process( const Float32 *inSourc
fastTaper = 1.0 + (fastTaper / overallscale);
slowTaper = 1.0 + (slowTaper / overallscale);
}
-
- Float32 fpTemp;
- Float64 fpOld = 0.618033988749894848204586; //golden ratio!
- Float64 fpNew = 1.0 - fpOld;
-
while (nSampleFrames-- > 0) {
inputSample = *sourceP;
@@ -385,20 +379,13 @@ void IronOxideClassic::IronOxideClassicKernel::Process( const Float32 *inSourc
//second stage of overdrive to prevent overs and allow bloody loud extremeness
if (outputgain != 1.0) inputSample *= outputgain;
+ fpFlip = !fpFlip;
- //noise shaping to 32-bit floating point
- if (fpFlip) {
- fpTemp = inputSample;
- fpNShapeA = (fpNShapeA*fpOld)+((inputSample-fpTemp)*fpNew);
- inputSample += fpNShapeA;
- }
- else {
- fpTemp = inputSample;
- fpNShapeB = (fpNShapeB*fpOld)+((inputSample-fpTemp)*fpNew);
- inputSample += fpNShapeB;
- }
- fpFlip = not fpFlip;
- //end noise shaping on 32 bit output
+ //32 bit dither, made small and tidy.
+ int expon; frexpf((Float32)inputSample, &expon);
+ long double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62);
+ inputSample += (dither-fpNShape); fpNShape = dither;
+ //end 32 bit dither
*destP = inputSample;
diff --git a/plugins/MacAU/IronOxideClassic/IronOxideClassic.h b/plugins/MacAU/IronOxideClassic/IronOxideClassic.h
index 283ae2b..4dfe41b 100755
--- a/plugins/MacAU/IronOxideClassic/IronOxideClassic.h
+++ b/plugins/MacAU/IronOxideClassic/IronOxideClassic.h
@@ -142,8 +142,7 @@ public:
Float64 slowIIRB;
SInt32 gcount;
- long double fpNShapeA;
- long double fpNShapeB;
+ long double fpNShape;
bool fpFlip;
};
};
diff --git a/plugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.pbxuser
index 4f2e20c..46ceb7d 100755
--- a/plugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.pbxuser
+++ b/plugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.pbxuser
@@ -49,44 +49,44 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 528456653;
- PBXWorkspaceStateSaveDate = 528456653;
+ PBXPerProjectTemplateStateSaveDate = 569649756;
+ PBXWorkspaceStateSaveDate = 569649756;
};
perUserProjectItems = {
- 8B9D65651F7C8A00007AB60F /* PBXTextBookmark */ = 8B9D65651F7C8A00007AB60F /* PBXTextBookmark */;
- 8B9D74B41F7F9BE8007AB60F /* PBXTextBookmark */ = 8B9D74B41F7F9BE8007AB60F /* PBXTextBookmark */;
+ 8B792DA221F42AC7006E9731 /* PBXTextBookmark */ = 8B792DA221F42AC7006E9731 /* PBXTextBookmark */;
+ 8B792DA721F42AD9006E9731 /* PBXTextBookmark */ = 8B792DA721F42AD9006E9731 /* PBXTextBookmark */;
8BCB78421ED90EBD001D6861 /* PlistBookmark */ = 8BCB78421ED90EBD001D6861 /* PlistBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
};
};
- 8B9D65651F7C8A00007AB60F /* PBXTextBookmark */ = {
+ 8B792DA221F42AC7006E9731 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BA05A660720730100365D66 /* IronOxideClassic.cpp */;
- name = "IronOxideClassic.cpp: 271";
+ name = "IronOxideClassic.cpp: 265";
rLen = 50;
- rLoc = 11952;
+ rLoc = 11820;
rType = 0;
- vrLen = 342;
- vrLoc = 13099;
+ vrLen = 250;
+ vrLoc = 13063;
};
- 8B9D74B41F7F9BE8007AB60F /* PBXTextBookmark */ = {
+ 8B792DA721F42AD9006E9731 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BA05A660720730100365D66 /* IronOxideClassic.cpp */;
- name = "IronOxideClassic.cpp: 271";
+ name = "IronOxideClassic.cpp: 265";
rLen = 50;
- rLoc = 11952;
+ rLoc = 11820;
rType = 0;
- vrLen = 263;
- vrLoc = 13099;
+ vrLen = 250;
+ vrLoc = 13063;
};
8BA05A660720730100365D66 /* IronOxideClassic.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {482, 5538}}";
- sepNavSelRange = "{11952, 50}";
- sepNavVisRange = "{13099, 263}";
- sepNavWindowFrame = "{{408, 39}, {952, 839}}";
+ sepNavIntBoundsRect = "{{0, 0}, {482, 5421}}";
+ sepNavSelRange = "{11820, 50}";
+ sepNavVisRange = "{13063, 250}";
+ sepNavWindowFrame = "{{215, 32}, {952, 839}}";
};
};
8BA05A690720730100365D66 /* IronOxideClassicVersion.h */ = {
@@ -100,8 +100,8 @@
8BC6025B073B072D006C4272 /* IronOxideClassic.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {905, 2002}}";
- sepNavSelRange = "{5476, 159}";
- sepNavVisRange = "{955, 2468}";
+ sepNavSelRange = "{5661, 0}";
+ sepNavVisRange = "{4268, 1518}";
sepNavWindowFrame = "{{5, 39}, {952, 839}}";
};
};
diff --git a/plugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.perspectivev3
index 11ad553..4aa0a49 100755
--- a/plugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.perspectivev3
+++ b/plugins/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj/christopherjohnson.perspectivev3
@@ -225,8 +225,8 @@
<array/>
<key>PerspectiveWidths</key>
<array>
- <integer>810</integer>
- <integer>810</integer>
+ <integer>841</integer>
+ <integer>841</integer>
</array>
<key>Perspectives</key>
<array>
@@ -256,8 +256,6 @@
<key>Layout</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
@@ -301,7 +299,7 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
- <integer>4</integer>
+ <integer>3</integer>
<integer>2</integer>
<integer>1</integer>
<integer>0</integer>
@@ -353,11 +351,11 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>8B9D74B41F7F9BE8007AB60F</string>
+ <string>8B792DA721F42AD9006E9731</string>
<key>history</key>
<array>
<string>8BCB78421ED90EBD001D6861</string>
- <string>8B9D65651F7C8A00007AB60F</string>
+ <string>8B792DA221F42AC7006E9731</string>
</array>
</dict>
<key>SplitCount</key>
@@ -371,18 +369,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {531, 188}}</string>
+ <string>{{0, 0}, {531, 173}}</string>
<key>RubberWindowFrame</key>
<string>396 187 841 654 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>188pt</string>
+ <string>173pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>420pt</string>
+ <string>435pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -396,9 +394,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {531, 393}}</string>
- <key>RubberWindowFrame</key>
- <string>396 187 841 654 0 0 1440 878 </string>
+ <string>{{10, 27}, {531, 408}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -452,7 +448,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 31}, {603, 297}}</string>
+ <string>{{10, 27}, {531, 408}}</string>
+ <key>RubberWindowFrame</key>
+ <string>396 187 841 654 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -480,11 +478,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>8B9D74B51F7F9BE8007AB60F</string>
+ <string>8B792DA821F42AD9006E9731</string>
<string>1CA23ED40692098700951B8B</string>
- <string>8B9D74B61F7F9BE8007AB60F</string>
+ <string>8B792DA921F42AD9006E9731</string>
<string>8BD7274A1D46E5A5000176F0</string>
- <string>8B9D74B71F7F9BE8007AB60F</string>
+ <string>8B792DAA21F42AD9006E9731</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -657,7 +655,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>528456680.36902398</real>
+ <real>569649881.95772898</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -674,7 +672,6 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>8B9D74B81F7F9BE8007AB60F</string>
<string>/Users/christopherjohnson/Desktop/MacAU/IronOxideClassic/IronOxideClassic.xcodeproj</string>
</array>
<key>WindowString</key>