aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacAU/TapeFat
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/TapeFat
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/TapeFat')
-rwxr-xr-xplugins/MacAU/TapeFat/TapeFat.cpp18
-rwxr-xr-xplugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.pbxuser80
-rwxr-xr-xplugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.perspectivev349
3 files changed, 68 insertions, 79 deletions
diff --git a/plugins/MacAU/TapeFat/TapeFat.cpp b/plugins/MacAU/TapeFat/TapeFat.cpp
index d95de3a..42e9d60 100755
--- a/plugins/MacAU/TapeFat/TapeFat.cpp
+++ b/plugins/MacAU/TapeFat/TapeFat.cpp
@@ -263,23 +263,15 @@ void TapeFat::TapeFatKernel::Process( const Float32 *inSourceP,
gcount--;
- //noise shaping to 32-bit floating point
- Float32 fpTemp = inputSample;
- fpNShape += (inputSample-fpTemp);
- inputSample += fpNShape;
- //for deeper space and warmth, we try a non-oscillating noise shaping
- //that is kind of ruthless: it will forever retain the rounding errors
- //except we'll dial it back a hair at the end of every buffer processed
- //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;
sourceP += inNumChannels; destP += inNumChannels;
}
- fpNShape *= 0.999999;
- //we will just delicately dial back the FP noise shaping, not even every sample
- //this is a good place to put subtle 'no runaway' calculations, though bear in mind
- //that it will be called more often when you use shorter sample buffers in the DAW.
- //So, very low latency operation will call these calculations more often.
}
diff --git a/plugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.pbxuser
index b5c4293..640ec56 100755
--- a/plugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.pbxuser
+++ b/plugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.pbxuser
@@ -10,7 +10,7 @@
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
- 292,
+ 398,
20,
48,
43,
@@ -49,24 +49,54 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 566516790;
- PBXWorkspaceStateSaveDate = 566516790;
+ PBXPerProjectTemplateStateSaveDate = 569684489;
+ PBXWorkspaceStateSaveDate = 569684489;
};
perUserProjectItems = {
+ 8B79316521F4B25B006E9731 /* PBXTextBookmark */ = 8B79316521F4B25B006E9731 /* PBXTextBookmark */;
+ 8B79316721F4B25B006E9731 /* PBXTextBookmark */ = 8B79316721F4B25B006E9731 /* PBXTextBookmark */;
+ 8B79316C21F4B278006E9731 /* PBXTextBookmark */ = 8B79316C21F4B278006E9731 /* PBXTextBookmark */;
8BBB319521B8A4BD00825986 /* PlistBookmark */ = 8BBB319521B8A4BD00825986 /* PlistBookmark */;
- 8BBB336921C45BB400825986 /* PBXTextBookmark */ = 8BBB336921C45BB400825986 /* PBXTextBookmark */;
- 8BBB339021C45C6E00825986 /* PBXTextBookmark */ = 8BBB339021C45C6E00825986 /* PBXTextBookmark */;
- 8BBB339121C45C6E00825986 /* PBXTextBookmark */ = 8BBB339121C45C6E00825986 /* PBXTextBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
};
};
+ 8B79316521F4B25B006E9731 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 8BC6025B073B072D006C4272 /* TapeFat.h */;
+ name = "TapeFat.h: 133";
+ rLen = 0;
+ rLoc = 5283;
+ rType = 0;
+ vrLen = 301;
+ vrLoc = 5036;
+ };
+ 8B79316721F4B25B006E9731 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 8BA05A660720730100365D66 /* TapeFat.cpp */;
+ name = "TapeFat.cpp: 276";
+ rLen = 0;
+ rLoc = 11440;
+ rType = 0;
+ vrLen = 1045;
+ vrLoc = 10398;
+ };
+ 8B79316C21F4B278006E9731 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 8BA05A660720730100365D66 /* TapeFat.cpp */;
+ name = "TapeFat.cpp: 276";
+ rLen = 0;
+ rLoc = 11440;
+ rType = 0;
+ vrLen = 1082;
+ vrLoc = 10361;
+ };
8BA05A660720730100365D66 /* TapeFat.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {817, 3900}}";
- sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{3, 648}";
+ sepNavIntBoundsRect = "{{0, 0}, {656, 3835}}";
+ sepNavSelRange = "{11440, 0}";
+ sepNavVisRange = "{10361, 1082}";
sepNavWindowFrame = "{{777, -19}, {1129, 834}}";
};
};
@@ -90,41 +120,11 @@
rLen = 0;
rLoc = 9223372036854775808;
};
- 8BBB336921C45BB400825986 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 8BA05A660720730100365D66 /* TapeFat.cpp */;
- name = "TapeFat.cpp: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 651;
- vrLoc = 0;
- };
- 8BBB339021C45C6E00825986 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 8BC6025B073B072D006C4272 /* TapeFat.h */;
- name = "TapeFat.h: 133";
- rLen = 0;
- rLoc = 5283;
- rType = 0;
- vrLen = 302;
- vrLoc = 5036;
- };
- 8BBB339121C45C6E00825986 /* PBXTextBookmark */ = {
- isa = PBXTextBookmark;
- fRef = 8BA05A660720730100365D66 /* TapeFat.cpp */;
- name = "TapeFat.cpp: 1";
- rLen = 0;
- rLoc = 0;
- rType = 0;
- vrLen = 648;
- vrLoc = 3;
- };
8BC6025B073B072D006C4272 /* TapeFat.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {894, 2015}}";
sepNavSelRange = "{5283, 0}";
- sepNavVisRange = "{5036, 302}";
+ sepNavVisRange = "{5036, 301}";
sepNavWindowFrame = "{{806, -59}, {1129, 834}}";
};
};
diff --git a/plugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.perspectivev3
index dfd80e8..343eaae 100755
--- a/plugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.perspectivev3
+++ b/plugins/MacAU/TapeFat/TapeFat.xcodeproj/christopherjohnson.perspectivev3
@@ -256,8 +256,6 @@
<key>Layout</key>
<array>
<dict>
- <key>BecomeActive</key>
- <true/>
<key>ContentConfiguration</key>
<dict>
<key>PBXBottomSmartGroupGIDs</key>
@@ -282,7 +280,7 @@
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
- <real>288</real>
+ <real>182</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
@@ -309,7 +307,7 @@
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 0}, {288, 595}}</string>
+ <string>{{0, 0}, {182, 595}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
@@ -319,19 +317,19 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {305, 613}}</string>
+ <string>{{0, 0}, {199, 613}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>MainColumn</string>
- <real>288</real>
+ <real>182</real>
</array>
<key>RubberWindowFrame</key>
- <string>599 89 841 654 0 0 1440 878 </string>
+ <string>440 183 841 654 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
- <string>305pt</string>
+ <string>199pt</string>
</dict>
<dict>
<key>Dock</key>
@@ -354,12 +352,12 @@
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>8BBB339121C45C6E00825986</string>
+ <string>8B79316C21F4B278006E9731</string>
<key>history</key>
<array>
<string>8BBB319521B8A4BD00825986</string>
- <string>8BBB339021C45C6E00825986</string>
- <string>8BBB336921C45BB400825986</string>
+ <string>8B79316521F4B25B006E9731</string>
+ <string>8B79316721F4B25B006E9731</string>
</array>
</dict>
<key>SplitCount</key>
@@ -373,18 +371,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {531, 216}}</string>
+ <string>{{0, 0}, {637, 512}}</string>
<key>RubberWindowFrame</key>
- <string>599 89 841 654 0 0 1440 878 </string>
+ <string>440 183 841 654 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>216pt</string>
+ <string>512pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>392pt</string>
+ <string>96pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -398,9 +396,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {531, 365}}</string>
- <key>RubberWindowFrame</key>
- <string>599 89 841 654 0 0 1440 878 </string>
+ <string>{{10, 27}, {637, 69}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -454,7 +450,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {531, 339}}</string>
+ <string>{{10, 27}, {637, 69}}</string>
+ <key>RubberWindowFrame</key>
+ <string>440 183 841 654 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -463,7 +461,7 @@
</dict>
</array>
<key>Proportion</key>
- <string>531pt</string>
+ <string>637pt</string>
</dict>
</array>
<key>Name</key>
@@ -482,11 +480,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>8BBB339221C45C6E00825986</string>
+ <string>8B79316D21F4B278006E9731</string>
<string>1CA23ED40692098700951B8B</string>
- <string>8BBB339321C45C6E00825986</string>
+ <string>8B79316E21F4B278006E9731</string>
<string>8BD7274A1D46E5A5000176F0</string>
- <string>8BBB339421C45C6E00825986</string>
+ <string>8B79316F21F4B278006E9731</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -659,7 +657,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>566516846.91763997</real>
+ <real>569684600.92815804</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -676,11 +674,10 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
- <string>8BBB339521C45C6E00825986</string>
<string>/Users/christopherjohnson/Desktop/MacAU/TapeFat/TapeFat.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>599 89 841 654 0 0 1440 878 </string>
+ <string>440 183 841 654 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>