From a28a1330f1eedb9cecd95b21c28155491a595613 Mon Sep 17 00:00:00 2001 From: Chris Johnson Date: Sun, 24 Nov 2019 21:23:09 -0500 Subject: Gringer (and Monitoring) --- .../christopherjohnson.pbxuser | 62 +++++-------- .../christopherjohnson.perspectivev3 | 74 ++++----------- plugins/MacVST/Monitoring/source/Monitoring.cpp | 5 +- plugins/MacVST/Monitoring/source/Monitoring.h | 3 +- .../MacVST/Monitoring/source/MonitoringProc.cpp | 102 +++++++++++++-------- 5 files changed, 110 insertions(+), 136 deletions(-) (limited to 'plugins/MacVST/Monitoring') diff --git a/plugins/MacVST/Monitoring/Monitoring.xcodeproj/christopherjohnson.pbxuser b/plugins/MacVST/Monitoring/Monitoring.xcodeproj/christopherjohnson.pbxuser index e73fde2..2ef559d 100755 --- a/plugins/MacVST/Monitoring/Monitoring.xcodeproj/christopherjohnson.pbxuser +++ b/plugins/MacVST/Monitoring/Monitoring.xcodeproj/christopherjohnson.pbxuser @@ -49,14 +49,12 @@ PBXFileDataSource_Warnings_ColumnID, ); }; - PBXPerProjectTemplateStateSaveDate = 593304926; - PBXWorkspaceStateSaveDate = 593304926; + PBXPerProjectTemplateStateSaveDate = 595818735; + PBXWorkspaceStateSaveDate = 595818735; }; perUserProjectItems = { - 8B25952F235D1D620051EAA4 /* PBXBookmark */ = 8B25952F235D1D620051EAA4 /* PBXBookmark */; - 8B259532235D1D780051EAA4 /* PBXTextBookmark */ = 8B259532235D1D780051EAA4 /* PBXTextBookmark */; - 8B259544235D1D780051EAA4 /* PBXTextBookmark */ = 8B259544235D1D780051EAA4 /* PBXTextBookmark */; - 8B259545235D1D780051EAA4 /* PBXTextBookmark */ = 8B259545235D1D780051EAA4 /* PBXTextBookmark */; + 8B0FED6123837B9500200DE0 /* PBXTextBookmark */ = 8B0FED6123837B9500200DE0 /* PBXTextBookmark */; + 8B0FED6223837B9500200DE0 /* PBXTextBookmark */ = 8B0FED6223837B9500200DE0 /* PBXTextBookmark */; }; sourceControlManager = 8B02375E1D42B1C400E1E8C8 /* Source Control */; userBuildSettings = { @@ -65,16 +63,16 @@ 2407DEB6089929BA00EB68BF /* Monitoring.cpp */ = { uiCtxt = { sepNavIntBoundsRect = "{{0, 0}, {1230, 2197}}"; - sepNavSelRange = "{6256, 0}"; - sepNavVisRange = "{4822, 2491}"; + sepNavSelRange = "{6340, 0}"; + sepNavVisRange = "{4921, 2481}"; sepNavWindowFrame = "{{510, 57}, {895, 821}}"; }; }; 245463B80991757100464AD3 /* Monitoring.h */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {901, 1118}}"; - sepNavSelRange = "{3361, 0}"; - sepNavVisRange = "{694, 2836}"; + sepNavIntBoundsRect = "{{0, 0}, {901, 1131}}"; + sepNavSelRange = "{3479, 0}"; + sepNavVisRange = "{713, 2844}"; sepNavWindowFrame = "{{528, 57}, {895, 821}}"; }; }; @@ -88,10 +86,10 @@ }; 24D8286F09A914000093AEF8 /* MonitoringProc.cpp */ = { uiCtxt = { - sepNavIntBoundsRect = "{{0, 0}, {908, 13234}}"; - sepNavSelRange = "{47910, 0}"; - sepNavVisRange = "{44, 187}"; - sepNavWindowFrame = "{{539, 57}, {895, 821}}"; + sepNavIntBoundsRect = "{{0, 0}, {642, 13533}}"; + sepNavSelRange = "{49235, 0}"; + sepNavVisRange = "{129, 102}"; + sepNavWindowFrame = "{{30, 66}, {1229, 812}}"; }; }; 8B02375E1D42B1C400E1E8C8 /* Source Control */ = { @@ -108,39 +106,25 @@ isa = PBXCodeSenseManager; indexTemplatePath = ""; }; - 8B25952F235D1D620051EAA4 /* PBXBookmark */ = { - isa = PBXBookmark; - fRef = 24D8286F09A914000093AEF8 /* MonitoringProc.cpp */; - }; - 8B259532235D1D780051EAA4 /* PBXTextBookmark */ = { - isa = PBXTextBookmark; - fRef = 24D8286F09A914000093AEF8 /* MonitoringProc.cpp */; - name = "MonitoringProc.cpp: 801"; - rLen = 0; - rLoc = 47910; - rType = 0; - vrLen = 187; - vrLoc = 44; - }; - 8B259544235D1D780051EAA4 /* PBXTextBookmark */ = { + 8B0FED6123837B9500200DE0 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* MonitoringProc.cpp */; - name = "MonitoringProc.cpp: 801"; + name = "MonitoringProc.cpp: 821"; rLen = 0; - rLoc = 47910; + rLoc = 49235; rType = 0; - vrLen = 187; - vrLoc = 44; + vrLen = 102; + vrLoc = 129; }; - 8B259545235D1D780051EAA4 /* PBXTextBookmark */ = { + 8B0FED6223837B9500200DE0 /* PBXTextBookmark */ = { isa = PBXTextBookmark; fRef = 24D8286F09A914000093AEF8 /* MonitoringProc.cpp */; - name = "MonitoringProc.cpp: 801"; + name = "MonitoringProc.cpp: 826"; rLen = 0; - rLoc = 47910; + rLoc = 49235; rType = 0; - vrLen = 3014; - vrLoc = 49111; + vrLen = 102; + vrLoc = 129; }; 8D01CCC60486CAD60068D4B7 /* Monitoring */ = { activeExec = 0; diff --git a/plugins/MacVST/Monitoring/Monitoring.xcodeproj/christopherjohnson.perspectivev3 b/plugins/MacVST/Monitoring/Monitoring.xcodeproj/christopherjohnson.perspectivev3 index 5fc07fb..c73560d 100755 --- a/plugins/MacVST/Monitoring/Monitoring.xcodeproj/christopherjohnson.perspectivev3 +++ b/plugins/MacVST/Monitoring/Monitoring.xcodeproj/christopherjohnson.perspectivev3 @@ -222,48 +222,7 @@ OpenEditors - - - Content - - PBXProjectModuleGUID - 8B259537235D1D780051EAA4 - PBXProjectModuleLabel - MonitoringProc.cpp - PBXSplitModuleInNavigatorKey - - Split0 - - PBXProjectModuleGUID - 8B259538235D1D780051EAA4 - PBXProjectModuleLabel - MonitoringProc.cpp - _historyCapacity - 0 - bookmark - 8B259545235D1D780051EAA4 - history - - 8B25952F235D1D620051EAA4 - - - SplitCount - 1 - - StatusBarVisibility - - - Geometry - - Frame - {{0, 20}, {895, 724}} - PBXModuleWindowStatusBarHidden2 - - RubberWindowFrame - 539 113 895 765 0 0 1440 878 - - - + PerspectiveWidths 810 @@ -364,7 +323,7 @@ 185 RubberWindowFrame - 476 276 810 487 0 0 1440 878 + 4 361 810 487 0 0 1440 878 Module PBXSmartGroupTreeModule @@ -392,10 +351,10 @@ _historyCapacity 0 bookmark - 8B259544235D1D780051EAA4 + 8B0FED6223837B9500200DE0 history - 8B259532235D1D780051EAA4 + 8B0FED6123837B9500200DE0 SplitCount @@ -409,18 +368,18 @@ GeometryConfiguration Frame - {{0, 0}, {603, 117}} + {{0, 0}, {603, 86}} RubberWindowFrame - 476 276 810 487 0 0 1440 878 + 4 361 810 487 0 0 1440 878 Module PBXNavigatorGroup Proportion - 117pt + 86pt Proportion - 324pt + 355pt Tabs @@ -434,9 +393,9 @@ GeometryConfiguration Frame - {{10, 27}, {603, 297}} + {{10, 27}, {603, 328}} RubberWindowFrame - 476 276 810 487 0 0 1440 878 + 4 361 810 487 0 0 1440 878 Module XCDetailModule @@ -490,7 +449,7 @@ GeometryConfiguration Frame - {{10, 27}, {603, 414}} + {{10, 27}, {603, 312}} Module PBXBuildResultsModule @@ -518,11 +477,11 @@ TableOfContents - 8B259534235D1D780051EAA4 + 8B0FED6323837B9500200DE0 1CA23ED40692098700951B8B - 8B259535235D1D780051EAA4 + 8B0FED6423837B9500200DE0 8B0237581D42B1C400E1E8C8 - 8B259536235D1D780051EAA4 + 8B0FED6523837B9500200DE0 1CA23EDF0692099D00951B8B 1CA23EE00692099D00951B8B 1CA23EE10692099D00951B8B @@ -675,7 +634,7 @@ StatusbarIsVisible TimeStamp - 593304952.09331 + 595819413.74516499 ToolbarConfigUserDefaultsMinorVersion 2 ToolbarDisplayMode @@ -693,10 +652,9 @@ WindowOrderList /Users/christopherjohnson/Desktop/Plugins/MacVST/Monitoring/Monitoring.xcodeproj - 8B259537235D1D780051EAA4 WindowString - 476 276 810 487 0 0 1440 878 + 4 361 810 487 0 0 1440 878 WindowToolsV3 diff --git a/plugins/MacVST/Monitoring/source/Monitoring.cpp b/plugins/MacVST/Monitoring/source/Monitoring.cpp index f7cefe1..556e27c 100755 --- a/plugins/MacVST/Monitoring/source/Monitoring.cpp +++ b/plugins/MacVST/Monitoring/source/Monitoring.cpp @@ -57,7 +57,7 @@ Monitoring::Monitoring(audioMasterCallback audioMaster) : iirSampleTR = 0.0; iirSampleUR = 0.0; iirSampleVR = 0.0; iirSampleWR = 0.0; iirSampleXR = 0.0; iirSampleYR = 0.0; iirSampleZR = 0.0; // o/` //SubsOnly - for (int x = 0; x < 11; x++) {biquad[x] = 0.0;} + for (int x = 0; x < 11; x++) {biquadL[x] = 0.0; biquadR[x] = 0.0;} //Bandpasses A = 0.0; fpd = 17; @@ -135,7 +135,7 @@ void Monitoring::getParameterName(VstInt32 index, char *text) { void Monitoring::getParameterDisplay(VstInt32 index, char *text) { switch (index) { - case kParamA: switch((VstInt32)( A * 15.999 )) //0 to almost edge of # of params + case kParamA: switch((VstInt32)( A * 16.999 )) //0 to almost edge of # of params { case 0: vst_strncpy (text, "Out24", kVstMaxParamStrLen); break; case 1: vst_strncpy (text, "Out16", kVstMaxParamStrLen); break; case 2: vst_strncpy (text, "Peaks", kVstMaxParamStrLen); break; @@ -152,6 +152,7 @@ void Monitoring::getParameterDisplay(VstInt32 index, char *text) { case 13: vst_strncpy (text, "Cans B", kVstMaxParamStrLen); break; case 14: vst_strncpy (text, "Cans C", kVstMaxParamStrLen); break; case 15: vst_strncpy (text, "Cans D", kVstMaxParamStrLen); break; + case 16: vst_strncpy (text, "V Trick", kVstMaxParamStrLen); break; default: break; // unknown parameter, shouldn't happen! } break; default: break; // unknown parameter, shouldn't happen! diff --git a/plugins/MacVST/Monitoring/source/Monitoring.h b/plugins/MacVST/Monitoring/source/Monitoring.h index cb64834..f92a46b 100755 --- a/plugins/MacVST/Monitoring/source/Monitoring.h +++ b/plugins/MacVST/Monitoring/source/Monitoring.h @@ -73,7 +73,8 @@ private: double iirSampleTR, iirSampleUR, iirSampleVR; double iirSampleWR, iirSampleXR, iirSampleYR, iirSampleZR; // o/` //SubsOnly - long double biquad[11]; + long double biquadL[11]; + long double biquadR[11]; //Bandpasses uint32_t fpd; diff --git a/plugins/MacVST/Monitoring/source/MonitoringProc.cpp b/plugins/MacVST/Monitoring/source/MonitoringProc.cpp index ae46dca..ddb1f6f 100755 --- a/plugins/MacVST/Monitoring/source/MonitoringProc.cpp +++ b/plugins/MacVST/Monitoring/source/MonitoringProc.cpp @@ -18,24 +18,34 @@ void Monitoring::processReplacing(float **inputs, float **outputs, VstInt32 samp overallscale /= 44100.0; overallscale *= getSampleRate(); - int processing = (VstInt32)( A * 15.999 ); + int processing = (VstInt32)( A * 16.999 ); int am = (int)149.0 * overallscale; int bm = (int)179.0 * overallscale; int cm = (int)191.0 * overallscale; int dm = (int)223.0 * overallscale; //these are 'good' primes, spacing out the allpasses int allpasstemp; //for PeaksOnly - biquad[0] = 0.0375/overallscale; biquad[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden - if (processing == 7) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;} - if (processing == 11) {biquad[0] = 0.1245/overallscale; biquad[1] = 0.46;} - double K = tan(M_PI * biquad[0]); - double norm = 1.0 / (1.0 + K / biquad[1] + K * K); - biquad[2] = K / biquad[1] * norm; - biquad[4] = -biquad[2]; //for bandpass, ignore [3] = 0.0 - biquad[5] = 2.0 * (K * K - 1.0) * norm; - biquad[6] = (1.0 - K / biquad[1] + K * K) * norm; + biquadL[0] = 0.0375/overallscale; biquadL[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden + if (processing == 7) {biquadL[0] = 0.0385/overallscale; biquadL[1] = 0.0825;} + if (processing == 11) {biquadL[0] = 0.1245/overallscale; biquadL[1] = 0.46;} + double K = tan(M_PI * biquadL[0]); + double norm = 1.0 / (1.0 + K / biquadL[1] + K * K); + biquadL[2] = K / biquadL[1] * norm; + biquadL[4] = -biquadL[2]; //for bandpass, ignore [3] = 0.0 + biquadL[5] = 2.0 * (K * K - 1.0) * norm; + biquadL[6] = (1.0 - K / biquadL[1] + K * K) * norm; //for Bandpasses - + biquadR[0] = 0.0375/overallscale; biquadR[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden + if (processing == 7) {biquadR[0] = 0.0385/overallscale; biquadR[1] = 0.0825;} + if (processing == 11) {biquadR[0] = 0.1245/overallscale; biquadR[1] = 0.46;} + K = tan(M_PI * biquadR[0]); + norm = 1.0 / (1.0 + K / biquadR[1] + K * K); + biquadR[2] = K / biquadR[1] * norm; + biquadR[4] = -biquadR[2]; //for bandpass, ignore [3] = 0.0 + biquadR[5] = 2.0 * (K * K - 1.0) * norm; + biquadR[6] = (1.0 - K / biquadR[1] + K * K) * norm; + //for Bandpasses + while (--sampleFrames >= 0) { long double inputSampleL = *in1; @@ -300,15 +310,15 @@ void Monitoring::processReplacing(float **inputs, float **outputs, VstInt32 samp inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR); //encode Console5: good cleanness - long double tempSampleL; tempSampleL = (inputSampleL * biquad[2]) + biquad[7]; - biquad[7] = (-tempSampleL * biquad[5]) + biquad[8]; - biquad[8] = (inputSampleL * biquad[4]) - (tempSampleL * biquad[6]); + long double tempSampleL; tempSampleL = (inputSampleL * biquadL[2]) + biquadL[7]; + biquadL[7] = (-tempSampleL * biquadL[5]) + biquadL[8]; + biquadL[8] = (inputSampleL * biquadL[4]) - (tempSampleL * biquadL[6]); inputSampleL = tempSampleL; //like mono AU, 7 and 8 store L channel - long double tempSampleR; tempSampleR = (inputSampleR * biquad[2]) + biquad[9]; - biquad[9] = (-tempSampleR * biquad[5]) + biquad[10]; - biquad[10] = (inputSampleR * biquad[4]) - (tempSampleR * biquad[6]); - inputSampleR = tempSampleR; //note: 9 and 10 store the R channel + long double tempSampleR; tempSampleR = (inputSampleR * biquadR[2]) + biquadR[7]; + biquadR[7] = (-tempSampleR * biquadR[5]) + biquadR[8]; + biquadR[8] = (inputSampleR * biquadR[4]) - (tempSampleR * biquadR[6]); + inputSampleR = tempSampleR; // we are using the mono configuration if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; @@ -385,6 +395,11 @@ void Monitoring::processReplacing(float **inputs, float **outputs, VstInt32 samp if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; inputSampleR = asin(inputSampleR); //ConsoleBuss processing break; + case 16: + long double inputSample = (inputSampleL + inputSampleR) * 0.5; + inputSampleL = -inputSample; + inputSampleR = inputSample; + break; } @@ -520,22 +535,32 @@ void Monitoring::processDoubleReplacing(double **inputs, double **outputs, VstIn overallscale /= 44100.0; overallscale *= getSampleRate(); - int processing = (VstInt32)( A * 15.999 ); + int processing = (VstInt32)( A * 16.999 ); int am = (int)149.0 * overallscale; int bm = (int)179.0 * overallscale; int cm = (int)191.0 * overallscale; int dm = (int)223.0 * overallscale; //these are 'good' primes, spacing out the allpasses int allpasstemp; //for PeaksOnly - biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825; //define as VINYL unless overridden - if (processing == 8) {biquad[0] = 0.0375/overallscale; biquad[1] = 0.1575;} - if (processing == 9) {biquad[0] = 0.1245/overallscale; biquad[1] = 0.46;} - double K = tan(M_PI * biquad[0]); - double norm = 1.0 / (1.0 + K / biquad[1] + K * K); - biquad[2] = K / biquad[1] * norm; - biquad[4] = -biquad[2]; //for bandpass, ignore [3] = 0.0 - biquad[5] = 2.0 * (K * K - 1.0) * norm; - biquad[6] = (1.0 - K / biquad[1] + K * K) * norm; + biquadL[0] = 0.0375/overallscale; biquadL[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden + if (processing == 7) {biquadL[0] = 0.0385/overallscale; biquadL[1] = 0.0825;} + if (processing == 11) {biquadL[0] = 0.1245/overallscale; biquadL[1] = 0.46;} + double K = tan(M_PI * biquadL[0]); + double norm = 1.0 / (1.0 + K / biquadL[1] + K * K); + biquadL[2] = K / biquadL[1] * norm; + biquadL[4] = -biquadL[2]; //for bandpass, ignore [3] = 0.0 + biquadL[5] = 2.0 * (K * K - 1.0) * norm; + biquadL[6] = (1.0 - K / biquadL[1] + K * K) * norm; + //for Bandpasses + biquadR[0] = 0.0375/overallscale; biquadR[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden + if (processing == 7) {biquadR[0] = 0.0385/overallscale; biquadR[1] = 0.0825;} + if (processing == 11) {biquadR[0] = 0.1245/overallscale; biquadR[1] = 0.46;} + K = tan(M_PI * biquadR[0]); + norm = 1.0 / (1.0 + K / biquadR[1] + K * K); + biquadR[2] = K / biquadR[1] * norm; + biquadR[4] = -biquadR[2]; //for bandpass, ignore [3] = 0.0 + biquadR[5] = 2.0 * (K * K - 1.0) * norm; + biquadR[6] = (1.0 - K / biquadR[1] + K * K) * norm; //for Bandpasses while (--sampleFrames >= 0) @@ -802,15 +827,15 @@ void Monitoring::processDoubleReplacing(double **inputs, double **outputs, VstIn inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR); //encode Console5: good cleanness - long double tempSampleL; tempSampleL = (inputSampleL * biquad[2]) + biquad[7]; - biquad[7] = (-tempSampleL * biquad[5]) + biquad[8]; - biquad[8] = (inputSampleL * biquad[4]) - (tempSampleL * biquad[6]); + long double tempSampleL; tempSampleL = (inputSampleL * biquadL[2]) + biquadL[7]; + biquadL[7] = (-tempSampleL * biquadL[5]) + biquadL[8]; + biquadL[8] = (inputSampleL * biquadL[4]) - (tempSampleL * biquadL[6]); inputSampleL = tempSampleL; //like mono AU, 7 and 8 store L channel - long double tempSampleR; tempSampleR = (inputSampleR * biquad[2]) + biquad[9]; - biquad[9] = (-tempSampleR * biquad[5]) + biquad[10]; - biquad[10] = (inputSampleR * biquad[4]) - (tempSampleR * biquad[6]); - inputSampleR = tempSampleR; //note: 9 and 10 store the R channel + long double tempSampleR; tempSampleR = (inputSampleR * biquadR[2]) + biquadR[7]; + biquadR[7] = (-tempSampleR * biquadR[5]) + biquadR[8]; + biquadR[8] = (inputSampleR * biquadR[4]) - (tempSampleR * biquadR[6]); + inputSampleR = tempSampleR; // we are using the mono configuration if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; @@ -886,7 +911,12 @@ void Monitoring::processDoubleReplacing(double **inputs, double **outputs, VstIn if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; inputSampleL = asin(inputSampleL); if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; inputSampleR = asin(inputSampleR); //ConsoleBuss processing - break; + break; + case 16: + long double inputSample = (inputSampleL + inputSampleR) * 0.5; + inputSampleL = -inputSample; + inputSampleR = inputSample; + break; } -- cgit v1.2.3