aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/MacAU/SingleEndedTriode
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/SingleEndedTriode
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/SingleEndedTriode')
-rwxr-xr-xplugins/MacAU/SingleEndedTriode/SingleEndedTriode.cpp18
-rwxr-xr-xplugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser69
-rwxr-xr-xplugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev357
3 files changed, 76 insertions, 68 deletions
diff --git a/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.cpp b/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.cpp
index cf29888..9c0da62 100755
--- a/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.cpp
+++ b/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.cpp
@@ -268,23 +268,15 @@ void SingleEndedTriode::SingleEndedTriodeKernel::Process( const Float32 *inSou
inputSample = (drySample * dry)+(inputSample*wet);
}
- //noise shaping to 32-bit floating point
- float 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/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser b/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser
index bb8847c..aa2c283 100755
--- a/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser
+++ b/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.pbxuser
@@ -10,7 +10,7 @@
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
PBXFileTableDataSourceColumnWidthsKey = (
20,
- 333,
+ 414,
20,
48,
43,
@@ -49,47 +49,64 @@
PBXFileDataSource_Warnings_ColumnID,
);
};
- PBXPerProjectTemplateStateSaveDate = 547786625;
- PBXWorkspaceStateSaveDate = 547786625;
+ PBXPerProjectTemplateStateSaveDate = 569678966;
+ PBXWorkspaceStateSaveDate = 569678966;
};
perUserProjectItems = {
- 8B7E3E8820A6930E00482CB5 /* PBXTextBookmark */ = 8B7E3E8820A6930E00482CB5 /* PBXTextBookmark */;
- 8B7E3E8920A6930E00482CB5 /* PBXBookmark */ = 8B7E3E8920A6930E00482CB5 /* PBXBookmark */;
- 8B7E3E8A20A6930E00482CB5 /* PBXTextBookmark */ = 8B7E3E8A20A6930E00482CB5 /* PBXTextBookmark */;
+ 8B792FE521F49D2B006E9731 /* PBXTextBookmark */ = 8B792FE521F49D2B006E9731 /* PBXTextBookmark */;
+ 8B792FE621F49D2B006E9731 /* PBXTextBookmark */ = 8B792FE621F49D2B006E9731 /* PBXTextBookmark */;
+ 8B792FE821F49D2B006E9731 /* PBXTextBookmark */ = 8B792FE821F49D2B006E9731 /* PBXTextBookmark */;
+ 8B792FED21F49D42006E9731 /* PBXTextBookmark */ = 8B792FED21F49D42006E9731 /* PBXTextBookmark */;
};
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
userBuildSettings = {
};
};
- 8B7E3E8820A6930E00482CB5 /* PBXTextBookmark */ = {
+ 8B792FE521F49D2B006E9731 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 8BA05A690720730100365D66 /* SingleEndedTriodeVersion.h */;
+ name = "SingleEndedTriodeVersion.h: 1";
+ rLen = 0;
+ rLoc = 0;
+ rType = 0;
+ vrLen = 948;
+ vrLoc = 2603;
+ };
+ 8B792FE621F49D2B006E9731 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = 8BC6025B073B072D006C4272 /* SingleEndedTriode.h */;
name = "SingleEndedTriode.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
- vrLen = 72;
- vrLoc = 0;
+ vrLen = 719;
+ vrLoc = 4915;
};
- 8B7E3E8920A6930E00482CB5 /* PBXBookmark */ = {
- isa = PBXBookmark;
- fRef = 8BA05A690720730100365D66 /* SingleEndedTriodeVersion.h */;
+ 8B792FE821F49D2B006E9731 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 8BA05A660720730100365D66 /* SingleEndedTriode.cpp */;
+ name = "SingleEndedTriode.cpp: 276";
+ rLen = 0;
+ rLoc = 12119;
+ rType = 0;
+ vrLen = 762;
+ vrLoc = 11445;
};
- 8B7E3E8A20A6930E00482CB5 /* PBXTextBookmark */ = {
+ 8B792FED21F49D42006E9731 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
- fRef = 8BA05A690720730100365D66 /* SingleEndedTriodeVersion.h */;
- name = "SingleEndedTriodeVersion.h: 1";
+ fRef = 8BA05A660720730100365D66 /* SingleEndedTriode.cpp */;
+ name = "SingleEndedTriode.cpp: 276";
rLen = 0;
- rLoc = 0;
+ rLoc = 12119;
rType = 0;
- vrLen = 246;
- vrLoc = 3244;
+ vrLen = 820;
+ vrLoc = 11387;
};
8BA05A660720730100365D66 /* SingleEndedTriode.cpp */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {1098, 3783}}";
- sepNavSelRange = "{10732, 1057}";
- sepNavVisRange = "{10814, 1886}";
+ sepNavIntBoundsRect = "{{0, 0}, {838, 3900}}";
+ sepNavSelRange = "{12119, 0}";
+ sepNavVisRange = "{11387, 820}";
sepNavWindowFrame = "{{676, 66}, {1145, 812}}";
};
};
@@ -103,16 +120,16 @@
};
8BA05A690720730100365D66 /* SingleEndedTriodeVersion.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {824, 871}}";
+ sepNavIntBoundsRect = "{{0, 0}, {824, 897}}";
sepNavSelRange = "{0, 0}";
- sepNavVisRange = "{3244, 246}";
+ sepNavVisRange = "{2603, 948}";
};
};
8BC6025B073B072D006C4272 /* SingleEndedTriode.h */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {960, 1885}}";
- sepNavSelRange = "{5481, 20}";
- sepNavVisRange = "{4010, 1624}";
+ sepNavIntBoundsRect = "{{0, 0}, {824, 1885}}";
+ sepNavSelRange = "{0, 0}";
+ sepNavVisRange = "{4915, 719}";
sepNavWindowFrame = "{{676, 59}, {1007, 819}}";
};
};
diff --git a/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev3
index e1ec1b0..a047d72 100755
--- a/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev3
+++ b/plugins/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj/christopherjohnson.perspectivev3
@@ -225,8 +225,8 @@
<array/>
<key>PerspectiveWidths</key>
<array>
- <integer>810</integer>
- <integer>810</integer>
+ <integer>867</integer>
+ <integer>867</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>
@@ -282,7 +280,7 @@
<dict>
<key>PBXSmartGroupTreeModuleColumnWidthsKey</key>
<array>
- <real>216</real>
+ <real>192</real>
</array>
<key>PBXSmartGroupTreeModuleColumnsKey_v4</key>
<array>
@@ -307,7 +305,7 @@
</array>
</array>
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
- <string>{{0, 0}, {216, 428}}</string>
+ <string>{{0, 0}, {192, 549}}</string>
</dict>
<key>PBXTopSmartGroupGIDs</key>
<array/>
@@ -317,19 +315,19 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {233, 446}}</string>
+ <string>{{0, 0}, {209, 567}}</string>
<key>GroupTreeTableConfiguration</key>
<array>
<string>MainColumn</string>
- <real>216</real>
+ <real>192</real>
</array>
<key>RubberWindowFrame</key>
- <string>588 264 810 487 0 0 1440 878 </string>
+ <string>430 203 867 608 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXSmartGroupTreeModule</string>
<key>Proportion</key>
- <string>233pt</string>
+ <string>209pt</string>
</dict>
<dict>
<key>Dock</key>
@@ -340,7 +338,7 @@
<key>PBXProjectModuleGUID</key>
<string>8BBDB967208BF902006F0D04</string>
<key>PBXProjectModuleLabel</key>
- <string>SingleEndedTriodeVersion.h</string>
+ <string>SingleEndedTriode.cpp</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
@@ -348,15 +346,16 @@
<key>PBXProjectModuleGUID</key>
<string>8BBDB968208BF902006F0D04</string>
<key>PBXProjectModuleLabel</key>
- <string>SingleEndedTriodeVersion.h</string>
+ <string>SingleEndedTriode.cpp</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
- <string>8B7E3E8A20A6930E00482CB5</string>
+ <string>8B792FED21F49D42006E9731</string>
<key>history</key>
<array>
- <string>8B7E3E8820A6930E00482CB5</string>
- <string>8B7E3E8920A6930E00482CB5</string>
+ <string>8B792FE521F49D2B006E9731</string>
+ <string>8B792FE621F49D2B006E9731</string>
+ <string>8B792FE821F49D2B006E9731</string>
</array>
</dict>
<key>SplitCount</key>
@@ -370,18 +369,18 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{0, 0}, {572, 102}}</string>
+ <string>{{0, 0}, {653, 410}}</string>
<key>RubberWindowFrame</key>
- <string>588 264 810 487 0 0 1440 878 </string>
+ <string>430 203 867 608 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXNavigatorGroup</string>
<key>Proportion</key>
- <string>102pt</string>
+ <string>410pt</string>
</dict>
<dict>
<key>Proportion</key>
- <string>339pt</string>
+ <string>152pt</string>
<key>Tabs</key>
<array>
<dict>
@@ -395,9 +394,7 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {572, 312}}</string>
- <key>RubberWindowFrame</key>
- <string>588 264 810 487 0 0 1440 878 </string>
+ <string>{{10, 27}, {653, 125}}</string>
</dict>
<key>Module</key>
<string>XCDetailModule</string>
@@ -451,7 +448,9 @@
<key>GeometryConfiguration</key>
<dict>
<key>Frame</key>
- <string>{{10, 27}, {572, 282}}</string>
+ <string>{{10, 27}, {653, 125}}</string>
+ <key>RubberWindowFrame</key>
+ <string>430 203 867 608 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXBuildResultsModule</string>
@@ -460,7 +459,7 @@
</dict>
</array>
<key>Proportion</key>
- <string>572pt</string>
+ <string>653pt</string>
</dict>
</array>
<key>Name</key>
@@ -479,11 +478,11 @@
</array>
<key>TableOfContents</key>
<array>
- <string>8B7E3E8B20A6930E00482CB5</string>
+ <string>8B792FEE21F49D42006E9731</string>
<string>1CA23ED40692098700951B8B</string>
- <string>8B7E3E8C20A6930E00482CB5</string>
+ <string>8B792FEF21F49D42006E9731</string>
<string>8BBDB967208BF902006F0D04</string>
- <string>8B7E3E8D20A6930E00482CB5</string>
+ <string>8B792FF021F49D42006E9731</string>
<string>1CA23EDF0692099D00951B8B</string>
<string>1CA23EE00692099D00951B8B</string>
<string>1CA23EE10692099D00951B8B</string>
@@ -636,7 +635,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>547787534.19024003</real>
+ <real>569679170.50335598</real>
<key>ToolbarConfigUserDefaultsMinorVersion</key>
<string>2</string>
<key>ToolbarDisplayMode</key>
@@ -656,7 +655,7 @@
<string>/Users/christopherjohnson/Desktop/MacAU/SingleEndedTriode/SingleEndedTriode.xcodeproj</string>
</array>
<key>WindowString</key>
- <string>588 264 810 487 0 0 1440 878 </string>
+ <string>430 203 867 608 0 0 1440 878 </string>
<key>WindowToolsV3</key>
<array>
<dict>