mirror of
https://github.com/airwindows/airwindows.git
synced 2026-05-15 14:16:00 -06:00
Monitoring2 Tweaks
This commit is contained in:
parent
0a7a5ae887
commit
ea266b4673
10 changed files with 308 additions and 318 deletions
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Created: 9/13/21
|
||||
*
|
||||
* Copyright: Copyright © 2021 Airwindows, All Rights Reserved
|
||||
* Copyright: Copyright <EFBFBD> 2021 Airwindows, All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
|
||||
* consideration of your agreement to the following terms, and your use, installation, modification
|
||||
|
|
@ -82,8 +82,6 @@ ComponentResult Monitoring2::GetParameterValueStrings(AudioUnitScope inScope,
|
|||
{
|
||||
kMenuItem_DKAD,
|
||||
kMenuItem_DKCD,
|
||||
kMenuItem_PDAD,
|
||||
kMenuItem_PDCD,
|
||||
kMenuItem_PEAK,
|
||||
kMenuItem_SLEW,
|
||||
kMenuItem_SUBS,
|
||||
|
|
@ -287,16 +285,10 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
|
||||
switch (processing)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case kDKAD:
|
||||
case kDKCD:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
inputSampleL *= 0.9549925859; // -0.2dB
|
||||
inputSampleR *= 0.9549925859; // -0.2dB
|
||||
//pad both 24 bit and 16 bit
|
||||
break;
|
||||
case 4:
|
||||
case kPEAK:
|
||||
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);
|
||||
//amplitude aspect
|
||||
|
|
@ -351,7 +343,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
inputSampleL *= 0.63679; inputSampleR *= 0.63679; //scale it to 0dB output at full blast
|
||||
//PeaksOnly
|
||||
break;
|
||||
case 5:
|
||||
case kSLEW:
|
||||
Float64 trim;
|
||||
trim = 2.302585092994045684017991; //natural logarithm of 10
|
||||
long double slewSample; slewSample = (inputSampleL - lastSampleL)*trim;
|
||||
|
|
@ -364,7 +356,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
inputSampleR = slewSample;
|
||||
//SlewOnly
|
||||
break;
|
||||
case 6:
|
||||
case kSUBS:
|
||||
Float64 iirAmount; iirAmount = (2250/44100.0) / overallscale;
|
||||
Float64 gain; gain = 1.42;
|
||||
inputSampleL *= gain; inputSampleR *= gain; gain = ((gain-1)*0.75)+1;
|
||||
|
|
@ -525,26 +517,26 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
//SubsOnly
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case kMONO:
|
||||
case kSIDE:
|
||||
long double mid; mid = inputSampleL + inputSampleR;
|
||||
long double side; side = inputSampleL - inputSampleR;
|
||||
if (processing < 8) side = 0.0;
|
||||
if (processing < 6) side = 0.0;
|
||||
else mid = 0.0; //mono monitoring, or side-only monitoring
|
||||
inputSampleL = (mid+side)/2.0;
|
||||
inputSampleR = (mid-side)/2.0;
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case kVINYL:
|
||||
case kAURAT:
|
||||
case kMONORAT:
|
||||
case kMONOLAT:
|
||||
case kPHONE:
|
||||
//Bandpass: changes in EQ are up in the variable defining, not here
|
||||
//9 Vinyl, 10 11 12 Aurat, 13 Phone
|
||||
//7 Vinyl, 8 9 10 Aurat, 11 Phone
|
||||
|
||||
if (processing == 11) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == 12) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == 13) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
if (processing == kMONORAT) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == kMONOLAT) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == kPHONE) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
|
||||
inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR);
|
||||
//encode Console5: good cleanness
|
||||
|
|
@ -565,14 +557,14 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
inputSampleL = asin(inputSampleL); inputSampleR = asin(inputSampleR);
|
||||
//amplitude aspect
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
if (processing == 14) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == 15) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == 16) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == 17) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
case kCANSA:
|
||||
case kCANSB:
|
||||
case kCANSC:
|
||||
case kCANSD:
|
||||
if (processing == kCANSA) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
//we do a volume compensation immediately to gain stage stuff cleanly
|
||||
inputSampleL = sin(inputSampleL);
|
||||
inputSampleR = sin(inputSampleR);
|
||||
|
|
@ -596,10 +588,10 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
else {inputSampleL += (aL[ax+1])*0.5; inputSampleR += (aR[ax+1])*0.5;}
|
||||
//a darkened Midiverb-style allpass
|
||||
|
||||
if (processing == 14) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == 15) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == 16) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == 17) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
if (processing == kCANSA) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
//Cans A suppresses the crossfeed more, Cans B makes it louder
|
||||
|
||||
drySampleL += inputSampleR;
|
||||
|
|
@ -634,7 +626,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; inputSampleR = asin(inputSampleR);
|
||||
//ConsoleBuss processing
|
||||
break;
|
||||
case 18:
|
||||
case kTRICK:
|
||||
long double inputSample = (inputSampleL + inputSampleR) * 0.5;
|
||||
inputSampleL = -inputSample;
|
||||
inputSampleR = inputSample;
|
||||
|
|
@ -642,7 +634,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
}
|
||||
|
||||
//begin Dark
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL *= 32768.0; //or 16 bit option
|
||||
inputSampleR *= 32768.0; //or 16 bit option
|
||||
} else {
|
||||
|
|
@ -713,7 +705,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
darkSampleR[0] = inputSampleR;
|
||||
//end Dark right
|
||||
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL /= 32768.0;
|
||||
inputSampleR /= 32768.0;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Created: 9/13/21
|
||||
*
|
||||
* Copyright: Copyright © 2021 Airwindows, All Rights Reserved
|
||||
* Copyright: Copyright <EFBFBD> 2021 Airwindows, All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
|
||||
* consideration of your agreement to the following terms, and your use, installation, modification
|
||||
|
|
@ -57,29 +57,25 @@
|
|||
static CFStringRef kParameterOneName = CFSTR("Monitor");
|
||||
static const int kDKAD = 0;
|
||||
static const int kDKCD = 1;
|
||||
static const int kPDAD = 2;
|
||||
static const int kPDCD = 3;
|
||||
static const int kPEAK = 4;
|
||||
static const int kSLEW = 5;
|
||||
static const int kSUBS = 6;
|
||||
static const int kMONO = 7;
|
||||
static const int kSIDE = 8;
|
||||
static const int kVINYL = 9;
|
||||
static const int kAURAT = 10;
|
||||
static const int kMONORAT = 11;
|
||||
static const int kMONOLAT = 12;
|
||||
static const int kPHONE = 13;
|
||||
static const int kCANSA = 14;
|
||||
static const int kCANSB = 15;
|
||||
static const int kCANSC = 16;
|
||||
static const int kCANSD = 17;
|
||||
static const int kTRICK = 18;
|
||||
static const int kPEAK = 2;
|
||||
static const int kSLEW = 3;
|
||||
static const int kSUBS = 4;
|
||||
static const int kMONO = 5;
|
||||
static const int kSIDE = 6;
|
||||
static const int kVINYL = 7;
|
||||
static const int kAURAT = 8;
|
||||
static const int kMONORAT = 9;
|
||||
static const int kMONOLAT = 10;
|
||||
static const int kPHONE = 11;
|
||||
static const int kCANSA = 12;
|
||||
static const int kCANSB = 13;
|
||||
static const int kCANSC = 14;
|
||||
static const int kCANSD = 15;
|
||||
static const int kTRICK = 16;
|
||||
static const int kDefaultValue_ParamOne = kDKAD;
|
||||
|
||||
static CFStringRef kMenuItem_DKAD = CFSTR ("Out24");
|
||||
static CFStringRef kMenuItem_DKCD = CFSTR ("Out16");
|
||||
static CFStringRef kMenuItem_PDAD = CFSTR ("Pad24");
|
||||
static CFStringRef kMenuItem_PDCD = CFSTR ("Pad16");
|
||||
static CFStringRef kMenuItem_PEAK = CFSTR ("Peaks");
|
||||
static CFStringRef kMenuItem_SLEW = CFSTR ("Slew");
|
||||
static CFStringRef kMenuItem_SUBS = CFSTR ("Subs");
|
||||
|
|
@ -177,4 +173,4 @@ public:
|
|||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Created: 9/13/21
|
||||
*
|
||||
* Copyright: Copyright © 2021 Airwindows, All Rights Reserved
|
||||
* Copyright: Copyright <EFBFBD> 2021 Airwindows, All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
|
||||
* consideration of your agreement to the following terms, and your use, installation, modification
|
||||
|
|
@ -82,8 +82,6 @@ ComponentResult Monitoring2::GetParameterValueStrings(AudioUnitScope inScope,
|
|||
{
|
||||
kMenuItem_DKAD,
|
||||
kMenuItem_DKCD,
|
||||
kMenuItem_PDAD,
|
||||
kMenuItem_PDCD,
|
||||
kMenuItem_PEAK,
|
||||
kMenuItem_SLEW,
|
||||
kMenuItem_SUBS,
|
||||
|
|
@ -287,16 +285,10 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
|
||||
switch (processing)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case kDKAD:
|
||||
case kDKCD:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
inputSampleL *= 0.9549925859; // -0.2dB
|
||||
inputSampleR *= 0.9549925859; // -0.2dB
|
||||
//pad both 24 bit and 16 bit
|
||||
break;
|
||||
case 4:
|
||||
case kPEAK:
|
||||
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);
|
||||
//amplitude aspect
|
||||
|
|
@ -351,7 +343,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
inputSampleL *= 0.63679; inputSampleR *= 0.63679; //scale it to 0dB output at full blast
|
||||
//PeaksOnly
|
||||
break;
|
||||
case 5:
|
||||
case kSLEW:
|
||||
Float64 trim;
|
||||
trim = 2.302585092994045684017991; //natural logarithm of 10
|
||||
long double slewSample; slewSample = (inputSampleL - lastSampleL)*trim;
|
||||
|
|
@ -364,7 +356,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
inputSampleR = slewSample;
|
||||
//SlewOnly
|
||||
break;
|
||||
case 6:
|
||||
case kSUBS:
|
||||
Float64 iirAmount; iirAmount = (2250/44100.0) / overallscale;
|
||||
Float64 gain; gain = 1.42;
|
||||
inputSampleL *= gain; inputSampleR *= gain; gain = ((gain-1)*0.75)+1;
|
||||
|
|
@ -525,8 +517,8 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
//SubsOnly
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case kMONO:
|
||||
case kSIDE:
|
||||
long double mid; mid = inputSampleL + inputSampleR;
|
||||
long double side; side = inputSampleL - inputSampleR;
|
||||
if (processing < 8) side = 0.0;
|
||||
|
|
@ -534,17 +526,17 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
inputSampleL = (mid+side)/2.0;
|
||||
inputSampleR = (mid-side)/2.0;
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case kVINYL:
|
||||
case kAURAT:
|
||||
case kMONORAT:
|
||||
case kMONOLAT:
|
||||
case kPHONE:
|
||||
//Bandpass: changes in EQ are up in the variable defining, not here
|
||||
//9 Vinyl, 10 11 12 Aurat, 13 Phone
|
||||
|
||||
if (processing == 11) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == 12) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == 13) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
if (processing == kMONORAT) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == kMONOLAT) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == kPHONE) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
|
||||
inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR);
|
||||
//encode Console5: good cleanness
|
||||
|
|
@ -565,14 +557,14 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
inputSampleL = asin(inputSampleL); inputSampleR = asin(inputSampleR);
|
||||
//amplitude aspect
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
if (processing == 14) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == 15) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == 16) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == 17) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
case kCANSA:
|
||||
case kCANSB:
|
||||
case kCANSC:
|
||||
case kCANSD:
|
||||
if (processing == kCANSA) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
//we do a volume compensation immediately to gain stage stuff cleanly
|
||||
inputSampleL = sin(inputSampleL);
|
||||
inputSampleR = sin(inputSampleR);
|
||||
|
|
@ -596,10 +588,10 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
else {inputSampleL += (aL[ax+1])*0.5; inputSampleR += (aR[ax+1])*0.5;}
|
||||
//a darkened Midiverb-style allpass
|
||||
|
||||
if (processing == 14) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == 15) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == 16) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == 17) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
if (processing == kCANSA) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
//Cans A suppresses the crossfeed more, Cans B makes it louder
|
||||
|
||||
drySampleL += inputSampleR;
|
||||
|
|
@ -634,7 +626,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; inputSampleR = asin(inputSampleR);
|
||||
//ConsoleBuss processing
|
||||
break;
|
||||
case 18:
|
||||
case kTRICK:
|
||||
long double inputSample = (inputSampleL + inputSampleR) * 0.5;
|
||||
inputSampleL = -inputSample;
|
||||
inputSampleR = inputSample;
|
||||
|
|
@ -642,7 +634,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
}
|
||||
|
||||
//begin Dark
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL *= 32768.0; //or 16 bit option
|
||||
inputSampleR *= 32768.0; //or 16 bit option
|
||||
} else {
|
||||
|
|
@ -713,7 +705,7 @@ OSStatus Monitoring2::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionF
|
|||
darkSampleR[0] = inputSampleR;
|
||||
//end Dark right
|
||||
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL /= 32768.0;
|
||||
inputSampleR /= 32768.0;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
*
|
||||
* Created: 9/13/21
|
||||
*
|
||||
* Copyright: Copyright © 2021 Airwindows, All Rights Reserved
|
||||
* Copyright: Copyright <EFBFBD> 2021 Airwindows, All Rights Reserved
|
||||
*
|
||||
* Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc. ("Apple") in
|
||||
* consideration of your agreement to the following terms, and your use, installation, modification
|
||||
|
|
@ -57,29 +57,25 @@
|
|||
static CFStringRef kParameterOneName = CFSTR("Monitor");
|
||||
static const int kDKAD = 0;
|
||||
static const int kDKCD = 1;
|
||||
static const int kPDAD = 2;
|
||||
static const int kPDCD = 3;
|
||||
static const int kPEAK = 4;
|
||||
static const int kSLEW = 5;
|
||||
static const int kSUBS = 6;
|
||||
static const int kMONO = 7;
|
||||
static const int kSIDE = 8;
|
||||
static const int kVINYL = 9;
|
||||
static const int kAURAT = 10;
|
||||
static const int kMONORAT = 11;
|
||||
static const int kMONOLAT = 12;
|
||||
static const int kPHONE = 13;
|
||||
static const int kCANSA = 14;
|
||||
static const int kCANSB = 15;
|
||||
static const int kCANSC = 16;
|
||||
static const int kCANSD = 17;
|
||||
static const int kTRICK = 18;
|
||||
static const int kPEAK = 2;
|
||||
static const int kSLEW = 3;
|
||||
static const int kSUBS = 4;
|
||||
static const int kMONO = 5;
|
||||
static const int kSIDE = 6;
|
||||
static const int kVINYL = 7;
|
||||
static const int kAURAT = 8;
|
||||
static const int kMONORAT = 9;
|
||||
static const int kMONOLAT = 10;
|
||||
static const int kPHONE = 11;
|
||||
static const int kCANSA = 12;
|
||||
static const int kCANSB = 13;
|
||||
static const int kCANSC = 14;
|
||||
static const int kCANSD = 15;
|
||||
static const int kTRICK = 16;
|
||||
static const int kDefaultValue_ParamOne = kDKAD;
|
||||
|
||||
static CFStringRef kMenuItem_DKAD = CFSTR ("Out24");
|
||||
static CFStringRef kMenuItem_DKCD = CFSTR ("Out16");
|
||||
static CFStringRef kMenuItem_PDAD = CFSTR ("Pad24");
|
||||
static CFStringRef kMenuItem_PDCD = CFSTR ("Pad16");
|
||||
static CFStringRef kMenuItem_PEAK = CFSTR ("Peaks");
|
||||
static CFStringRef kMenuItem_SLEW = CFSTR ("Slew");
|
||||
static CFStringRef kMenuItem_SUBS = CFSTR ("Subs");
|
||||
|
|
@ -177,4 +173,4 @@ public:
|
|||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -117,26 +117,24 @@ void Monitoring2::getParameterName(VstInt32 index, char *text) {
|
|||
|
||||
void Monitoring2::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: switch((VstInt32)( A * 18.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, "Pad24", kVstMaxParamStrLen); break;
|
||||
case 3: vst_strncpy (text, "Pad16", kVstMaxParamStrLen); break;
|
||||
case 4: vst_strncpy (text, "Peaks", kVstMaxParamStrLen); break;
|
||||
case 5: vst_strncpy (text, "Slew", kVstMaxParamStrLen); break;
|
||||
case 6: vst_strncpy (text, "Subs", kVstMaxParamStrLen); break;
|
||||
case 7: vst_strncpy (text, "Mono", kVstMaxParamStrLen); break;
|
||||
case 8: vst_strncpy (text, "Side", kVstMaxParamStrLen); break;
|
||||
case 9: vst_strncpy (text, "Vinyl", kVstMaxParamStrLen); break;
|
||||
case 10: vst_strncpy (text, "Aurat", kVstMaxParamStrLen); break;
|
||||
case 11: vst_strncpy (text, "MonoRat", kVstMaxParamStrLen); break;
|
||||
case 12: vst_strncpy (text, "MonoLat", kVstMaxParamStrLen); break;
|
||||
case 13: vst_strncpy (text, "Phone", kVstMaxParamStrLen); break;
|
||||
case 14: vst_strncpy (text, "Cans A", kVstMaxParamStrLen); break;
|
||||
case 15: vst_strncpy (text, "Cans B", kVstMaxParamStrLen); break;
|
||||
case 16: vst_strncpy (text, "Cans C", kVstMaxParamStrLen); break;
|
||||
case 17: vst_strncpy (text, "Cans D", kVstMaxParamStrLen); break;
|
||||
case 18: vst_strncpy (text, "V Trick", kVstMaxParamStrLen); break;
|
||||
case kParamA: switch((VstInt32)( A * 16.999 )) //0 to almost edge of # of params
|
||||
{ case kDKAD: vst_strncpy (text, "Out24", kVstMaxParamStrLen); break;
|
||||
case kDKCD: vst_strncpy (text, "Out16", kVstMaxParamStrLen); break;
|
||||
case kPEAK: vst_strncpy (text, "Peaks", kVstMaxParamStrLen); break;
|
||||
case kSLEW: vst_strncpy (text, "Slew", kVstMaxParamStrLen); break;
|
||||
case kSUBS: vst_strncpy (text, "Subs", kVstMaxParamStrLen); break;
|
||||
case kMONO: vst_strncpy (text, "Mono", kVstMaxParamStrLen); break;
|
||||
case kSIDE: vst_strncpy (text, "Side", kVstMaxParamStrLen); break;
|
||||
case kVINYL: vst_strncpy (text, "Vinyl", kVstMaxParamStrLen); break;
|
||||
case kAURAT: vst_strncpy (text, "Aurat", kVstMaxParamStrLen); break;
|
||||
case kMONORAT: vst_strncpy (text, "MonoRat", kVstMaxParamStrLen); break;
|
||||
case kMONOLAT: vst_strncpy (text, "MonoLat", kVstMaxParamStrLen); break;
|
||||
case kPHONE: vst_strncpy (text, "Phone", kVstMaxParamStrLen); break;
|
||||
case kCANSA: vst_strncpy (text, "Cans A", kVstMaxParamStrLen); break;
|
||||
case kCANSB: vst_strncpy (text, "Cans B", kVstMaxParamStrLen); break;
|
||||
case kCANSC: vst_strncpy (text, "Cans C", kVstMaxParamStrLen); break;
|
||||
case kCANSD: vst_strncpy (text, "Cans D", kVstMaxParamStrLen); break;
|
||||
case kTRICK: vst_strncpy (text, "V Trick", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
|
|
|
|||
|
|
@ -20,6 +20,27 @@ enum {
|
|||
kNumParameters = 1
|
||||
}; //
|
||||
|
||||
enum {
|
||||
kDKAD,
|
||||
kDKCD,
|
||||
kPEAK,
|
||||
kSLEW,
|
||||
kSUBS,
|
||||
kMONO,
|
||||
kSIDE,
|
||||
kVINYL,
|
||||
kAURAT,
|
||||
kMONORAT,
|
||||
kMONOLAT,
|
||||
kPHONE,
|
||||
kCANSA,
|
||||
kCANSB,
|
||||
kCANSC,
|
||||
kCANSD,
|
||||
kTRICK,
|
||||
};
|
||||
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
if (depth < 3) depth = 3;
|
||||
if (depth > 98) depth = 98; //for Dark
|
||||
|
||||
int processing = (VstInt32)( A * 18.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;
|
||||
|
|
@ -30,8 +30,8 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
int allpasstemp;
|
||||
//for PeaksOnly
|
||||
biquad[0] = 0.0375/overallscale; biquad[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden
|
||||
if (processing == 9) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;}
|
||||
if (processing == 13) {biquad[0] = 0.1245/overallscale; biquad[1] = 0.46;}
|
||||
if (processing == kVINYL) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;}
|
||||
if (processing == kPHONE) {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;
|
||||
|
|
@ -52,16 +52,10 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
|
||||
switch (processing)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case kDKAD:
|
||||
case kDKCD:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
inputSampleL *= 0.9549925859; // -0.2dB
|
||||
inputSampleR *= 0.9549925859; // -0.2dB
|
||||
//pad both 24 bit and 16 bit
|
||||
break;
|
||||
case 4:
|
||||
case kPEAK:
|
||||
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);
|
||||
//amplitude aspect
|
||||
|
|
@ -116,7 +110,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
inputSampleL *= 0.63679; inputSampleR *= 0.63679; //scale it to 0dB output at full blast
|
||||
//PeaksOnly
|
||||
break;
|
||||
case 5:
|
||||
case kSLEW:
|
||||
double trim;
|
||||
trim = 2.302585092994045684017991; //natural logarithm of 10
|
||||
long double slewSample; slewSample = (inputSampleL - lastSampleL)*trim;
|
||||
|
|
@ -129,7 +123,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
inputSampleR = slewSample;
|
||||
//SlewOnly
|
||||
break;
|
||||
case 6:
|
||||
case kSUBS:
|
||||
double iirAmount; iirAmount = (2250/44100.0) / overallscale;
|
||||
double gain; gain = 1.42;
|
||||
inputSampleL *= gain; inputSampleR *= gain; gain = ((gain-1)*0.75)+1;
|
||||
|
|
@ -290,8 +284,8 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
//SubsOnly
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case kMONO:
|
||||
case kSIDE:
|
||||
long double mid; mid = inputSampleL + inputSampleR;
|
||||
long double side; side = inputSampleL - inputSampleR;
|
||||
if (processing < 8) side = 0.0;
|
||||
|
|
@ -299,16 +293,16 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
inputSampleL = (mid+side)/2.0;
|
||||
inputSampleR = (mid-side)/2.0;
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case kVINYL:
|
||||
case kAURAT:
|
||||
case kMONORAT:
|
||||
case kMONOLAT:
|
||||
case kPHONE:
|
||||
//Bandpass: changes in EQ are up in the variable defining, not here
|
||||
//7 Vinyl, 8 9 10 Aurat, 11 Phone
|
||||
if (processing == 11) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == 12) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == 13) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
if (processing == kMONORAT) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == kMONOLAT) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == kPHONE) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
|
||||
inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR);
|
||||
//encode Console5: good cleanness
|
||||
|
|
@ -329,14 +323,14 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
inputSampleL = asin(inputSampleL); inputSampleR = asin(inputSampleR);
|
||||
//amplitude aspect
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
if (processing == 14) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == 15) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == 16) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == 17) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
case kCANSA:
|
||||
case kCANSB:
|
||||
case kCANSC:
|
||||
case kCANSD:
|
||||
if (processing == kCANSA) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
//we do a volume compensation immediately to gain stage stuff cleanly
|
||||
inputSampleL = sin(inputSampleL);
|
||||
inputSampleR = sin(inputSampleR);
|
||||
|
|
@ -360,10 +354,10 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
else {inputSampleL += (aL[ax+1])*0.5; inputSampleR += (aR[ax+1])*0.5;}
|
||||
//a darkened Midiverb-style allpass
|
||||
|
||||
if (processing == 14) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == 15) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == 16) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == 17) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
if (processing == kCANSA) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
//Cans A suppresses the crossfeed more, Cans B makes it louder
|
||||
|
||||
drySampleL += inputSampleR;
|
||||
|
|
@ -398,7 +392,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; inputSampleR = asin(inputSampleR);
|
||||
//ConsoleBuss processing
|
||||
break;
|
||||
case 18:
|
||||
case kTRICK:
|
||||
long double inputSample = (inputSampleL + inputSampleR) * 0.5;
|
||||
inputSampleL = -inputSample;
|
||||
inputSampleR = inputSample;
|
||||
|
|
@ -406,7 +400,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
}
|
||||
|
||||
//begin Dark
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL *= 32768.0; //or 16 bit option
|
||||
inputSampleR *= 32768.0; //or 16 bit option
|
||||
} else {
|
||||
|
|
@ -477,7 +471,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
darkSampleR[0] = inputSampleR;
|
||||
//end Dark right
|
||||
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL /= 32768.0;
|
||||
inputSampleR /= 32768.0;
|
||||
} else {
|
||||
|
|
@ -519,8 +513,8 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
int allpasstemp;
|
||||
//for PeaksOnly
|
||||
biquad[0] = 0.0375/overallscale; biquad[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden
|
||||
if (processing == 9) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;}
|
||||
if (processing == 13) {biquad[0] = 0.1245/overallscale; biquad[1] = 0.46;}
|
||||
if (processing == kVINYL) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;}
|
||||
if (processing == kPHONE) {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;
|
||||
|
|
@ -541,16 +535,10 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
|
||||
switch (processing)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case kDKAD:
|
||||
case kDKCD:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
inputSampleL *= 0.9549925859; // -0.2dB
|
||||
inputSampleR *= 0.9549925859; // -0.2dB
|
||||
//pad both 24 bit and 16 bit
|
||||
break;
|
||||
case 4:
|
||||
case kPEAK:
|
||||
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);
|
||||
//amplitude aspect
|
||||
|
|
@ -605,7 +593,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
inputSampleL *= 0.63679; inputSampleR *= 0.63679; //scale it to 0dB output at full blast
|
||||
//PeaksOnly
|
||||
break;
|
||||
case 5:
|
||||
case kSLEW:
|
||||
double trim;
|
||||
trim = 2.302585092994045684017991; //natural logarithm of 10
|
||||
long double slewSample; slewSample = (inputSampleL - lastSampleL)*trim;
|
||||
|
|
@ -618,7 +606,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
inputSampleR = slewSample;
|
||||
//SlewOnly
|
||||
break;
|
||||
case 6:
|
||||
case kSUBS:
|
||||
double iirAmount; iirAmount = (2250/44100.0) / overallscale;
|
||||
double gain; gain = 1.42;
|
||||
inputSampleL *= gain; inputSampleR *= gain; gain = ((gain-1)*0.75)+1;
|
||||
|
|
@ -779,25 +767,25 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
//SubsOnly
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case kMONO:
|
||||
case kSIDE:
|
||||
long double mid; mid = inputSampleL + inputSampleR;
|
||||
long double side; side = inputSampleL - inputSampleR;
|
||||
if (processing < 8) side = 0.0;
|
||||
if (processing < kSIDE) side = 0.0;
|
||||
else mid = 0.0; //mono monitoring, or side-only monitoring
|
||||
inputSampleL = (mid+side)/2.0;
|
||||
inputSampleR = (mid-side)/2.0;
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case kVINYL:
|
||||
case kAURAT:
|
||||
case kMONORAT:
|
||||
case kMONOLAT:
|
||||
case kPHONE:
|
||||
//Bandpass: changes in EQ are up in the variable defining, not here
|
||||
//7 Vinyl, 8 9 10 Aurat, 11 Phone
|
||||
if (processing == 11) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == 12) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == 13) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
if (processing == kMONORAT) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == kMONOLAT) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == kPHONE) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
|
||||
inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR);
|
||||
//encode Console5: good cleanness
|
||||
|
|
@ -818,14 +806,14 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
inputSampleL = asin(inputSampleL); inputSampleR = asin(inputSampleR);
|
||||
//amplitude aspect
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
if (processing == 14) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == 15) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == 16) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == 17) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
case kCANSA:
|
||||
case kCANSB:
|
||||
case kCANSC:
|
||||
case kCANSD:
|
||||
if (processing == kCANSA) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
//we do a volume compensation immediately to gain stage stuff cleanly
|
||||
inputSampleL = sin(inputSampleL);
|
||||
inputSampleR = sin(inputSampleR);
|
||||
|
|
@ -849,10 +837,10 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
else {inputSampleL += (aL[ax+1])*0.5; inputSampleR += (aR[ax+1])*0.5;}
|
||||
//a darkened Midiverb-style allpass
|
||||
|
||||
if (processing == 14) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == 15) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == 16) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == 17) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
if (processing == kCANSA) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
//Cans A suppresses the crossfeed more, Cans B makes it louder
|
||||
|
||||
drySampleL += inputSampleR;
|
||||
|
|
@ -887,7 +875,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; inputSampleR = asin(inputSampleR);
|
||||
//ConsoleBuss processing
|
||||
break;
|
||||
case 18:
|
||||
case kTRICK:
|
||||
long double inputSample = (inputSampleL + inputSampleR) * 0.5;
|
||||
inputSampleL = -inputSample;
|
||||
inputSampleR = inputSample;
|
||||
|
|
@ -895,7 +883,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
}
|
||||
|
||||
//begin Dark
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL *= 32768.0; //or 16 bit option
|
||||
inputSampleR *= 32768.0; //or 16 bit option
|
||||
} else {
|
||||
|
|
@ -966,7 +954,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
darkSampleR[0] = inputSampleR;
|
||||
//end Dark right
|
||||
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL /= 32768.0;
|
||||
inputSampleR /= 32768.0;
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -117,26 +117,24 @@ void Monitoring2::getParameterName(VstInt32 index, char *text) {
|
|||
|
||||
void Monitoring2::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: switch((VstInt32)( A * 18.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, "Pad24", kVstMaxParamStrLen); break;
|
||||
case 3: vst_strncpy (text, "Pad16", kVstMaxParamStrLen); break;
|
||||
case 4: vst_strncpy (text, "Peaks", kVstMaxParamStrLen); break;
|
||||
case 5: vst_strncpy (text, "Slew", kVstMaxParamStrLen); break;
|
||||
case 6: vst_strncpy (text, "Subs", kVstMaxParamStrLen); break;
|
||||
case 7: vst_strncpy (text, "Mono", kVstMaxParamStrLen); break;
|
||||
case 8: vst_strncpy (text, "Side", kVstMaxParamStrLen); break;
|
||||
case 9: vst_strncpy (text, "Vinyl", kVstMaxParamStrLen); break;
|
||||
case 10: vst_strncpy (text, "Aurat", kVstMaxParamStrLen); break;
|
||||
case 11: vst_strncpy (text, "MonoRat", kVstMaxParamStrLen); break;
|
||||
case 12: vst_strncpy (text, "MonoLat", kVstMaxParamStrLen); break;
|
||||
case 13: vst_strncpy (text, "Phone", kVstMaxParamStrLen); break;
|
||||
case 14: vst_strncpy (text, "Cans A", kVstMaxParamStrLen); break;
|
||||
case 15: vst_strncpy (text, "Cans B", kVstMaxParamStrLen); break;
|
||||
case 16: vst_strncpy (text, "Cans C", kVstMaxParamStrLen); break;
|
||||
case 17: vst_strncpy (text, "Cans D", kVstMaxParamStrLen); break;
|
||||
case 18: vst_strncpy (text, "V Trick", kVstMaxParamStrLen); break;
|
||||
case kParamA: switch((VstInt32)( A * 16.999 )) //0 to almost edge of # of params
|
||||
{ case kDKAD: vst_strncpy (text, "Out24", kVstMaxParamStrLen); break;
|
||||
case kDKCD: vst_strncpy (text, "Out16", kVstMaxParamStrLen); break;
|
||||
case kPEAK: vst_strncpy (text, "Peaks", kVstMaxParamStrLen); break;
|
||||
case kSLEW: vst_strncpy (text, "Slew", kVstMaxParamStrLen); break;
|
||||
case kSUBS: vst_strncpy (text, "Subs", kVstMaxParamStrLen); break;
|
||||
case kMONO: vst_strncpy (text, "Mono", kVstMaxParamStrLen); break;
|
||||
case kSIDE: vst_strncpy (text, "Side", kVstMaxParamStrLen); break;
|
||||
case kVINYL: vst_strncpy (text, "Vinyl", kVstMaxParamStrLen); break;
|
||||
case kAURAT: vst_strncpy (text, "Aurat", kVstMaxParamStrLen); break;
|
||||
case kMONORAT: vst_strncpy (text, "MonoRat", kVstMaxParamStrLen); break;
|
||||
case kMONOLAT: vst_strncpy (text, "MonoLat", kVstMaxParamStrLen); break;
|
||||
case kPHONE: vst_strncpy (text, "Phone", kVstMaxParamStrLen); break;
|
||||
case kCANSA: vst_strncpy (text, "Cans A", kVstMaxParamStrLen); break;
|
||||
case kCANSB: vst_strncpy (text, "Cans B", kVstMaxParamStrLen); break;
|
||||
case kCANSC: vst_strncpy (text, "Cans C", kVstMaxParamStrLen); break;
|
||||
case kCANSD: vst_strncpy (text, "Cans D", kVstMaxParamStrLen); break;
|
||||
case kTRICK: vst_strncpy (text, "V Trick", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
|
|
|
|||
|
|
@ -20,6 +20,27 @@ enum {
|
|||
kNumParameters = 1
|
||||
}; //
|
||||
|
||||
enum {
|
||||
kDKAD,
|
||||
kDKCD,
|
||||
kPEAK,
|
||||
kSLEW,
|
||||
kSUBS,
|
||||
kMONO,
|
||||
kSIDE,
|
||||
kVINYL,
|
||||
kAURAT,
|
||||
kMONORAT,
|
||||
kMONOLAT,
|
||||
kPHONE,
|
||||
kCANSA,
|
||||
kCANSB,
|
||||
kCANSC,
|
||||
kCANSD,
|
||||
kTRICK,
|
||||
};
|
||||
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
if (depth < 3) depth = 3;
|
||||
if (depth > 98) depth = 98; //for Dark
|
||||
|
||||
int processing = (VstInt32)( A * 18.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;
|
||||
|
|
@ -30,8 +30,8 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
int allpasstemp;
|
||||
//for PeaksOnly
|
||||
biquad[0] = 0.0375/overallscale; biquad[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden
|
||||
if (processing == 9) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;}
|
||||
if (processing == 13) {biquad[0] = 0.1245/overallscale; biquad[1] = 0.46;}
|
||||
if (processing == kVINYL) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;}
|
||||
if (processing == kPHONE) {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;
|
||||
|
|
@ -52,16 +52,10 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
|
||||
switch (processing)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case kDKAD:
|
||||
case kDKCD:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
inputSampleL *= 0.9549925859; // -0.2dB
|
||||
inputSampleR *= 0.9549925859; // -0.2dB
|
||||
//pad both 24 bit and 16 bit
|
||||
break;
|
||||
case 4:
|
||||
case kPEAK:
|
||||
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);
|
||||
//amplitude aspect
|
||||
|
|
@ -116,7 +110,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
inputSampleL *= 0.63679; inputSampleR *= 0.63679; //scale it to 0dB output at full blast
|
||||
//PeaksOnly
|
||||
break;
|
||||
case 5:
|
||||
case kSLEW:
|
||||
double trim;
|
||||
trim = 2.302585092994045684017991; //natural logarithm of 10
|
||||
long double slewSample; slewSample = (inputSampleL - lastSampleL)*trim;
|
||||
|
|
@ -129,7 +123,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
inputSampleR = slewSample;
|
||||
//SlewOnly
|
||||
break;
|
||||
case 6:
|
||||
case kSUBS:
|
||||
double iirAmount; iirAmount = (2250/44100.0) / overallscale;
|
||||
double gain; gain = 1.42;
|
||||
inputSampleL *= gain; inputSampleR *= gain; gain = ((gain-1)*0.75)+1;
|
||||
|
|
@ -290,8 +284,8 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
//SubsOnly
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case kMONO:
|
||||
case kSIDE:
|
||||
long double mid; mid = inputSampleL + inputSampleR;
|
||||
long double side; side = inputSampleL - inputSampleR;
|
||||
if (processing < 8) side = 0.0;
|
||||
|
|
@ -299,16 +293,16 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
inputSampleL = (mid+side)/2.0;
|
||||
inputSampleR = (mid-side)/2.0;
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case kVINYL:
|
||||
case kAURAT:
|
||||
case kMONORAT:
|
||||
case kMONOLAT:
|
||||
case kPHONE:
|
||||
//Bandpass: changes in EQ are up in the variable defining, not here
|
||||
//7 Vinyl, 8 9 10 Aurat, 11 Phone
|
||||
if (processing == 11) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == 12) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == 13) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
if (processing == kMONORAT) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == kMONOLAT) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == kPHONE) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
|
||||
inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR);
|
||||
//encode Console5: good cleanness
|
||||
|
|
@ -329,14 +323,14 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
inputSampleL = asin(inputSampleL); inputSampleR = asin(inputSampleR);
|
||||
//amplitude aspect
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
if (processing == 14) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == 15) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == 16) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == 17) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
case kCANSA:
|
||||
case kCANSB:
|
||||
case kCANSC:
|
||||
case kCANSD:
|
||||
if (processing == kCANSA) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
//we do a volume compensation immediately to gain stage stuff cleanly
|
||||
inputSampleL = sin(inputSampleL);
|
||||
inputSampleR = sin(inputSampleR);
|
||||
|
|
@ -360,10 +354,10 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
else {inputSampleL += (aL[ax+1])*0.5; inputSampleR += (aR[ax+1])*0.5;}
|
||||
//a darkened Midiverb-style allpass
|
||||
|
||||
if (processing == 14) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == 15) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == 16) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == 17) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
if (processing == kCANSA) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
//Cans A suppresses the crossfeed more, Cans B makes it louder
|
||||
|
||||
drySampleL += inputSampleR;
|
||||
|
|
@ -398,7 +392,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; inputSampleR = asin(inputSampleR);
|
||||
//ConsoleBuss processing
|
||||
break;
|
||||
case 18:
|
||||
case kTRICK:
|
||||
long double inputSample = (inputSampleL + inputSampleR) * 0.5;
|
||||
inputSampleL = -inputSample;
|
||||
inputSampleR = inputSample;
|
||||
|
|
@ -406,7 +400,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
}
|
||||
|
||||
//begin Dark
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL *= 32768.0; //or 16 bit option
|
||||
inputSampleR *= 32768.0; //or 16 bit option
|
||||
} else {
|
||||
|
|
@ -477,7 +471,7 @@ void Monitoring2::processReplacing(float **inputs, float **outputs, VstInt32 sam
|
|||
darkSampleR[0] = inputSampleR;
|
||||
//end Dark right
|
||||
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL /= 32768.0;
|
||||
inputSampleR /= 32768.0;
|
||||
} else {
|
||||
|
|
@ -519,8 +513,8 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
int allpasstemp;
|
||||
//for PeaksOnly
|
||||
biquad[0] = 0.0375/overallscale; biquad[1] = 0.1575; //define as AURAT, MONORAT, MONOLAT unless overridden
|
||||
if (processing == 9) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;}
|
||||
if (processing == 13) {biquad[0] = 0.1245/overallscale; biquad[1] = 0.46;}
|
||||
if (processing == kVINYL) {biquad[0] = 0.0385/overallscale; biquad[1] = 0.0825;}
|
||||
if (processing == kPHONE) {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;
|
||||
|
|
@ -541,16 +535,10 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
|
||||
switch (processing)
|
||||
{
|
||||
case 0:
|
||||
case 1:
|
||||
case kDKAD:
|
||||
case kDKCD:
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
inputSampleL *= 0.9549925859; // -0.2dB
|
||||
inputSampleR *= 0.9549925859; // -0.2dB
|
||||
//pad both 24 bit and 16 bit
|
||||
break;
|
||||
case 4:
|
||||
case kPEAK:
|
||||
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);
|
||||
//amplitude aspect
|
||||
|
|
@ -605,7 +593,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
inputSampleL *= 0.63679; inputSampleR *= 0.63679; //scale it to 0dB output at full blast
|
||||
//PeaksOnly
|
||||
break;
|
||||
case 5:
|
||||
case kSLEW:
|
||||
double trim;
|
||||
trim = 2.302585092994045684017991; //natural logarithm of 10
|
||||
long double slewSample; slewSample = (inputSampleL - lastSampleL)*trim;
|
||||
|
|
@ -618,7 +606,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
inputSampleR = slewSample;
|
||||
//SlewOnly
|
||||
break;
|
||||
case 6:
|
||||
case kSUBS:
|
||||
double iirAmount; iirAmount = (2250/44100.0) / overallscale;
|
||||
double gain; gain = 1.42;
|
||||
inputSampleL *= gain; inputSampleR *= gain; gain = ((gain-1)*0.75)+1;
|
||||
|
|
@ -779,25 +767,25 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
//SubsOnly
|
||||
break;
|
||||
case 7:
|
||||
case 8:
|
||||
case kMONO:
|
||||
case kSIDE:
|
||||
long double mid; mid = inputSampleL + inputSampleR;
|
||||
long double side; side = inputSampleL - inputSampleR;
|
||||
if (processing < 8) side = 0.0;
|
||||
if (processing < kSIDE) side = 0.0;
|
||||
else mid = 0.0; //mono monitoring, or side-only monitoring
|
||||
inputSampleL = (mid+side)/2.0;
|
||||
inputSampleR = (mid-side)/2.0;
|
||||
break;
|
||||
case 9:
|
||||
case 10:
|
||||
case 11:
|
||||
case 12:
|
||||
case 13:
|
||||
case kVINYL:
|
||||
case kAURAT:
|
||||
case kMONORAT:
|
||||
case kMONOLAT:
|
||||
case kPHONE:
|
||||
//Bandpass: changes in EQ are up in the variable defining, not here
|
||||
//7 Vinyl, 8 9 10 Aurat, 11 Phone
|
||||
if (processing == 11) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == 12) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == 13) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
if (processing == kMONORAT) {inputSampleR = (inputSampleL + inputSampleR)*0.5;inputSampleL = 0.0;}
|
||||
if (processing == kMONOLAT) {inputSampleL = (inputSampleL + inputSampleR)*0.5;inputSampleR = 0.0;}
|
||||
if (processing == kPHONE) {long double M; M = (inputSampleL + inputSampleR)*0.5; inputSampleL = M;inputSampleR = M;}
|
||||
|
||||
inputSampleL = sin(inputSampleL); inputSampleR = sin(inputSampleR);
|
||||
//encode Console5: good cleanness
|
||||
|
|
@ -818,14 +806,14 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
inputSampleL = asin(inputSampleL); inputSampleR = asin(inputSampleR);
|
||||
//amplitude aspect
|
||||
break;
|
||||
case 14:
|
||||
case 15:
|
||||
case 16:
|
||||
case 17:
|
||||
if (processing == 14) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == 15) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == 16) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == 17) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
case kCANSA:
|
||||
case kCANSB:
|
||||
case kCANSC:
|
||||
case kCANSD:
|
||||
if (processing == kCANSA) {inputSampleL *= 0.855; inputSampleR *= 0.855;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.748; inputSampleR *= 0.748;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.713; inputSampleR *= 0.713;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.680; inputSampleR *= 0.680;}
|
||||
//we do a volume compensation immediately to gain stage stuff cleanly
|
||||
inputSampleL = sin(inputSampleL);
|
||||
inputSampleR = sin(inputSampleR);
|
||||
|
|
@ -849,10 +837,10 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
else {inputSampleL += (aL[ax+1])*0.5; inputSampleR += (aR[ax+1])*0.5;}
|
||||
//a darkened Midiverb-style allpass
|
||||
|
||||
if (processing == 14) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == 15) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == 16) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == 17) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
if (processing == kCANSA) {inputSampleL *= 0.125; inputSampleR *= 0.125;}
|
||||
if (processing == kCANSB) {inputSampleL *= 0.25; inputSampleR *= 0.25;}
|
||||
if (processing == kCANSC) {inputSampleL *= 0.30; inputSampleR *= 0.30;}
|
||||
if (processing == kCANSD) {inputSampleL *= 0.35; inputSampleR *= 0.35;}
|
||||
//Cans A suppresses the crossfeed more, Cans B makes it louder
|
||||
|
||||
drySampleL += inputSampleR;
|
||||
|
|
@ -887,7 +875,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; inputSampleR = asin(inputSampleR);
|
||||
//ConsoleBuss processing
|
||||
break;
|
||||
case 18:
|
||||
case kTRICK:
|
||||
long double inputSample = (inputSampleL + inputSampleR) * 0.5;
|
||||
inputSampleL = -inputSample;
|
||||
inputSampleR = inputSample;
|
||||
|
|
@ -895,7 +883,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
}
|
||||
|
||||
//begin Dark
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL *= 32768.0; //or 16 bit option
|
||||
inputSampleR *= 32768.0; //or 16 bit option
|
||||
} else {
|
||||
|
|
@ -966,7 +954,7 @@ void Monitoring2::processDoubleReplacing(double **inputs, double **outputs, VstI
|
|||
darkSampleR[0] = inputSampleR;
|
||||
//end Dark right
|
||||
|
||||
if (processing == 1 || processing == 3) {
|
||||
if (processing == kDKCD) {
|
||||
inputSampleL /= 32768.0;
|
||||
inputSampleR /= 32768.0;
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue