aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacAU/FathomFive
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/FathomFive
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/FathomFive')
-rwxr-xr-xplugins/MacAU/FathomFive/FathomFive.cpp6
-rwxr-xr-xplugins/MacAU/FathomFive/FathomFive.h1
-rwxr-xr-xplugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.pbxuser32
-rwxr-xr-xplugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.perspectivev339
4 files changed, 41 insertions, 37 deletions
diff --git a/plugins/MacAU/FathomFive/FathomFive.cpp b/plugins/MacAU/FathomFive/FathomFive.cpp
index dd2bd98..b2746ae 100755
--- a/plugins/MacAU/FathomFive/FathomFive.cpp
+++ b/plugins/MacAU/FathomFive/FathomFive.cpp
@@ -188,6 +188,7 @@ void FathomFive::FathomFiveKernel::Reset()
iirSampleB = 0.0;
iirSampleC = 0.0;
iirSampleD = 0.0;
+ fpNShape = 0.0;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -274,6 +275,11 @@ void FathomFive::FathomFiveKernel::Process( const Float32 *inSourceP,
//to make it easier to understand for when these are open sourced.
//FathomFive is the original Airwindows deep bass booster algorithm:
//further ones work to rein in that DC offset issue.
+ //32 bit dither, made small and tidy.
+ int expon; frexpf((Float32)outputSample, &expon);
+ long double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62);
+ outputSample += (dither-fpNShape); fpNShape = dither;
+ //end 32 bit dither
sourceP += inNumChannels;
*destP = outputSample;
diff --git a/plugins/MacAU/FathomFive/FathomFive.h b/plugins/MacAU/FathomFive/FathomFive.h
index 8cc656c..4d0b2f1 100755
--- a/plugins/MacAU/FathomFive/FathomFive.h
+++ b/plugins/MacAU/FathomFive/FathomFive.h
@@ -140,6 +140,7 @@ public:
Float64 iirSampleB;
Float64 iirSampleC;
Float64 iirSampleD;
+ long double fpNShape;
};
};
diff --git a/plugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.pbxuser
index 8f8248b..7d4e84c 100755
--- a/plugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.pbxuser
+++ b/plugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.pbxuser
@@ -49,13 +49,13 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 528456153;
- PBXWorkspaceStateSaveDate = 528456153;
+ PBXPerProjectTemplateStateSaveDate = 569644406;
+ PBXWorkspaceStateSaveDate = 569644406;
};
perUserProjectItems = {
8B5E540B1D629899009FEF76 /* PBXTextBookmark */ = 8B5E540B1D629899009FEF76 /* PBXTextBookmark */;
- 8B9D64B81F7C86FC007AB60F /* PBXTextBookmark */ = 8B9D64B81F7C86FC007AB60F /* PBXTextBookmark */;
- 8B9D741B1F7F99FC007AB60F /* PBXTextBookmark */ = 8B9D741B1F7F99FC007AB60F /* PBXTextBookmark */;
+ 8B792C2821F416B3006E9731 /* PBXTextBookmark */ = 8B792C2821F416B3006E9731 /* PBXTextBookmark */;
+ 8B792C2D21F416C5006E9731 /* PBXTextBookmark */ = 8B792C2D21F416C5006E9731 /* PBXTextBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
@@ -71,32 +71,32 @@
vrLen = 177;
vrLoc = 3318;
};
- 8B9D64B81F7C86FC007AB60F /* PBXTextBookmark */ = {
+ 8B792C2821F416B3006E9731 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BC6025B073B072D006C4272 /* FathomFive.h */;
name = "FathomFive.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
- vrLen = 148;
- vrLoc = 4091;
+ vrLen = 0;
+ vrLoc = 0;
};
- 8B9D741B1F7F99FC007AB60F /* PBXTextBookmark */ = {
+ 8B792C2D21F416C5006E9731 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BC6025B073B072D006C4272 /* FathomFive.h */;
name = "FathomFive.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
- vrLen = 107;
- vrLoc = 4091;
+ vrLen = 0;
+ vrLoc = 0;
};
8BA05A660720730100365D66 /* FathomFive.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {964, 3926}}";
- sepNavSelRange = "{11859, 0}";
- sepNavVisRange = "{9798, 2175}";
- sepNavWindowFrame = "{{568, 49}, {872, 829}}";
+ sepNavIntBoundsRect = "{{0, 0}, {964, 3939}}";
+ sepNavSelRange = "{12693, 0}";
+ sepNavVisRange = "{10879, 1966}";
+ sepNavWindowFrame = "{{427, 49}, {872, 829}}";
};
};
8BA05A670720730100365D66 /* FathomFive.exp */ = {
@@ -116,9 +116,9 @@
};
8BC6025B073B072D006C4272 /* FathomFive.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {649, 1963}}";
+ sepNavIntBoundsRect = "{{0, 0}, {554, 1976}}";
sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{4091, 107}";
+ sepNavVisRange = "{0, 0}";
sepNavWindowFrame = "{{568, 49}, {872, 829}}";
};
};
diff --git a/plugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.perspectivev3
index 1b9c6b6..16aca64 100755
--- a/plugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.perspectivev3
+++ b/plugins/MacAU/FathomFive/FathomFive.xcodeproj/christopherjohnson.perspectivev3
@@ -225,8 +225,8 @@
<array/>
<key>PerspectiveWidths</key>
<array>
- <integer>-1</integer>
- <integer>-1</integer>
+ <integer>810</integer>
+ <integer>810</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>
@@ -325,7 +323,7 @@
<real>185</real>
</array>
<key>RubberWindowFrame</key>
- <string>506 355 810 487 0 0 1440 878 </string>
+ <string>457 343 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
@@ -353,11 +351,11 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>8B9D741B1F7F99FC007AB60F</string>
+ <string>8B792C2D21F416C5006E9731</string>
<key>history</key>
<array>
<string>8B5E540B1D629899009FEF76</string>
- <string>8B9D64B81F7C86FC007AB60F</string>
+ <string>8B792C2821F416B3006E9731</string>
</array>
</dict>
<key>SplitCount</key>
@@ -371,18 +369,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {603, 51}}</string>
+ <string>{{0, 0}, {603, 32}}</string>
<key>RubberWindowFrame</key>
- <string>506 355 810 487 0 0 1440 878 </string>
+ <string>457 343 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>51pt</string>
+ <string>32pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>390pt</string>
+ <string>409pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -396,9 +394,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {603, 363}}</string>
- <key>RubberWindowFrame</key>
- <string>506 355 810 487 0 0 1440 878 </string>
+ <string>{{10, 27}, {603, 382}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -452,7 +448,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {603, 345}}</string>
+ <string>{{10, 27}, {603, 382}}</string>
+ <key>RubberWindowFrame</key>
+ <string>457 343 810 487 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -480,11 +478,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>8B9D741C1F7F99FC007AB60F</string>
+ <string>8B792C2E21F416C5006E9731</string>
<string>1CA23ED40692098700951B8B</string>
- <string>8B9D741D1F7F99FC007AB60F</string>
+ <string>8B792C2F21F416C5006E9731</string>
<string>8B5E54091D629899009FEF76</string>
- <string>8B9D741E1F7F99FC007AB60F</string>
+ <string>8B792C3021F416C5006E9731</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -637,7 +635,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>528456188.63718599</real>
+ <real>569644741.719468</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -654,11 +652,10 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>8B9D741F1F7F99FC007AB60F</string>
<string>/Users/christopherjohnson/Desktop/MacAU/FathomFive/FathomFive.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>506 355 810 487 0 0 1440 878 </string>
+ <string>457 343 810 487 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>