diff options
Diffstat (limited to 'plugins/MacVST/Gatelope')
3 files changed, 40 insertions, 58 deletions
diff --git a/plugins/MacVST/Gatelope/Gatelope.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Gatelope/Gatelope.xcodeproj/christopherjohnson.pbxuser index b9cbf51..bc12e1c 100755 --- a/plugins/MacVST/Gatelope/Gatelope.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/Gatelope/Gatelope.xcodeproj/christopherjohnson.pbxuser @@ -49,12 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 565578826; - PBXWorkspaceStateSaveDate = 565578826; + PBXPerProjectTemplateStateSaveDate = 569735474; + PBXWorkspaceStateSaveDate = 569735474; }; perUserProjectItems = { 8B416DA521B60DFE00DD5013 /* PBXTextBookmark */ = 8B416DA521B60DFE00DD5013 /* PBXTextBookmark */; - 8BDA3BB721B3655A00CC56FA /* PBXTextBookmark */ = 8BDA3BB721B3655A00CC56FA /* PBXTextBookmark */; + 8B793AC221F57942006E9731 /* PBXTextBookmark */ = 8B793AC221F57942006E9731 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -78,9 +78,9 @@ }; 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {838, 19838}}"; + sepNavIntBoundsRect = "{{0, 0}, {747, 19864}}"; sepNavSelRange = "{10616, 0}"; - sepNavVisRange = "{10613, 123}"; + sepNavVisRange = "{0, 0}"; sepNavWindowFrame = "{{15, 42}, {895, 831}}"; }; }; @@ -116,15 +116,15 @@ vrLen = 123; vrLoc = 10613; }; - 8BDA3BB721B3655A00CC56FA /* PBXTextBookmark */ = { + 8B793AC221F57942006E9731 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24A2FFDB0F90D1DD003BB5A7 /* audioeffectx.cpp */; name = "audioeffectx.cpp: 307"; rLen = 0; rLoc = 10616; rType = 0; - vrLen = 123; - vrLoc = 10613; + vrLen = 0; + vrLoc = 0; }; 8D01CCC60486CAD60068D4B7 /* Gatelope */ = { activeExec = 0; diff --git a/plugins/MacVST/Gatelope/Gatelope.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Gatelope/Gatelope.xcodeproj/christopherjohnson.perspectivev3 index f01e0a3..f643443 100755 --- a/plugins/MacVST/Gatelope/Gatelope.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/Gatelope/Gatelope.xcodeproj/christopherjohnson.perspectivev3 @@ -323,7 +323,7 @@ <real>185</real> </array> <key>RubberWindowFrame</key> - <string>17 371 810 487 0 0 1440 878 </string> + <string>460 296 810 487 0 0 1440 878 </string> </dict> <key>Module</key> <string>PBXSmartGroupTreeModule</string> @@ -351,10 +351,10 @@ <key>_historyCapacity</key> <integer>0</integer> <key>bookmark</key> - <string>8B416DA521B60DFE00DD5013</string> + <string>8B793AC221F57942006E9731</string> <key>history</key> <array> - <string>8BDA3BB721B3655A00CC56FA</string> + <string>8B416DA521B60DFE00DD5013</string> </array> </dict> <key>SplitCount</key> @@ -368,18 +368,18 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{0, 0}, {603, 51}}</string> + <string>{{0, 0}, {603, 32}}</string> <key>RubberWindowFrame</key> - <string>17 371 810 487 0 0 1440 878 </string> + <string>460 296 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> @@ -393,9 +393,9 @@ <key>GeometryConfiguration</key> <dict> <key>Frame</key> - <string>{{10, 27}, {603, 363}}</string> + <string>{{10, 27}, {603, 382}}</string> <key>RubberWindowFrame</key> - <string>17 371 810 487 0 0 1440 878 </string> + <string>460 296 810 487 0 0 1440 878 </string> </dict> <key>Module</key> <string>XCDetailModule</string> @@ -477,11 +477,11 @@ </array> <key>TableOfContents</key> <array> - <string>8B416DA621B60DFE00DD5013</string> + <string>8B793AC321F57942006E9731</string> <string>1CA23ED40692098700951B8B</string> - <string>8B416DA721B60DFE00DD5013</string> + <string>8B793AC421F57942006E9731</string> <string>8B0237581D42B1C400E1E8C8</string> - <string>8B416DA821B60DFE00DD5013</string> + <string>8B793AC521F57942006E9731</string> <string>1CA23EDF0692099D00951B8B</string> <string>1CA23EE00692099D00951B8B</string> <string>1CA23EE10692099D00951B8B</string> @@ -634,7 +634,7 @@ <key>StatusbarIsVisible</key> <true/> <key>TimeStamp</key> - <real>565579262.52925205</real> + <real>569735490.74607503</real> <key>ToolbarConfigUserDefaultsMinorVersion</key> <string>2</string> <key>ToolbarDisplayMode</key> @@ -654,7 +654,7 @@ <string>/Users/christopherjohnson/Desktop/MacVST/Gatelope/Gatelope.xcodeproj</string> </array> <key>WindowString</key> - <string>17 371 810 487 0 0 1440 878 </string> + <string>460 296 810 487 0 0 1440 878 </string> <key>WindowToolsV3</key> <array> <dict> diff --git a/plugins/MacVST/Gatelope/source/GatelopeProc.cpp b/plugins/MacVST/Gatelope/source/GatelopeProc.cpp index b32bddb..f429042 100755 --- a/plugins/MacVST/Gatelope/source/GatelopeProc.cpp +++ b/plugins/MacVST/Gatelope/source/GatelopeProc.cpp @@ -196,18 +196,14 @@ void Gatelope::processReplacing(float **inputs, float **outputs, VstInt32 sample flip = !flip; - //noise shaping to 32-bit floating point - float fpTemp = inputSampleL; - fpNShapeL += (inputSampleL-fpTemp); - inputSampleL += fpNShapeL; - //if this confuses you look at the wordlength for fpTemp :) - fpTemp = inputSampleR; - fpNShapeR += (inputSampleR-fpTemp); - inputSampleR += fpNShapeR; - //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 + //stereo 32 bit dither, made small and tidy. + int expon; frexpf((float)inputSampleL, &expon); + long double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); + inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; + frexpf((float)inputSampleR, &expon); + dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); + inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; + //end 32 bit dither *out1 = inputSampleL; *out2 = inputSampleR; @@ -217,12 +213,6 @@ void Gatelope::processReplacing(float **inputs, float **outputs, VstInt32 sample *out1++; *out2++; } - fpNShapeL *= 0.999999; - fpNShapeR *= 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. } void Gatelope::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) @@ -414,18 +404,16 @@ void Gatelope::processDoubleReplacing(double **inputs, double **outputs, VstInt3 flip = !flip; - //noise shaping to 64-bit floating point - double fpTemp = inputSampleL; - fpNShapeL += (inputSampleL-fpTemp); - inputSampleL += fpNShapeL; - //if this confuses you look at the wordlength for fpTemp :) - fpTemp = inputSampleR; - fpNShapeR += (inputSampleR-fpTemp); - inputSampleR += fpNShapeR; - //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 64 bit output + //stereo 64 bit dither, made small and tidy. + int expon; frexp((double)inputSampleL, &expon); + long double dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); + dither /= 536870912.0; //needs this to scale to 64 bit zone + inputSampleL += (dither-fpNShapeL); fpNShapeL = dither; + frexp((double)inputSampleR, &expon); + dither = (rand()/(RAND_MAX*7.737125245533627e+25))*pow(2,expon+62); + dither /= 536870912.0; //needs this to scale to 64 bit zone + inputSampleR += (dither-fpNShapeR); fpNShapeR = dither; + //end 64 bit dither *out1 = inputSampleL; *out2 = inputSampleR; @@ -435,10 +423,4 @@ void Gatelope::processDoubleReplacing(double **inputs, double **outputs, VstInt3 *out1++; *out2++; } - fpNShapeL *= 0.999999; - fpNShapeR *= 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. } |