mirror of
https://github.com/airwindows/airwindows.git
synced 2026-05-15 14:16:00 -06:00
SoftClock2
This commit is contained in:
parent
a7c74c86f0
commit
d27f470c07
243 changed files with 59417 additions and 7903 deletions
|
|
@ -271,6 +271,7 @@ add_airwindows_plugin(kPlateB)
|
|||
add_airwindows_plugin(kPlateC)
|
||||
add_airwindows_plugin(kPlateD)
|
||||
add_airwindows_plugin(kStation)
|
||||
add_airwindows_plugin(kWoodRoom)
|
||||
add_airwindows_plugin(LeadAmp)
|
||||
add_airwindows_plugin(LeftoMono)
|
||||
add_airwindows_plugin(LilAmp)
|
||||
|
|
@ -466,6 +467,7 @@ add_airwindows_plugin(VoiceTrick)
|
|||
add_airwindows_plugin(Weight)
|
||||
add_airwindows_plugin(Wider)
|
||||
add_airwindows_plugin(Wolfbot)
|
||||
add_airwindows_plugin(X2Buss)
|
||||
add_airwindows_plugin(XBandpass)
|
||||
add_airwindows_plugin(XHighpass)
|
||||
add_airwindows_plugin(XLowpass)
|
||||
|
|
|
|||
|
|
@ -23,12 +23,6 @@ ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) :
|
|||
I = 1.0;
|
||||
J = 0.5;
|
||||
K = 0.5;
|
||||
L = 0.0;
|
||||
M = 1.0;
|
||||
N = 0.0;
|
||||
O = 0.0;
|
||||
P = 0.5;
|
||||
Q = 0.5;
|
||||
|
||||
for (int x = 0; x < biq_total; x++) {
|
||||
highA[x] = 0.0;
|
||||
|
|
@ -51,38 +45,19 @@ ConsoleX2Buss::ConsoleX2Buss(audioMasterCallback audioMaster) :
|
|||
|
||||
for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;}
|
||||
bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0;
|
||||
bezCompS[bez_cycle] = 1.0; bezGate = 2.0;
|
||||
bezCompS[bez_cycle] = 1.0;
|
||||
//Dynamics2
|
||||
|
||||
for(int count = 0; count < 22; count++) {
|
||||
iirHPositionL[count] = 0.0;
|
||||
iirHAngleL[count] = 0.0;
|
||||
iirHPositionR[count] = 0.0;
|
||||
iirHAngleR[count] = 0.0;
|
||||
}
|
||||
hBypass = false;
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
for(int count = 0; count < 14; count++) {
|
||||
iirLPositionL[count] = 0.0;
|
||||
iirLAngleL[count] = 0.0;
|
||||
iirLPositionR[count] = 0.0;
|
||||
iirLAngleR[count] = 0.0;
|
||||
}
|
||||
lBypass = false;
|
||||
//Cabs2
|
||||
|
||||
for(int count = 0; count < dscBuf+2; count++) {
|
||||
dBaL[count] = 0.0;
|
||||
dBaR[count] = 0.0;
|
||||
}
|
||||
dBaPosL = 0.0;
|
||||
dBaPosR = 0.0;
|
||||
dBaXL = 1;
|
||||
dBaXR = 1;
|
||||
//Discontapeity
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
panA = 0.5; panB = 0.5;
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
|
|
@ -130,12 +105,6 @@ VstInt32 ConsoleX2Buss::getChunk (void** data, bool isPreset)
|
|||
chunkData[8] = I;
|
||||
chunkData[9] = J;
|
||||
chunkData[10] = K;
|
||||
chunkData[11] = L;
|
||||
chunkData[12] = M;
|
||||
chunkData[13] = N;
|
||||
chunkData[14] = O;
|
||||
chunkData[15] = P;
|
||||
chunkData[16] = Q;
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
|
@ -158,12 +127,6 @@ VstInt32 ConsoleX2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
|||
I = pinParameter(chunkData[8]);
|
||||
J = pinParameter(chunkData[9]);
|
||||
K = pinParameter(chunkData[10]);
|
||||
L = pinParameter(chunkData[11]);
|
||||
M = pinParameter(chunkData[12]);
|
||||
N = pinParameter(chunkData[13]);
|
||||
O = pinParameter(chunkData[14]);
|
||||
P = pinParameter(chunkData[15]);
|
||||
Q = pinParameter(chunkData[16]);
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
|
|
@ -184,12 +147,6 @@ void ConsoleX2Buss::setParameter(VstInt32 index, float value) {
|
|||
case kParamI: I = value; break;
|
||||
case kParamJ: J = value; break;
|
||||
case kParamK: K = value; break;
|
||||
case kParamL: L = value; break;
|
||||
case kParamM: M = value; break;
|
||||
case kParamN: N = value; break;
|
||||
case kParamO: O = value; break;
|
||||
case kParamP: P = value; break;
|
||||
case kParamQ: Q = value; break;
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
|
@ -207,12 +164,6 @@ float ConsoleX2Buss::getParameter(VstInt32 index) {
|
|||
case kParamI: return I; break;
|
||||
case kParamJ: return J; break;
|
||||
case kParamK: return K; break;
|
||||
case kParamL: return L; break;
|
||||
case kParamM: return M; break;
|
||||
case kParamN: return N; break;
|
||||
case kParamO: return O; break;
|
||||
case kParamP: return P; break;
|
||||
case kParamQ: return Q; break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} return 0.0; //we only need to update the relevant name, this is simple to manage
|
||||
}
|
||||
|
|
@ -228,14 +179,8 @@ void ConsoleX2Buss::getParameterName(VstInt32 index, char *text) {
|
|||
case kParamG: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "Release", kVstMaxParamStrLen); break;
|
||||
case kParamL: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break;
|
||||
case kParamN: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "More", kVstMaxParamStrLen); break;
|
||||
case kParamP: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break;
|
||||
case kParamQ: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this is our labels for displaying in the VST host
|
||||
}
|
||||
|
|
@ -253,12 +198,6 @@ void ConsoleX2Buss::getParameterDisplay(VstInt32 index, char *text) {
|
|||
case kParamI: float2string (I, text, kVstMaxParamStrLen); break;
|
||||
case kParamJ: float2string (J, text, kVstMaxParamStrLen); break;
|
||||
case kParamK: float2string (K, text, kVstMaxParamStrLen); break;
|
||||
case kParamL: float2string (L, text, kVstMaxParamStrLen); break;
|
||||
case kParamM: float2string (M, text, kVstMaxParamStrLen); break;
|
||||
case kParamN: float2string (N, text, kVstMaxParamStrLen); break;
|
||||
case kParamO: float2string (O, text, kVstMaxParamStrLen); break;
|
||||
case kParamP: float2string (P, text, kVstMaxParamStrLen); break;
|
||||
case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
|
@ -276,12 +215,6 @@ void ConsoleX2Buss::getParameterLabel(VstInt32 index, char *text) {
|
|||
case kParamI: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break;
|
||||
case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "+", kVstMaxParamStrLen); break;
|
||||
case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,15 +27,8 @@ enum {
|
|||
kParamI =8,
|
||||
kParamJ =9,
|
||||
kParamK =10,
|
||||
kParamL =11,
|
||||
kParamM =12,
|
||||
kParamN =13,
|
||||
kParamO =14,
|
||||
kParamP =15,
|
||||
kParamQ =16,
|
||||
kNumParameters = 17
|
||||
kNumParameters = 11
|
||||
}; //
|
||||
const int dscBuf = 256;
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
|
|
@ -80,12 +73,6 @@ private:
|
|||
float I;
|
||||
float J;
|
||||
float K;
|
||||
float L;
|
||||
float M;
|
||||
float N;
|
||||
float O;
|
||||
float P;
|
||||
float Q;
|
||||
|
||||
enum {
|
||||
biq_freq,
|
||||
|
|
@ -139,33 +126,25 @@ private:
|
|||
double bezCompF[bez_total];
|
||||
double bezMaxF;
|
||||
double bezCompS[bez_total];
|
||||
double bezGate;
|
||||
//Dynamics2
|
||||
|
||||
double iirHPositionL[23];
|
||||
double iirHAngleL[23];
|
||||
double iirHPositionR[23];
|
||||
double iirHAngleR[23];
|
||||
bool hBypass;
|
||||
double iirLPositionL[15];
|
||||
double iirLAngleL[15];
|
||||
double iirLPositionR[15];
|
||||
double iirLAngleR[15];
|
||||
bool lBypass;
|
||||
double lFreqA;
|
||||
double lFreqB; //the lowpass
|
||||
double hFreqA;
|
||||
double hFreqB; //the highpass
|
||||
//Cabs2
|
||||
|
||||
double dBaL[dscBuf+5];
|
||||
double dBaPosL;
|
||||
int dBaXL;
|
||||
double dBaR[dscBuf+5];
|
||||
double dBaPosR;
|
||||
int dBaXR;
|
||||
//Discontapeity
|
||||
|
||||
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double panA;
|
||||
double panB;
|
||||
double inTrimA;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (A-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
|
|
@ -44,8 +46,8 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/getSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -54,8 +56,8 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -64,97 +66,88 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-I, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-J, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-K,12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(L,4.0),sqrt(bezCThresh+1.0));
|
||||
double bezRez = pow(1.0-I, 12.360679774997898) / overallscale;
|
||||
double sloRez = pow(1.0-I,10.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez,0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.00001),1.0);
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(M,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(N,overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(O*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (O*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = P*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = Q*2.0;
|
||||
panA = panB; panB = J*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = K*2.0;
|
||||
//Console
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
|
|
@ -310,9 +303,6 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
//fourth stage of three crossovers is the exponential filters
|
||||
//SmoothEQ2
|
||||
|
||||
if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale);
|
||||
else bezGate = fmax(0.0, bezGate-(sloRez*sloRez));
|
||||
|
||||
if (bezCThresh > 0.0) {
|
||||
inputSampleL *= ((bezCThresh*0.5)+1.0);
|
||||
inputSampleR *= ((bezCThresh*0.5)+1.0);
|
||||
|
|
@ -325,21 +315,14 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
|
||||
if (bezCompF[bez_cycle] > 1.0) {
|
||||
bezCompF[bez_cycle] -= 1.0;
|
||||
|
||||
if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage,
|
||||
if (bezCompF[bez_SampL]<gate) bezCompF[bez_SampL] = 0.0; //not a bipolar audio signal
|
||||
bezCompF[bez_CL] = bezCompF[bez_BL];
|
||||
bezCompF[bez_BL] = bezCompF[bez_AL];
|
||||
bezCompF[bez_AL] = bezCompF[bez_SampL];
|
||||
bezCompF[bez_SampL] = 0.0;
|
||||
|
||||
if (bezMaxF < gate) bezCompF[bez_SampR] = bezMaxF/gate; //note: SampR is a control voltage,
|
||||
if (bezCompF[bez_SampR]<gate) bezCompF[bez_SampR] = 0.0; //not a bipolar audio signal
|
||||
bezCompF[bez_CR] = bezCompF[bez_BR];
|
||||
bezCompF[bez_BR] = bezCompF[bez_AR];
|
||||
bezCompF[bez_AR] = bezCompF[bez_SampR];
|
||||
bezCompF[bez_SampR] = 0.0;
|
||||
|
||||
bezMaxF = 0.0;
|
||||
}
|
||||
bezCompS[bez_cycle] += sloRez;
|
||||
|
|
@ -347,14 +330,10 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage
|
||||
if (bezCompS[bez_cycle] > 1.0) {
|
||||
bezCompS[bez_cycle] -= 1.0;
|
||||
|
||||
if (bezCompS[bez_SampL]<gate) bezCompS[bez_SampL] = 0.0;
|
||||
bezCompS[bez_CL] = bezCompS[bez_BL];
|
||||
bezCompS[bez_BL] = bezCompS[bez_AL];
|
||||
bezCompS[bez_AL] = bezCompS[bez_SampL];
|
||||
bezCompS[bez_SampL] = 0.0;
|
||||
|
||||
if (bezCompS[bez_SampR]<gate) bezCompS[bez_SampR] = 0.0;
|
||||
bezCompS[bez_CR] = bezCompS[bez_BR];
|
||||
bezCompS[bez_BR] = bezCompS[bez_AR];
|
||||
bezCompS[bez_AR] = bezCompS[bez_SampR];
|
||||
|
|
@ -379,73 +358,61 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;}
|
||||
//Dynamics2
|
||||
|
||||
const double temp = (double)sampleFrames/inFramesToProcess;
|
||||
const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp));
|
||||
if (hFreq > 0.0) {
|
||||
double lowSampleL = inputSampleL;
|
||||
double lowSampleR = inputSampleR;
|
||||
for(int count = 0; count < 21; count++) {
|
||||
iirHAngleL[count] = (iirHAngleL[count]*(1.0-hFreq))+((lowSampleL-iirHPositionL[count])*hFreq);
|
||||
lowSampleL = ((iirHPositionL[count]+(iirHAngleL[count]*hFreq))*(1.0-hFreq))+(lowSampleL*hFreq);
|
||||
iirHPositionL[count] = ((iirHPositionL[count]+(iirHAngleL[count]*hFreq))*(1.0-hFreq))+(lowSampleL*hFreq);
|
||||
inputSampleL -= (lowSampleL * (1.0/21.0));//left
|
||||
iirHAngleR[count] = (iirHAngleR[count]*(1.0-hFreq))+((lowSampleR-iirHPositionR[count])*hFreq);
|
||||
lowSampleR = ((iirHPositionR[count]+(iirHAngleR[count]*hFreq))*(1.0-hFreq))+(lowSampleR*hFreq);
|
||||
iirHPositionR[count] = ((iirHPositionR[count]+(iirHAngleR[count]*hFreq))*(1.0-hFreq))+(lowSampleR*hFreq);
|
||||
inputSampleR -= (lowSampleR * (1.0/21.0));//right
|
||||
} //the highpass
|
||||
hBypass = false;
|
||||
} else {
|
||||
if (!hBypass) {
|
||||
hBypass = true;
|
||||
for(int count = 0; count < 22; count++) {
|
||||
iirHPositionL[count] = 0.0;
|
||||
iirHAngleL[count] = 0.0;
|
||||
iirHPositionR[count] = 0.0;
|
||||
iirHAngleR[count] = 0.0;
|
||||
}
|
||||
} //blank out highpass if jut switched off
|
||||
}
|
||||
const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp));
|
||||
if (lFreq < 1.0) {
|
||||
for(int count = 0; count < 13; count++) {
|
||||
iirLAngleL[count] = (iirLAngleL[count]*(1.0-lFreq))+((inputSampleL-iirLPositionL[count])*lFreq);
|
||||
inputSampleL = ((iirLPositionL[count]+(iirLAngleL[count]*lFreq))*(1.0-lFreq))+(inputSampleL*lFreq);
|
||||
iirLPositionL[count] = ((iirLPositionL[count]+(iirLAngleL[count]*lFreq))*(1.0-lFreq))+(inputSampleL*lFreq);//left
|
||||
iirLAngleR[count] = (iirLAngleR[count]*(1.0-lFreq))+((inputSampleR-iirLPositionR[count])*lFreq);
|
||||
inputSampleR = ((iirLPositionR[count]+(iirLAngleR[count]*lFreq))*(1.0-lFreq))+(inputSampleR*lFreq);
|
||||
iirLPositionR[count] = ((iirLPositionR[count]+(iirLAngleR[count]*lFreq))*(1.0-lFreq))+(inputSampleR*lFreq);//right
|
||||
} //the lowpass
|
||||
lBypass = false;
|
||||
} else {
|
||||
if (!lBypass) {
|
||||
lBypass = true;
|
||||
for(int count = 0; count < 14; count++) {
|
||||
iirLPositionL[count] = 0.0;
|
||||
iirLAngleL[count] = 0.0;
|
||||
iirLPositionR[count] = 0.0;
|
||||
iirLAngleR[count] = 0.0;
|
||||
}
|
||||
} //blank out lowpass if just switched off
|
||||
}
|
||||
//Cabs2
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
|
|
@ -458,21 +425,11 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
inputSampleL *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
//begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
|
|
@ -485,22 +442,8 @@ void ConsoleX2Buss::processReplacing(float **inputs, float **outputs, VstInt32 s
|
|||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
inputSampleR *= 0.92;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
|
|
@ -532,6 +475,8 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (A-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
|
|
@ -558,8 +503,8 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/getSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -568,8 +513,8 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -578,97 +523,88 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-I, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-J, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-K,12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(L,4.0),sqrt(bezCThresh+1.0));
|
||||
double bezRez = pow(1.0-I, 12.360679774997898) / overallscale;
|
||||
double sloRez = pow(1.0-I,10.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez,0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.00001),1.0);
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(M,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(N,overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(O*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (O*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = P*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = Q*2.0;
|
||||
panA = panB; panB = J*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = K*2.0;
|
||||
//Console
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
|
|
@ -824,9 +760,6 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
//fourth stage of three crossovers is the exponential filters
|
||||
//SmoothEQ2
|
||||
|
||||
if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale);
|
||||
else bezGate = fmax(0.0, bezGate-(sloRez*sloRez));
|
||||
|
||||
if (bezCThresh > 0.0) {
|
||||
inputSampleL *= ((bezCThresh*0.5)+1.0);
|
||||
inputSampleR *= ((bezCThresh*0.5)+1.0);
|
||||
|
|
@ -839,21 +772,14 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
|
||||
if (bezCompF[bez_cycle] > 1.0) {
|
||||
bezCompF[bez_cycle] -= 1.0;
|
||||
|
||||
if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage,
|
||||
if (bezCompF[bez_SampL]<gate) bezCompF[bez_SampL] = 0.0; //not a bipolar audio signal
|
||||
bezCompF[bez_CL] = bezCompF[bez_BL];
|
||||
bezCompF[bez_BL] = bezCompF[bez_AL];
|
||||
bezCompF[bez_AL] = bezCompF[bez_SampL];
|
||||
bezCompF[bez_SampL] = 0.0;
|
||||
|
||||
if (bezMaxF < gate) bezCompF[bez_SampR] = bezMaxF/gate; //note: SampR is a control voltage,
|
||||
if (bezCompF[bez_SampR]<gate) bezCompF[bez_SampR] = 0.0; //not a bipolar audio signal
|
||||
bezCompF[bez_CR] = bezCompF[bez_BR];
|
||||
bezCompF[bez_BR] = bezCompF[bez_AR];
|
||||
bezCompF[bez_AR] = bezCompF[bez_SampR];
|
||||
bezCompF[bez_SampR] = 0.0;
|
||||
|
||||
bezMaxF = 0.0;
|
||||
}
|
||||
bezCompS[bez_cycle] += sloRez;
|
||||
|
|
@ -861,14 +787,10 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage
|
||||
if (bezCompS[bez_cycle] > 1.0) {
|
||||
bezCompS[bez_cycle] -= 1.0;
|
||||
|
||||
if (bezCompS[bez_SampL]<gate) bezCompS[bez_SampL] = 0.0;
|
||||
bezCompS[bez_CL] = bezCompS[bez_BL];
|
||||
bezCompS[bez_BL] = bezCompS[bez_AL];
|
||||
bezCompS[bez_AL] = bezCompS[bez_SampL];
|
||||
bezCompS[bez_SampL] = 0.0;
|
||||
|
||||
if (bezCompS[bez_SampR]<gate) bezCompS[bez_SampR] = 0.0;
|
||||
bezCompS[bez_CR] = bezCompS[bez_BR];
|
||||
bezCompS[bez_BR] = bezCompS[bez_AR];
|
||||
bezCompS[bez_AR] = bezCompS[bez_SampR];
|
||||
|
|
@ -893,73 +815,61 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;}
|
||||
//Dynamics2
|
||||
|
||||
const double temp = (double)sampleFrames/inFramesToProcess;
|
||||
const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp));
|
||||
if (hFreq > 0.0) {
|
||||
double lowSampleL = inputSampleL;
|
||||
double lowSampleR = inputSampleR;
|
||||
for(int count = 0; count < 21; count++) {
|
||||
iirHAngleL[count] = (iirHAngleL[count]*(1.0-hFreq))+((lowSampleL-iirHPositionL[count])*hFreq);
|
||||
lowSampleL = ((iirHPositionL[count]+(iirHAngleL[count]*hFreq))*(1.0-hFreq))+(lowSampleL*hFreq);
|
||||
iirHPositionL[count] = ((iirHPositionL[count]+(iirHAngleL[count]*hFreq))*(1.0-hFreq))+(lowSampleL*hFreq);
|
||||
inputSampleL -= (lowSampleL * (1.0/21.0));//left
|
||||
iirHAngleR[count] = (iirHAngleR[count]*(1.0-hFreq))+((lowSampleR-iirHPositionR[count])*hFreq);
|
||||
lowSampleR = ((iirHPositionR[count]+(iirHAngleR[count]*hFreq))*(1.0-hFreq))+(lowSampleR*hFreq);
|
||||
iirHPositionR[count] = ((iirHPositionR[count]+(iirHAngleR[count]*hFreq))*(1.0-hFreq))+(lowSampleR*hFreq);
|
||||
inputSampleR -= (lowSampleR * (1.0/21.0));//right
|
||||
} //the highpass
|
||||
hBypass = false;
|
||||
} else {
|
||||
if (!hBypass) {
|
||||
hBypass = true;
|
||||
for(int count = 0; count < 22; count++) {
|
||||
iirHPositionL[count] = 0.0;
|
||||
iirHAngleL[count] = 0.0;
|
||||
iirHPositionR[count] = 0.0;
|
||||
iirHAngleR[count] = 0.0;
|
||||
}
|
||||
} //blank out highpass if jut switched off
|
||||
}
|
||||
const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp));
|
||||
if (lFreq < 1.0) {
|
||||
for(int count = 0; count < 13; count++) {
|
||||
iirLAngleL[count] = (iirLAngleL[count]*(1.0-lFreq))+((inputSampleL-iirLPositionL[count])*lFreq);
|
||||
inputSampleL = ((iirLPositionL[count]+(iirLAngleL[count]*lFreq))*(1.0-lFreq))+(inputSampleL*lFreq);
|
||||
iirLPositionL[count] = ((iirLPositionL[count]+(iirLAngleL[count]*lFreq))*(1.0-lFreq))+(inputSampleL*lFreq);//left
|
||||
iirLAngleR[count] = (iirLAngleR[count]*(1.0-lFreq))+((inputSampleR-iirLPositionR[count])*lFreq);
|
||||
inputSampleR = ((iirLPositionR[count]+(iirLAngleR[count]*lFreq))*(1.0-lFreq))+(inputSampleR*lFreq);
|
||||
iirLPositionR[count] = ((iirLPositionR[count]+(iirLAngleR[count]*lFreq))*(1.0-lFreq))+(inputSampleR*lFreq);//right
|
||||
} //the lowpass
|
||||
lBypass = false;
|
||||
} else {
|
||||
if (!lBypass) {
|
||||
lBypass = true;
|
||||
for(int count = 0; count < 14; count++) {
|
||||
iirLPositionL[count] = 0.0;
|
||||
iirLAngleL[count] = 0.0;
|
||||
iirLPositionR[count] = 0.0;
|
||||
iirLAngleR[count] = 0.0;
|
||||
}
|
||||
} //blank out lowpass if just switched off
|
||||
}
|
||||
//Cabs2
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
|
|
@ -972,21 +882,11 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
inputSampleL *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
//begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
|
|
@ -999,23 +899,10 @@ void ConsoleX2Buss::processDoubleReplacing(double **inputs, double **outputs, Vs
|
|||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
inputSampleR *= 0.92;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
//begin 64 bit stereo floating point dither
|
||||
//int expon; frexp((double)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
|
|
|
|||
|
|
@ -12,23 +12,24 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C
|
|||
ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.5;
|
||||
B = 0.5;
|
||||
A = 0.25;
|
||||
B = 0.0;
|
||||
C = 0.5;
|
||||
D = 0.5;
|
||||
E = 0.5;
|
||||
F = 0.5;
|
||||
G = 0.5;
|
||||
H = 0.5;
|
||||
I = 1.0;
|
||||
I = 0.5;
|
||||
J = 0.5;
|
||||
K = 0.5;
|
||||
L = 0.0;
|
||||
M = 1.0;
|
||||
K = 1.0;
|
||||
L = 0.5;
|
||||
M = 0.5;
|
||||
N = 0.0;
|
||||
O = 0.0;
|
||||
P = 0.5;
|
||||
O = 1.0;
|
||||
P = 0.0;
|
||||
Q = 0.5;
|
||||
R = 0.5;
|
||||
|
||||
for (int x = 0; x < biq_total; x++) {
|
||||
highA[x] = 0.0;
|
||||
|
|
@ -81,6 +82,16 @@ ConsoleX2Channel::ConsoleX2Channel(audioMasterCallback audioMaster) :
|
|||
dBaXR = 1;
|
||||
//Discontapeity
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
panA = 0.5; panB = 0.5;
|
||||
|
|
@ -136,6 +147,7 @@ VstInt32 ConsoleX2Channel::getChunk (void** data, bool isPreset)
|
|||
chunkData[14] = O;
|
||||
chunkData[15] = P;
|
||||
chunkData[16] = Q;
|
||||
chunkData[17] = R;
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
|
@ -164,6 +176,7 @@ VstInt32 ConsoleX2Channel::setChunk (void* data, VstInt32 byteSize, bool isPrese
|
|||
O = pinParameter(chunkData[14]);
|
||||
P = pinParameter(chunkData[15]);
|
||||
Q = pinParameter(chunkData[16]);
|
||||
R = pinParameter(chunkData[17]);
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
|
|
@ -190,6 +203,7 @@ void ConsoleX2Channel::setParameter(VstInt32 index, float value) {
|
|||
case kParamO: O = value; break;
|
||||
case kParamP: P = value; break;
|
||||
case kParamQ: Q = value; break;
|
||||
case kParamR: R = value; break;
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
|
@ -213,36 +227,38 @@ float ConsoleX2Channel::getParameter(VstInt32 index) {
|
|||
case kParamO: return O; break;
|
||||
case kParamP: return P; break;
|
||||
case kParamQ: return Q; break;
|
||||
case kParamR: return R; break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} return 0.0; //we only need to update the relevant name, this is simple to manage
|
||||
}
|
||||
|
||||
void ConsoleX2Channel::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "High", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "Release", kVstMaxParamStrLen); break;
|
||||
case kParamL: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break;
|
||||
case kParamN: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "More", kVstMaxParamStrLen); break;
|
||||
case kParamP: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break;
|
||||
case kParamQ: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break;
|
||||
case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break;
|
||||
case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break;
|
||||
case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break;
|
||||
case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break;
|
||||
case kParamQ: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break;
|
||||
case kParamR: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this is our labels for displaying in the VST host
|
||||
}
|
||||
|
||||
void ConsoleX2Channel::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
|
||||
case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string (B, text, kVstMaxParamStrLen); break;
|
||||
case kParamC: float2string (C, text, kVstMaxParamStrLen); break;
|
||||
case kParamD: float2string (D, text, kVstMaxParamStrLen); break;
|
||||
|
|
@ -259,29 +275,31 @@ void ConsoleX2Channel::getParameterDisplay(VstInt32 index, char *text) {
|
|||
case kParamO: float2string (O, text, kVstMaxParamStrLen); break;
|
||||
case kParamP: float2string (P, text, kVstMaxParamStrLen); break;
|
||||
case kParamQ: float2string (Q, text, kVstMaxParamStrLen); break;
|
||||
case kParamR: float2string (R, text, kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
||||
void ConsoleX2Channel::getParameterLabel(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "eq", kVstMaxParamStrLen); break;
|
||||
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "freq", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break;
|
||||
case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "+", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break;
|
||||
case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamR: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,7 +33,8 @@ enum {
|
|||
kParamO =14,
|
||||
kParamP =15,
|
||||
kParamQ =16,
|
||||
kNumParameters = 17
|
||||
kParamR =17,
|
||||
kNumParameters = 18
|
||||
}; //
|
||||
const int dscBuf = 256;
|
||||
|
||||
|
|
@ -86,6 +87,7 @@ private:
|
|||
float O;
|
||||
float P;
|
||||
float Q;
|
||||
float R;
|
||||
|
||||
enum {
|
||||
biq_freq,
|
||||
|
|
@ -166,6 +168,23 @@ private:
|
|||
int dBaXR;
|
||||
//Discontapeity
|
||||
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double panA;
|
||||
double panB;
|
||||
double inTrimA;
|
||||
|
|
|
|||
|
|
@ -18,20 +18,33 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (A-0.5)*2.0;
|
||||
double moreTapeHack = (B*2.0)+1.0;
|
||||
switch ((int)(A*4.0)){
|
||||
case 0: moreTapeHack *= 0.5; break;
|
||||
case 1: break;
|
||||
case 2: moreTapeHack *= 2.0; break;
|
||||
case 3: moreTapeHack *= 4.0; break;
|
||||
case 4: moreTapeHack *= 8.0; break;
|
||||
}
|
||||
double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001);
|
||||
//Discontapeity
|
||||
|
||||
double trebleGain = (C-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (B-0.5)*2.0;
|
||||
double highmidGain = (D-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (C-0.5)*2.0;
|
||||
double lowmidGain = (E-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (D-0.5)*2.0;
|
||||
double bassGain = (F-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = E-0.5;
|
||||
double highmidRef = F-0.5;
|
||||
double lowmidRef = G-0.5;
|
||||
double bassRef = H-0.5;
|
||||
double trebleRef = G-0.5;
|
||||
double highmidRef = H-0.5;
|
||||
double lowmidRef = I-0.5;
|
||||
double bassRef = J-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
|
@ -44,8 +57,8 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/getSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -54,8 +67,8 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -64,97 +77,93 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-I, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-J, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-K,12.0) / overallscale;
|
||||
double bezCThresh = pow(1.0-K, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-L, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-M,12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(L,4.0),sqrt(bezCThresh+1.0));
|
||||
double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0));
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(M,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(N,overallscale+2.0); //the highpass
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(O*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (O*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = P*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = Q*2.0;
|
||||
panA = panB; panB = Q*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = R*2.0;
|
||||
//Console
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
|
|
@ -164,6 +173,99 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3
|
|||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreTapeHack;
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreTapeHack;
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
|
|
@ -423,62 +525,7 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3
|
|||
} //blank out lowpass if just switched off
|
||||
}
|
||||
//Cabs2
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
|
|
@ -486,19 +533,16 @@ void ConsoleX2Channel::processReplacing(float **inputs, float **outputs, VstInt3
|
|||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 0.763932022500211;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
inputSampleL *= 0.618033988749895;
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
else if (inputSampleL > 0.0) inputSampleL = -expm1((log1p(-inputSampleL) * 1.618033988749895));
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
else if (inputSampleL < 0.0) inputSampleL = expm1((log1p(inputSampleL) * 1.618033988749895));
|
||||
|
||||
inputSampleR *= 0.618033988749895;
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
else if (inputSampleR > 0.0) inputSampleR = -expm1((log1p(-inputSampleR) * 1.618033988749895));
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
|
|
@ -534,20 +578,33 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (A-0.5)*2.0;
|
||||
double moreTapeHack = (B*2.0)+1.0;
|
||||
switch ((int)(A*4.0)){
|
||||
case 0: moreTapeHack *= 0.5; break;
|
||||
case 1: break;
|
||||
case 2: moreTapeHack *= 2.0; break;
|
||||
case 3: moreTapeHack *= 4.0; break;
|
||||
case 4: moreTapeHack *= 8.0; break;
|
||||
}
|
||||
double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001);
|
||||
//Discontapeity
|
||||
|
||||
double trebleGain = (C-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (B-0.5)*2.0;
|
||||
double highmidGain = (D-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (C-0.5)*2.0;
|
||||
double lowmidGain = (E-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (D-0.5)*2.0;
|
||||
double bassGain = (F-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = E-0.5;
|
||||
double highmidRef = F-0.5;
|
||||
double lowmidRef = G-0.5;
|
||||
double bassRef = H-0.5;
|
||||
double trebleRef = G-0.5;
|
||||
double highmidRef = H-0.5;
|
||||
double lowmidRef = I-0.5;
|
||||
double bassRef = J-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
|
@ -560,8 +617,8 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/getSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -570,8 +627,8 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -580,97 +637,93 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-I, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-J, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-K,12.0) / overallscale;
|
||||
double bezCThresh = pow(1.0-K, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-L, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-M,12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(L,4.0),sqrt(bezCThresh+1.0));
|
||||
double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0));
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(M,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(N,overallscale+2.0); //the highpass
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(O*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (O*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = P*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = Q*2.0;
|
||||
panA = panB; panB = Q*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = R*2.0;
|
||||
//Console
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
|
|
@ -680,6 +733,99 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreTapeHack;
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreTapeHack;
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
|
|
@ -940,61 +1086,6 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
}
|
||||
//Cabs2
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
|
|
@ -1002,19 +1093,16 @@ void ConsoleX2Channel::processDoubleReplacing(double **inputs, double **outputs,
|
|||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 0.763932022500211;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
inputSampleL *= 0.618033988749895;
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
else if (inputSampleL > 0.0) inputSampleL = -expm1((log1p(-inputSampleL) * 1.618033988749895));
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
else if (inputSampleL < 0.0) inputSampleL = expm1((log1p(inputSampleL) * 1.618033988749895));
|
||||
|
||||
inputSampleR *= 0.618033988749895;
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
else if (inputSampleR > 0.0) inputSampleR = -expm1((log1p(-inputSampleR) * 1.618033988749895));
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
|
|
|
|||
|
|
@ -12,22 +12,22 @@ AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new C
|
|||
ConsoleX2Pre::ConsoleX2Pre(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.5;
|
||||
B = 0.5;
|
||||
A = 0.25;
|
||||
B = 0.0;
|
||||
C = 0.5;
|
||||
D = 0.5;
|
||||
E = 0.5;
|
||||
F = 0.5;
|
||||
G = 0.5;
|
||||
H = 0.5;
|
||||
I = 1.0;
|
||||
I = 0.5;
|
||||
J = 0.5;
|
||||
K = 0.5;
|
||||
L = 0.0;
|
||||
M = 1.0;
|
||||
K = 1.0;
|
||||
L = 0.5;
|
||||
M = 0.5;
|
||||
N = 0.0;
|
||||
O = 0.0;
|
||||
P = 0.5;
|
||||
O = 1.0;
|
||||
P = 0.0;
|
||||
Q = 0.5;
|
||||
|
||||
for (int x = 0; x < biq_total; x++) {
|
||||
|
|
@ -81,9 +81,18 @@ ConsoleX2Pre::ConsoleX2Pre(audioMasterCallback audioMaster) :
|
|||
dBaXR = 1;
|
||||
//Discontapeity
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
panA = 0.5; panB = 0.5;
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
|
|
@ -219,22 +228,22 @@ float ConsoleX2Pre::getParameter(VstInt32 index) {
|
|||
|
||||
void ConsoleX2Pre::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "High", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "Release", kVstMaxParamStrLen); break;
|
||||
case kParamL: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break;
|
||||
case kParamN: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "More", kVstMaxParamStrLen); break;
|
||||
case kParamP: vst_strncpy (text, "Pan", kVstMaxParamStrLen); break;
|
||||
case kParamA: vst_strncpy (text, "Trim", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "More", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "High", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break;
|
||||
case kParamL: vst_strncpy (text, "Attack", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "Release", kVstMaxParamStrLen); break;
|
||||
case kParamN: vst_strncpy (text, "Gate", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "Lowpass", kVstMaxParamStrLen); break;
|
||||
case kParamP: vst_strncpy (text, "Hipass", kVstMaxParamStrLen); break;
|
||||
case kParamQ: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this is our labels for displaying in the VST host
|
||||
|
|
@ -242,7 +251,7 @@ void ConsoleX2Pre::getParameterName(VstInt32 index, char *text) {
|
|||
|
||||
void ConsoleX2Pre::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
|
||||
case kParamA: int2string ((int)(A*4.0), text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string (B, text, kVstMaxParamStrLen); break;
|
||||
case kParamC: float2string (C, text, kVstMaxParamStrLen); break;
|
||||
case kParamD: float2string (D, text, kVstMaxParamStrLen); break;
|
||||
|
|
@ -265,21 +274,21 @@ void ConsoleX2Pre::getParameterDisplay(VstInt32 index, char *text) {
|
|||
|
||||
void ConsoleX2Pre::getParameterLabel(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "eq", kVstMaxParamStrLen); break;
|
||||
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "eq", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "freq", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "freq", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamK: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break;
|
||||
case kParamL: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break;
|
||||
case kParamM: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamN: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "+", kVstMaxParamStrLen); break;
|
||||
case kParamO: vst_strncpy (text, "fltr", kVstMaxParamStrLen); break;
|
||||
case kParamP: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamQ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
|
|
|
|||
|
|
@ -166,8 +166,23 @@ private:
|
|||
int dBaXR;
|
||||
//Discontapeity
|
||||
|
||||
double panA;
|
||||
double panB;
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double inTrimA;
|
||||
double inTrimB;
|
||||
|
||||
|
|
|
|||
|
|
@ -18,20 +18,33 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (A-0.5)*2.0;
|
||||
double moreTapeHack = (B*2.0)+1.0;
|
||||
switch ((int)(A*4.0)){
|
||||
case 0: moreTapeHack *= 0.5; break;
|
||||
case 1: break;
|
||||
case 2: moreTapeHack *= 2.0; break;
|
||||
case 3: moreTapeHack *= 4.0; break;
|
||||
case 4: moreTapeHack *= 8.0; break;
|
||||
}
|
||||
double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001);
|
||||
//Discontapeity
|
||||
|
||||
double trebleGain = (C-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (B-0.5)*2.0;
|
||||
double highmidGain = (D-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (C-0.5)*2.0;
|
||||
double lowmidGain = (E-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (D-0.5)*2.0;
|
||||
double bassGain = (F-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = E-0.5;
|
||||
double highmidRef = F-0.5;
|
||||
double lowmidRef = G-0.5;
|
||||
double bassRef = H-0.5;
|
||||
double trebleRef = G-0.5;
|
||||
double highmidRef = H-0.5;
|
||||
double lowmidRef = I-0.5;
|
||||
double bassRef = J-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
|
@ -44,8 +57,8 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/getSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -54,8 +67,8 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -64,96 +77,91 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-I, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-J, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-K,12.0) / overallscale;
|
||||
double bezCThresh = pow(1.0-K, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-L, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-M,12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(L,4.0),sqrt(bezCThresh+1.0));
|
||||
double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0));
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(M,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(N,overallscale+2.0); //the highpass
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(O*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (O*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = P*1.57079633;
|
||||
|
||||
inTrimA = inTrimB; inTrimB = Q*2.0;
|
||||
//Console
|
||||
|
||||
|
|
@ -164,6 +172,101 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa
|
|||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreTapeHack;
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreTapeHack;
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
|
|
@ -423,72 +526,13 @@ void ConsoleX2Pre::processReplacing(float **inputs, float **outputs, VstInt32 sa
|
|||
} //blank out lowpass if just switched off
|
||||
}
|
||||
//Cabs2
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
|
||||
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
inputSampleL = inputSampleL * gain;
|
||||
inputSampleR = inputSampleR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
|
|
@ -521,20 +565,33 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double moreTapeHack = (B*2.0)+1.0;
|
||||
switch ((int)(A*4.0)){
|
||||
case 0: moreTapeHack *= 0.5; break;
|
||||
case 1: break;
|
||||
case 2: moreTapeHack *= 2.0; break;
|
||||
case 3: moreTapeHack *= 4.0; break;
|
||||
case 4: moreTapeHack *= 8.0; break;
|
||||
}
|
||||
double moreDiscontinuity = fmax(pow(B*0.42,3.0)*overallscale,0.00001);
|
||||
//Discontapeity
|
||||
|
||||
double trebleGain = (A-0.5)*2.0;
|
||||
double trebleGain = (C-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (B-0.5)*2.0;
|
||||
double highmidGain = (D-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (C-0.5)*2.0;
|
||||
double lowmidGain = (E-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (D-0.5)*2.0;
|
||||
double bassGain = (F-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = E-0.5;
|
||||
double highmidRef = F-0.5;
|
||||
double lowmidRef = G-0.5;
|
||||
double bassRef = H-0.5;
|
||||
double trebleRef = G-0.5;
|
||||
double highmidRef = H-0.5;
|
||||
double lowmidRef = I-0.5;
|
||||
double bassRef = J-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
|
@ -547,8 +604,8 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/getSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -557,8 +614,8 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -567,96 +624,91 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/getSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-I, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-J, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-K,12.0) / overallscale;
|
||||
double bezCThresh = pow(1.0-K, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-L, 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-M,12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(L,4.0),sqrt(bezCThresh+1.0));
|
||||
double gate = pow(pow(N,4.0),sqrt(bezCThresh+1.0));
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(M,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(N,overallscale+2.0); //the highpass
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(O,0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(P,overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(O*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (O*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = P*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = Q*2.0;
|
||||
//Console
|
||||
|
||||
|
|
@ -666,6 +718,101 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst
|
|||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreTapeHack;
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreTapeHack;
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
|
|
@ -927,73 +1074,14 @@ void ConsoleX2Pre::processDoubleReplacing(double **inputs, double **outputs, Vst
|
|||
}
|
||||
//Cabs2
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
inputSampleL = inputSampleL * gain;
|
||||
inputSampleR = inputSampleR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
|
||||
//begin 64 bit stereo floating point dither
|
||||
//int expon; frexp((double)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
|
|
|
|||
228
plugins/LinuxVST/src/X2Buss/X2Buss.cpp
Executable file
228
plugins/LinuxVST/src/X2Buss/X2Buss.cpp
Executable file
|
|
@ -0,0 +1,228 @@
|
|||
/* ========================================
|
||||
* X2Buss - X2Buss.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __X2Buss_H
|
||||
#include "X2Buss.h"
|
||||
#endif
|
||||
|
||||
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new X2Buss(audioMaster);}
|
||||
|
||||
X2Buss::X2Buss(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.5;
|
||||
B = 0.5;
|
||||
C = 0.5;
|
||||
D = 0.5;
|
||||
E = 0.5;
|
||||
F = 0.5;
|
||||
G = 0.5;
|
||||
H = 0.5;
|
||||
I = 1.0;
|
||||
J = 0.5;
|
||||
|
||||
for (int x = 0; x < biq_total; x++) {
|
||||
highA[x] = 0.0;
|
||||
highB[x] = 0.0;
|
||||
highC[x] = 0.0;
|
||||
midA[x] = 0.0;
|
||||
midB[x] = 0.0;
|
||||
midC[x] = 0.0;
|
||||
lowA[x] = 0.0;
|
||||
lowB[x] = 0.0;
|
||||
lowC[x] = 0.0;
|
||||
}
|
||||
highLIIR = 0.0;
|
||||
highRIIR = 0.0;
|
||||
midLIIR = 0.0;
|
||||
midRIIR = 0.0;
|
||||
lowLIIR = 0.0;
|
||||
lowRIIR = 0.0;
|
||||
//SmoothEQ2
|
||||
|
||||
for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;}
|
||||
bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0;
|
||||
bezCompS[bez_cycle] = 1.0;
|
||||
//Dynamics2
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
//this is reset: values being initialized only once. Startup values, whatever they are.
|
||||
|
||||
_canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect.
|
||||
_canDo.insert("plugAsSend"); // plug-in can be used as a send effect.
|
||||
_canDo.insert("x2in2out");
|
||||
setNumInputs(kNumInputs);
|
||||
setNumOutputs(kNumOutputs);
|
||||
setUniqueID(kUniqueId);
|
||||
canProcessReplacing(); // supports output replacing
|
||||
canDoubleReplacing(); // supports double precision processing
|
||||
programsAreChunks(true);
|
||||
vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name
|
||||
}
|
||||
|
||||
X2Buss::~X2Buss() {}
|
||||
VstInt32 X2Buss::getVendorVersion () {return 1000;}
|
||||
void X2Buss::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
|
||||
void X2Buss::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);}
|
||||
//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than
|
||||
//trying to do versioning and preventing people from using older versions. Maybe they like the old one!
|
||||
|
||||
static float pinParameter(float data)
|
||||
{
|
||||
if (data < 0.0f) return 0.0f;
|
||||
if (data > 1.0f) return 1.0f;
|
||||
return data;
|
||||
}
|
||||
|
||||
VstInt32 X2Buss::getChunk (void** data, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
|
||||
chunkData[0] = A;
|
||||
chunkData[1] = B;
|
||||
chunkData[2] = C;
|
||||
chunkData[3] = D;
|
||||
chunkData[4] = E;
|
||||
chunkData[5] = F;
|
||||
chunkData[6] = G;
|
||||
chunkData[7] = H;
|
||||
chunkData[8] = I;
|
||||
chunkData[9] = J;
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
||||
*data = chunkData;
|
||||
return kNumParameters * sizeof(float);
|
||||
}
|
||||
|
||||
VstInt32 X2Buss::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)data;
|
||||
A = pinParameter(chunkData[0]);
|
||||
B = pinParameter(chunkData[1]);
|
||||
C = pinParameter(chunkData[2]);
|
||||
D = pinParameter(chunkData[3]);
|
||||
E = pinParameter(chunkData[4]);
|
||||
F = pinParameter(chunkData[5]);
|
||||
G = pinParameter(chunkData[6]);
|
||||
H = pinParameter(chunkData[7]);
|
||||
I = pinParameter(chunkData[8]);
|
||||
J = pinParameter(chunkData[9]);
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
code from setParameter() here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void X2Buss::setParameter(VstInt32 index, float value) {
|
||||
switch (index) {
|
||||
case kParamA: A = value; break;
|
||||
case kParamB: B = value; break;
|
||||
case kParamC: C = value; break;
|
||||
case kParamD: D = value; break;
|
||||
case kParamE: E = value; break;
|
||||
case kParamF: F = value; break;
|
||||
case kParamG: G = value; break;
|
||||
case kParamH: H = value; break;
|
||||
case kParamI: I = value; break;
|
||||
case kParamJ: J = value; break;
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
float X2Buss::getParameter(VstInt32 index) {
|
||||
switch (index) {
|
||||
case kParamA: return A; break;
|
||||
case kParamB: return B; break;
|
||||
case kParamC: return C; break;
|
||||
case kParamD: return D; break;
|
||||
case kParamE: return E; break;
|
||||
case kParamF: return F; break;
|
||||
case kParamG: return G; break;
|
||||
case kParamH: return H; break;
|
||||
case kParamI: return I; break;
|
||||
case kParamJ: return J; break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} return 0.0; //we only need to update the relevant name, this is simple to manage
|
||||
}
|
||||
|
||||
void X2Buss::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "High", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "HMid", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "LMid", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "Bass", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "HighF", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "HMidF", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "LMidF", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "BassF", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "Thresh", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "Fader", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this is our labels for displaying in the VST host
|
||||
}
|
||||
|
||||
void X2Buss::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string (B, text, kVstMaxParamStrLen); break;
|
||||
case kParamC: float2string (C, text, kVstMaxParamStrLen); break;
|
||||
case kParamD: float2string (D, text, kVstMaxParamStrLen); break;
|
||||
case kParamE: float2string (E, text, kVstMaxParamStrLen); break;
|
||||
case kParamF: float2string (F, text, kVstMaxParamStrLen); break;
|
||||
case kParamG: float2string (G, text, kVstMaxParamStrLen); break;
|
||||
case kParamH: float2string (H, text, kVstMaxParamStrLen); break;
|
||||
case kParamI: float2string (I, text, kVstMaxParamStrLen); break;
|
||||
case kParamJ: float2string (J, text, kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
||||
void X2Buss::getParameterLabel(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "eq", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "freq", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamG: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamH: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamI: vst_strncpy (text, "dyn", kVstMaxParamStrLen); break;
|
||||
case kParamJ: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 X2Buss::canDo(char *text)
|
||||
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
|
||||
|
||||
bool X2Buss::getEffectName(char* name) {
|
||||
vst_strncpy(name, "X2Buss", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
VstPlugCategory X2Buss::getPlugCategory() {return kPlugCategEffect;}
|
||||
|
||||
bool X2Buss::getProductString(char* text) {
|
||||
vst_strncpy (text, "airwindows X2Buss", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
bool X2Buss::getVendorString(char* text) {
|
||||
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
|
||||
}
|
||||
154
plugins/LinuxVST/src/X2Buss/X2Buss.h
Executable file
154
plugins/LinuxVST/src/X2Buss/X2Buss.h
Executable file
|
|
@ -0,0 +1,154 @@
|
|||
/* ========================================
|
||||
* X2Buss - X2Buss.h
|
||||
* Created 8/12/11 by SPIAdmin
|
||||
* Copyright (c) Airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __X2Buss_H
|
||||
#define __X2Buss_H
|
||||
|
||||
#ifndef __audioeffect__
|
||||
#include "audioeffectx.h"
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
|
||||
enum {
|
||||
kParamA =0,
|
||||
kParamB =1,
|
||||
kParamC =2,
|
||||
kParamD =3,
|
||||
kParamE =4,
|
||||
kParamF =5,
|
||||
kParamG =6,
|
||||
kParamH =7,
|
||||
kParamI =8,
|
||||
kParamJ =9,
|
||||
kNumParameters = 10
|
||||
}; //
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
const unsigned long kUniqueId = 'x2bs'; //Change this to what the AU identity is!
|
||||
|
||||
class X2Buss :
|
||||
public AudioEffectX
|
||||
{
|
||||
public:
|
||||
X2Buss(audioMasterCallback audioMaster);
|
||||
~X2Buss();
|
||||
virtual bool getEffectName(char* name); // The plug-in name
|
||||
virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in
|
||||
virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg
|
||||
virtual bool getVendorString(char* text); // Vendor info
|
||||
virtual VstInt32 getVendorVersion(); // Version number
|
||||
virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
|
||||
virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames);
|
||||
virtual void getProgramName(char *name); // read the name from the host
|
||||
virtual void setProgramName(char *name); // changes the name of the preset displayed in the host
|
||||
virtual VstInt32 getChunk (void** data, bool isPreset);
|
||||
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
|
||||
virtual float getParameter(VstInt32 index); // get the parameter value at the specified index
|
||||
virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value
|
||||
virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB)
|
||||
virtual void getParameterName(VstInt32 index, char *text); // name of the parameter
|
||||
virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value
|
||||
virtual VstInt32 canDo(char *text);
|
||||
private:
|
||||
char _programName[kVstMaxProgNameLen + 1];
|
||||
std::set< std::string > _canDo;
|
||||
|
||||
float A;
|
||||
float B;
|
||||
float C;
|
||||
float D;
|
||||
float E;
|
||||
float F;
|
||||
float G;
|
||||
float H;
|
||||
float I;
|
||||
float J;
|
||||
|
||||
enum {
|
||||
biq_freq,
|
||||
biq_reso,
|
||||
biq_a0,
|
||||
biq_a1,
|
||||
biq_a2,
|
||||
biq_b1,
|
||||
biq_b2,
|
||||
biq_sL1,
|
||||
biq_sL2,
|
||||
biq_sR1,
|
||||
biq_sR2,
|
||||
biq_total
|
||||
}; //coefficient interpolating filter, stereo
|
||||
double highA[biq_total];
|
||||
double highB[biq_total];
|
||||
double highC[biq_total];
|
||||
double highLIIR;
|
||||
double highRIIR;
|
||||
|
||||
double midA[biq_total];
|
||||
double midB[biq_total];
|
||||
double midC[biq_total];
|
||||
double midLIIR;
|
||||
double midRIIR;
|
||||
|
||||
double lowA[biq_total];
|
||||
double lowB[biq_total];
|
||||
double lowC[biq_total];
|
||||
double lowLIIR;
|
||||
double lowRIIR;
|
||||
//SmoothEQ2
|
||||
|
||||
enum {
|
||||
bez_AL,
|
||||
bez_BL,
|
||||
bez_CL,
|
||||
bez_InL,
|
||||
bez_UnInL,
|
||||
bez_SampL,
|
||||
bez_AR,
|
||||
bez_BR,
|
||||
bez_CR,
|
||||
bez_InR,
|
||||
bez_UnInR,
|
||||
bez_SampR,
|
||||
bez_cycle,
|
||||
bez_total
|
||||
}; //the new undersampling. bez signifies the bezier curve reconstruction
|
||||
double bezCompF[bez_total];
|
||||
double bezMaxF;
|
||||
double bezCompS[bez_total];
|
||||
//Dynamics2
|
||||
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double inTrimA;
|
||||
double inTrimB;
|
||||
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
//default stuff
|
||||
};
|
||||
|
||||
#endif
|
||||
915
plugins/LinuxVST/src/X2Buss/X2BussProc.cpp
Executable file
915
plugins/LinuxVST/src/X2Buss/X2BussProc.cpp
Executable file
|
|
@ -0,0 +1,915 @@
|
|||
/* ========================================
|
||||
* X2Buss - X2Buss.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __X2Buss_H
|
||||
#include "X2Buss.h"
|
||||
#endif
|
||||
|
||||
void X2Buss::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames)
|
||||
{
|
||||
float* in1 = inputs[0];
|
||||
float* in2 = inputs[1];
|
||||
float* out1 = outputs[0];
|
||||
float* out2 = outputs[1];
|
||||
|
||||
VstInt32 inFramesToProcess = sampleFrames; //vst doesn't give us this as a separate variable so we'll make it
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (A-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (B-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (C-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (D-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = E-0.5;
|
||||
double highmidRef = F-0.5;
|
||||
double lowmidRef = G-0.5;
|
||||
double bassRef = H-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
||||
double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125);
|
||||
double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125);
|
||||
double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125);
|
||||
|
||||
highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate());
|
||||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/getSampleRate());
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
||||
midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate());
|
||||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/getSampleRate());
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
||||
lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate());
|
||||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/getSampleRate());
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-I, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-I, 12.360679774997898) / overallscale;
|
||||
double sloRez = pow(1.0-I,10.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez,0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.00001),1.0);
|
||||
//Dynamics2
|
||||
|
||||
inTrimA = inTrimB; inTrimB = J*2.0;
|
||||
//Console
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
else if (inputSampleL > 0.0) inputSampleL = -expm1((log1p(-inputSampleL) * 0.6180339887498949));
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
else if (inputSampleL < 0.0) inputSampleL = expm1((log1p(inputSampleL) * 0.6180339887498949));
|
||||
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
else if (inputSampleR > 0.0) inputSampleR = -expm1((log1p(-inputSampleR) * 0.6180339887498949));
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949));
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]);
|
||||
double highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1];
|
||||
midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2];
|
||||
midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]);
|
||||
double lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1];
|
||||
lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2];
|
||||
lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]);
|
||||
double bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//first stage of three crossovers
|
||||
|
||||
outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1];
|
||||
highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2];
|
||||
highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]);
|
||||
highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1];
|
||||
midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2];
|
||||
midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]);
|
||||
lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1];
|
||||
lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2];
|
||||
lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]);
|
||||
bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//second stage of three crossovers
|
||||
|
||||
outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1];
|
||||
highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2];
|
||||
highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]);
|
||||
highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1];
|
||||
midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2];
|
||||
midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]);
|
||||
lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1];
|
||||
lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2];
|
||||
lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]);
|
||||
bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//third stage of three crossovers
|
||||
|
||||
highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef));
|
||||
highmidL = highLIIR; trebleL -= highmidL;
|
||||
|
||||
midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef));
|
||||
lowmidL = midLIIR; highmidL -= lowmidL;
|
||||
|
||||
lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef));
|
||||
bassL = lowLIIR; lowmidL -= bassL;
|
||||
|
||||
inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
|
||||
|
||||
double trebleR = inputSampleR;
|
||||
outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1];
|
||||
highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2];
|
||||
highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]);
|
||||
double highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1];
|
||||
midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2];
|
||||
midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]);
|
||||
double lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1];
|
||||
lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2];
|
||||
lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]);
|
||||
double bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//first stage of three crossovers
|
||||
|
||||
outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1];
|
||||
highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2];
|
||||
highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]);
|
||||
highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1];
|
||||
midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2];
|
||||
midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]);
|
||||
lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1];
|
||||
lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2];
|
||||
lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]);
|
||||
bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//second stage of three crossovers
|
||||
|
||||
outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1];
|
||||
highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2];
|
||||
highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]);
|
||||
highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1];
|
||||
midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2];
|
||||
midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]);
|
||||
lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1];
|
||||
lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2];
|
||||
lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]);
|
||||
bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//third stage of three crossovers
|
||||
|
||||
highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef));
|
||||
highmidR = highRIIR; trebleR -= highmidR;
|
||||
|
||||
midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef));
|
||||
lowmidR = midRIIR; highmidR -= lowmidR;
|
||||
|
||||
lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef));
|
||||
bassR = lowRIIR; lowmidR -= bassR;
|
||||
|
||||
inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
//SmoothEQ2
|
||||
|
||||
if (bezCThresh > 0.0) {
|
||||
inputSampleL *= ((bezCThresh*0.5)+1.0);
|
||||
inputSampleR *= ((bezCThresh*0.5)+1.0);
|
||||
}
|
||||
|
||||
bezCompF[bez_cycle] += bezRez;
|
||||
bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez);
|
||||
bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez);
|
||||
bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR)));
|
||||
|
||||
if (bezCompF[bez_cycle] > 1.0) {
|
||||
bezCompF[bez_cycle] -= 1.0;
|
||||
bezCompF[bez_CL] = bezCompF[bez_BL];
|
||||
bezCompF[bez_BL] = bezCompF[bez_AL];
|
||||
bezCompF[bez_AL] = bezCompF[bez_SampL];
|
||||
bezCompF[bez_SampL] = 0.0;
|
||||
bezCompF[bez_CR] = bezCompF[bez_BR];
|
||||
bezCompF[bez_BR] = bezCompF[bez_AR];
|
||||
bezCompF[bez_AR] = bezCompF[bez_SampR];
|
||||
bezCompF[bez_SampR] = 0.0;
|
||||
bezMaxF = 0.0;
|
||||
}
|
||||
bezCompS[bez_cycle] += sloRez;
|
||||
bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage
|
||||
bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage
|
||||
if (bezCompS[bez_cycle] > 1.0) {
|
||||
bezCompS[bez_cycle] -= 1.0;
|
||||
bezCompS[bez_CL] = bezCompS[bez_BL];
|
||||
bezCompS[bez_BL] = bezCompS[bez_AL];
|
||||
bezCompS[bez_AL] = bezCompS[bez_SampL];
|
||||
bezCompS[bez_SampL] = 0.0;
|
||||
bezCompS[bez_CR] = bezCompS[bez_BR];
|
||||
bezCompS[bez_BR] = bezCompS[bez_AR];
|
||||
bezCompS[bez_AR] = bezCompS[bez_SampR];
|
||||
bezCompS[bez_SampR] = 0.0;
|
||||
}
|
||||
double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]);
|
||||
double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]);
|
||||
double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5;
|
||||
double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]);
|
||||
double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]);
|
||||
double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5;
|
||||
double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]);
|
||||
double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]);
|
||||
double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5;
|
||||
double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]);
|
||||
double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]);
|
||||
double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5;
|
||||
CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0));
|
||||
//Dynamics2
|
||||
|
||||
const double temp = (double)sampleFrames/inFramesToProcess;
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gain;
|
||||
inputSampleR = inputSampleR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
frexpf((float)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
in1++;
|
||||
in2++;
|
||||
out1++;
|
||||
out2++;
|
||||
}
|
||||
}
|
||||
|
||||
void X2Buss::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames)
|
||||
{
|
||||
double* in1 = inputs[0];
|
||||
double* in2 = inputs[1];
|
||||
double* out1 = outputs[0];
|
||||
double* out2 = outputs[1];
|
||||
|
||||
VstInt32 inFramesToProcess = sampleFrames; //vst doesn't give us this as a separate variable so we'll make it
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= getSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (A-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (B-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (C-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (D-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = E-0.5;
|
||||
double highmidRef = F-0.5;
|
||||
double lowmidRef = G-0.5;
|
||||
double bassRef = H-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
||||
double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125);
|
||||
double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125);
|
||||
double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125);
|
||||
|
||||
highA[biq_freq] = ((pow(highF,3)*20000.0)/getSampleRate());
|
||||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/getSampleRate());
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
||||
midA[biq_freq] = ((pow(midF,3)*20000.0)/getSampleRate());
|
||||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/getSampleRate());
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
||||
lowA[biq_freq] = ((pow(bassF,3)*20000.0)/getSampleRate());
|
||||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/getSampleRate());
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-I, 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-I, 12.360679774997898) / overallscale;
|
||||
double sloRez = pow(1.0-I,10.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez,0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.00001),1.0);
|
||||
//Dynamics2
|
||||
|
||||
inTrimA = inTrimB; inTrimB = J*2.0;
|
||||
//Console
|
||||
|
||||
while (--sampleFrames >= 0)
|
||||
{
|
||||
double inputSampleL = *in1;
|
||||
double inputSampleR = *in2;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
else if (inputSampleL > 0.0) inputSampleL = -expm1((log1p(-inputSampleL) * 0.6180339887498949));
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
else if (inputSampleL < 0.0) inputSampleL = expm1((log1p(inputSampleL) * 0.6180339887498949));
|
||||
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
else if (inputSampleR > 0.0) inputSampleR = -expm1((log1p(-inputSampleR) * 0.6180339887498949));
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949));
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]);
|
||||
double highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1];
|
||||
midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2];
|
||||
midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]);
|
||||
double lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1];
|
||||
lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2];
|
||||
lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]);
|
||||
double bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//first stage of three crossovers
|
||||
|
||||
outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1];
|
||||
highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2];
|
||||
highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]);
|
||||
highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1];
|
||||
midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2];
|
||||
midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]);
|
||||
lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1];
|
||||
lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2];
|
||||
lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]);
|
||||
bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//second stage of three crossovers
|
||||
|
||||
outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1];
|
||||
highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2];
|
||||
highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]);
|
||||
highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1];
|
||||
midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2];
|
||||
midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]);
|
||||
lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1];
|
||||
lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2];
|
||||
lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]);
|
||||
bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//third stage of three crossovers
|
||||
|
||||
highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef));
|
||||
highmidL = highLIIR; trebleL -= highmidL;
|
||||
|
||||
midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef));
|
||||
lowmidL = midLIIR; highmidL -= lowmidL;
|
||||
|
||||
lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef));
|
||||
bassL = lowLIIR; lowmidL -= bassL;
|
||||
|
||||
inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
|
||||
|
||||
double trebleR = inputSampleR;
|
||||
outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1];
|
||||
highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2];
|
||||
highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]);
|
||||
double highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1];
|
||||
midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2];
|
||||
midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]);
|
||||
double lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1];
|
||||
lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2];
|
||||
lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]);
|
||||
double bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//first stage of three crossovers
|
||||
|
||||
outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1];
|
||||
highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2];
|
||||
highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]);
|
||||
highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1];
|
||||
midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2];
|
||||
midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]);
|
||||
lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1];
|
||||
lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2];
|
||||
lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]);
|
||||
bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//second stage of three crossovers
|
||||
|
||||
outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1];
|
||||
highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2];
|
||||
highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]);
|
||||
highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1];
|
||||
midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2];
|
||||
midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]);
|
||||
lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1];
|
||||
lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2];
|
||||
lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]);
|
||||
bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//third stage of three crossovers
|
||||
|
||||
highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef));
|
||||
highmidR = highRIIR; trebleR -= highmidR;
|
||||
|
||||
midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef));
|
||||
lowmidR = midRIIR; highmidR -= lowmidR;
|
||||
|
||||
lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef));
|
||||
bassR = lowRIIR; lowmidR -= bassR;
|
||||
|
||||
inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
//SmoothEQ2
|
||||
|
||||
if (bezCThresh > 0.0) {
|
||||
inputSampleL *= ((bezCThresh*0.5)+1.0);
|
||||
inputSampleR *= ((bezCThresh*0.5)+1.0);
|
||||
}
|
||||
|
||||
bezCompF[bez_cycle] += bezRez;
|
||||
bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez);
|
||||
bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez);
|
||||
bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR)));
|
||||
|
||||
if (bezCompF[bez_cycle] > 1.0) {
|
||||
bezCompF[bez_cycle] -= 1.0;
|
||||
bezCompF[bez_CL] = bezCompF[bez_BL];
|
||||
bezCompF[bez_BL] = bezCompF[bez_AL];
|
||||
bezCompF[bez_AL] = bezCompF[bez_SampL];
|
||||
bezCompF[bez_SampL] = 0.0;
|
||||
bezCompF[bez_CR] = bezCompF[bez_BR];
|
||||
bezCompF[bez_BR] = bezCompF[bez_AR];
|
||||
bezCompF[bez_AR] = bezCompF[bez_SampR];
|
||||
bezCompF[bez_SampR] = 0.0;
|
||||
bezMaxF = 0.0;
|
||||
}
|
||||
bezCompS[bez_cycle] += sloRez;
|
||||
bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage
|
||||
bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage
|
||||
if (bezCompS[bez_cycle] > 1.0) {
|
||||
bezCompS[bez_cycle] -= 1.0;
|
||||
bezCompS[bez_CL] = bezCompS[bez_BL];
|
||||
bezCompS[bez_BL] = bezCompS[bez_AL];
|
||||
bezCompS[bez_AL] = bezCompS[bez_SampL];
|
||||
bezCompS[bez_SampL] = 0.0;
|
||||
bezCompS[bez_CR] = bezCompS[bez_BR];
|
||||
bezCompS[bez_BR] = bezCompS[bez_AR];
|
||||
bezCompS[bez_AR] = bezCompS[bez_SampR];
|
||||
bezCompS[bez_SampR] = 0.0;
|
||||
}
|
||||
double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]);
|
||||
double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]);
|
||||
double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5;
|
||||
double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]);
|
||||
double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]);
|
||||
double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5;
|
||||
double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]);
|
||||
double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]);
|
||||
double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5;
|
||||
double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]);
|
||||
double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]);
|
||||
double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5;
|
||||
CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0));
|
||||
//Dynamics2
|
||||
|
||||
const double temp = (double)sampleFrames/inFramesToProcess;
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gain;
|
||||
inputSampleR = inputSampleR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.92;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
//begin 64 bit stereo floating point dither
|
||||
//int expon; frexp((double)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
//inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//frexp((double)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
//inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62));
|
||||
//end 64 bit stereo floating point dither
|
||||
|
||||
*out1 = inputSampleL;
|
||||
*out2 = inputSampleR;
|
||||
|
||||
in1++;
|
||||
in2++;
|
||||
out1++;
|
||||
out2++;
|
||||
}
|
||||
}
|
||||
227
plugins/LinuxVST/src/kWoodRoom/kWoodRoom.cpp
Executable file
227
plugins/LinuxVST/src/kWoodRoom/kWoodRoom.cpp
Executable file
|
|
@ -0,0 +1,227 @@
|
|||
/* ========================================
|
||||
* kWoodRoom - kWoodRoom.h
|
||||
* Copyright (c) airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __kWoodRoom_H
|
||||
#include "kWoodRoom.h"
|
||||
#endif
|
||||
|
||||
AudioEffect* createEffectInstance(audioMasterCallback audioMaster) {return new kWoodRoom(audioMaster);}
|
||||
|
||||
kWoodRoom::kWoodRoom(audioMasterCallback audioMaster) :
|
||||
AudioEffectX(audioMaster, kNumPrograms, kNumParameters)
|
||||
{
|
||||
A = 0.5;
|
||||
B = 0.5;
|
||||
C = 0.25;
|
||||
D = 0.5;
|
||||
E = 0.5;
|
||||
F = 0.5;
|
||||
|
||||
for(int x = 0; x < d3A+2; x++) {a3AL[x] = 0.0; a3AR[x] = 0.0;}
|
||||
for(int x = 0; x < d3B+2; x++) {a3BL[x] = 0.0; a3BR[x] = 0.0;}
|
||||
for(int x = 0; x < d3C+2; x++) {a3CL[x] = 0.0; a3CR[x] = 0.0;}
|
||||
for(int x = 0; x < d3D+2; x++) {a3DL[x] = 0.0; a3DR[x] = 0.0;}
|
||||
for(int x = 0; x < d3E+2; x++) {a3EL[x] = 0.0; a3ER[x] = 0.0;}
|
||||
for(int x = 0; x < d3F+2; x++) {a3FL[x] = 0.0; a3FR[x] = 0.0;}
|
||||
for(int x = 0; x < d3G+2; x++) {a3GL[x] = 0.0; a3GR[x] = 0.0;}
|
||||
for(int x = 0; x < d3H+2; x++) {a3HL[x] = 0.0; a3HR[x] = 0.0;}
|
||||
for(int x = 0; x < d3I+2; x++) {a3IL[x] = 0.0; a3IR[x] = 0.0;}
|
||||
c3AL = c3BL = c3CL = c3DL = c3EL = c3FL = c3GL = c3HL = c3IL = 1;
|
||||
c3AR = c3BR = c3CR = c3DR = c3ER = c3FR = c3GR = c3HR = c3IR = 1;
|
||||
|
||||
for(int x = 0; x < d6A+2; x++) {a6AL[x] = 0.0; a6AR[x] = 0.0;}
|
||||
for(int x = 0; x < d6B+2; x++) {a6BL[x] = 0.0; a6BR[x] = 0.0;}
|
||||
for(int x = 0; x < d6C+2; x++) {a6CL[x] = 0.0; a6CR[x] = 0.0;}
|
||||
for(int x = 0; x < d6D+2; x++) {a6DL[x] = 0.0; a6DR[x] = 0.0;}
|
||||
for(int x = 0; x < d6E+2; x++) {a6EL[x] = 0.0; a6ER[x] = 0.0;}
|
||||
for(int x = 0; x < d6F+2; x++) {a6FL[x] = 0.0; a6FR[x] = 0.0;}
|
||||
for(int x = 0; x < d6G+2; x++) {a6GL[x] = 0.0; a6GR[x] = 0.0;}
|
||||
for(int x = 0; x < d6H+2; x++) {a6HL[x] = 0.0; a6HR[x] = 0.0;}
|
||||
for(int x = 0; x < d6I+2; x++) {a6IL[x] = 0.0; a6IR[x] = 0.0;}
|
||||
for(int x = 0; x < d6J+2; x++) {a6JL[x] = 0.0; a6JR[x] = 0.0;}
|
||||
for(int x = 0; x < d6K+2; x++) {a6KL[x] = 0.0; a6KR[x] = 0.0;}
|
||||
for(int x = 0; x < d6L+2; x++) {a6LL[x] = 0.0; a6LR[x] = 0.0;}
|
||||
for(int x = 0; x < d6M+2; x++) {a6ML[x] = 0.0; a6MR[x] = 0.0;}
|
||||
for(int x = 0; x < d6N+2; x++) {a6NL[x] = 0.0; a6NR[x] = 0.0;}
|
||||
for(int x = 0; x < d6O+2; x++) {a6OL[x] = 0.0; a6OR[x] = 0.0;}
|
||||
for(int x = 0; x < d6P+2; x++) {a6PL[x] = 0.0; a6PR[x] = 0.0;}
|
||||
for(int x = 0; x < d6Q+2; x++) {a6QL[x] = 0.0; a6QR[x] = 0.0;}
|
||||
for(int x = 0; x < d6R+2; x++) {a6RL[x] = 0.0; a6RR[x] = 0.0;}
|
||||
for(int x = 0; x < d6S+2; x++) {a6SL[x] = 0.0; a6SR[x] = 0.0;}
|
||||
for(int x = 0; x < d6T+2; x++) {a6TL[x] = 0.0; a6TR[x] = 0.0;}
|
||||
for(int x = 0; x < d6U+2; x++) {a6UL[x] = 0.0; a6UR[x] = 0.0;}
|
||||
for(int x = 0; x < d6V+2; x++) {a6VL[x] = 0.0; a6VR[x] = 0.0;}
|
||||
for(int x = 0; x < d6W+2; x++) {a6WL[x] = 0.0; a6WR[x] = 0.0;}
|
||||
for(int x = 0; x < d6X+2; x++) {a6XL[x] = 0.0; a6XR[x] = 0.0;}
|
||||
for(int x = 0; x < d6Y+2; x++) {a6YL[x] = 0.0; a6YR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZA+2; x++) {a6ZAL[x] = 0.0; a6ZAR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZB+2; x++) {a6ZBL[x] = 0.0; a6ZBR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZC+2; x++) {a6ZCL[x] = 0.0; a6ZCR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZD+2; x++) {a6ZDL[x] = 0.0; a6ZDR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZE+2; x++) {a6ZEL[x] = 0.0; a6ZER[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZF+2; x++) {a6ZFL[x] = 0.0; a6ZFR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZG+2; x++) {a6ZGL[x] = 0.0; a6ZGR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZH+2; x++) {a6ZHL[x] = 0.0; a6ZHR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZI+2; x++) {a6ZIL[x] = 0.0; a6ZIR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZJ+2; x++) {a6ZJL[x] = 0.0; a6ZJR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZK+2; x++) {a6ZKL[x] = 0.0; a6ZKR[x] = 0.0;}
|
||||
c6AL = c6BL = c6CL = c6DL = c6EL = c6FL = c6GL = c6HL = c6IL = 1;
|
||||
c6JL = c6KL = c6LL = c6ML = c6NL = c6OL = c6PL = c6QL = c6RL = 1;
|
||||
c6SL = c6TL = c6UL = c6VL = c6WL = c6XL = c6YL = c6ZAL = c6ZBL = 1;
|
||||
c6ZCL = c6ZDL = c6ZEL = c6ZFL = c6ZGL = c6ZHL = c6ZIL = c6ZJL = c6ZKL = 1;
|
||||
c6AR = c6BR = c6CR = c6DR = c6ER = c6FR = c6GR = c6HR = c6IR = 1;
|
||||
c6JR = c6KR = c6LR = c6MR = c6NR = c6OR = c6PR = c6QR = c6RR = 1;
|
||||
c6SR = c6TR = c6UR = c6VR = c6WR = c6XR = c6YR = c6ZAR = c6ZBR = 1;
|
||||
c6ZCR = c6ZDR = c6ZER = c6ZFR = c6ZGR = c6ZHR = c6ZIR = c6ZJR = c6ZKR = 1;
|
||||
f6AL = f6BL = f6CL = f6DL = f6EL = f6FL = 0.0;
|
||||
f6FR = f6LR = f6RR = f6XR = f6ZER = f6ZKR = 0.0;
|
||||
avg6L = avg6R = 0.0;
|
||||
|
||||
for (int x = 0; x < bez_total; x++) {
|
||||
bez[x] = 0.0;
|
||||
bezF[x] = 0.0;
|
||||
}
|
||||
bez[bez_cycle] = 1.0;
|
||||
bezF[bez_cycle] = 1.0;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
//this is reset: values being initialized only once. Startup values, whatever they are.
|
||||
|
||||
_canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect.
|
||||
_canDo.insert("plugAsSend"); // plug-in can be used as a send effect.
|
||||
_canDo.insert("x2in2out");
|
||||
setNumInputs(kNumInputs);
|
||||
setNumOutputs(kNumOutputs);
|
||||
setUniqueID(kUniqueId);
|
||||
canProcessReplacing(); // supports output replacing
|
||||
canDoubleReplacing(); // supports double precision processing
|
||||
programsAreChunks(true);
|
||||
vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name
|
||||
}
|
||||
|
||||
kWoodRoom::~kWoodRoom() {}
|
||||
VstInt32 kWoodRoom::getVendorVersion () {return 1000;}
|
||||
void kWoodRoom::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);}
|
||||
void kWoodRoom::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);}
|
||||
//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than
|
||||
//trying to do versioning and preventing people from using older versions. Maybe they like the old one!
|
||||
|
||||
static float pinParameter(float data)
|
||||
{
|
||||
if (data < 0.0f) return 0.0f;
|
||||
if (data > 1.0f) return 1.0f;
|
||||
return data;
|
||||
}
|
||||
|
||||
VstInt32 kWoodRoom::getChunk (void** data, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)calloc(kNumParameters, sizeof(float));
|
||||
chunkData[0] = A;
|
||||
chunkData[1] = B;
|
||||
chunkData[2] = C;
|
||||
chunkData[3] = D;
|
||||
chunkData[4] = E;
|
||||
chunkData[5] = F;
|
||||
/* Note: The way this is set up, it will break if you manage to save settings on an Intel
|
||||
machine and load them on a PPC Mac. However, it's fine if you stick to the machine you
|
||||
started with. */
|
||||
|
||||
*data = chunkData;
|
||||
return kNumParameters * sizeof(float);
|
||||
}
|
||||
|
||||
VstInt32 kWoodRoom::setChunk (void* data, VstInt32 byteSize, bool isPreset)
|
||||
{
|
||||
float *chunkData = (float *)data;
|
||||
A = pinParameter(chunkData[0]);
|
||||
B = pinParameter(chunkData[1]);
|
||||
C = pinParameter(chunkData[2]);
|
||||
D = pinParameter(chunkData[3]);
|
||||
E = pinParameter(chunkData[4]);
|
||||
F = pinParameter(chunkData[5]);
|
||||
/* We're ignoring byteSize as we found it to be a filthy liar */
|
||||
|
||||
/* calculate any other fields you need here - you could copy in
|
||||
code from setParameter() here. */
|
||||
return 0;
|
||||
}
|
||||
|
||||
void kWoodRoom::setParameter(VstInt32 index, float value) {
|
||||
switch (index) {
|
||||
case kParamA: A = value; break;
|
||||
case kParamB: B = value; break;
|
||||
case kParamC: C = value; break;
|
||||
case kParamD: D = value; break;
|
||||
case kParamE: E = value; break;
|
||||
case kParamF: F = value; break;
|
||||
default: throw; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
float kWoodRoom::getParameter(VstInt32 index) {
|
||||
switch (index) {
|
||||
case kParamA: return A; break;
|
||||
case kParamB: return B; break;
|
||||
case kParamC: return C; break;
|
||||
case kParamD: return D; break;
|
||||
case kParamE: return E; break;
|
||||
case kParamF: return F; break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} return 0.0; //we only need to update the relevant name, this is simple to manage
|
||||
}
|
||||
|
||||
void kWoodRoom::getParameterName(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "Regen", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "Derez", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "Filter", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "EarlyRF", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "Positin", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "Dry/Wet", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this is our labels for displaying in the VST host
|
||||
}
|
||||
|
||||
void kWoodRoom::getParameterDisplay(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: float2string (A, text, kVstMaxParamStrLen); break;
|
||||
case kParamB: float2string (B, text, kVstMaxParamStrLen); break;
|
||||
case kParamC: float2string (C, text, kVstMaxParamStrLen); break;
|
||||
case kParamD: float2string (D, text, kVstMaxParamStrLen); break;
|
||||
case kParamE: float2string (E, text, kVstMaxParamStrLen); break;
|
||||
case kParamF: float2string (F, text, kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
} //this displays the values and handles 'popups' where it's discrete choices
|
||||
}
|
||||
|
||||
void kWoodRoom::getParameterLabel(VstInt32 index, char *text) {
|
||||
switch (index) {
|
||||
case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamE: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
case kParamF: vst_strncpy (text, "", kVstMaxParamStrLen); break;
|
||||
default: break; // unknown parameter, shouldn't happen!
|
||||
}
|
||||
}
|
||||
|
||||
VstInt32 kWoodRoom::canDo(char *text)
|
||||
{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know
|
||||
|
||||
bool kWoodRoom::getEffectName(char* name) {
|
||||
vst_strncpy(name, "kWoodRoom", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
VstPlugCategory kWoodRoom::getPlugCategory() {return kPlugCategEffect;}
|
||||
|
||||
bool kWoodRoom::getProductString(char* text) {
|
||||
vst_strncpy (text, "airwindows kWoodRoom", kVstMaxProductStrLen); return true;
|
||||
}
|
||||
|
||||
bool kWoodRoom::getVendorString(char* text) {
|
||||
vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true;
|
||||
}
|
||||
209
plugins/LinuxVST/src/kWoodRoom/kWoodRoom.h
Executable file
209
plugins/LinuxVST/src/kWoodRoom/kWoodRoom.h
Executable file
|
|
@ -0,0 +1,209 @@
|
|||
/* ========================================
|
||||
* kWoodRoom - kWoodRoom.h
|
||||
* Created 8/12/11 by SPIAdmin
|
||||
* Copyright (c) Airwindows, Airwindows uses the MIT license
|
||||
* ======================================== */
|
||||
|
||||
#ifndef __kWoodRoom_H
|
||||
#define __kWoodRoom_H
|
||||
|
||||
#ifndef __audioeffect__
|
||||
#include "audioeffectx.h"
|
||||
#endif
|
||||
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <math.h>
|
||||
|
||||
enum {
|
||||
kParamA =0,
|
||||
kParamB =1,
|
||||
kParamC =2,
|
||||
kParamD =3,
|
||||
kParamE =4,
|
||||
kParamF =5,
|
||||
kNumParameters = 6
|
||||
}; //
|
||||
|
||||
const int d3A = 581; const int d3B = 831; const int d3C = 832;
|
||||
const int d3D = 574; const int d3E = 598; const int d3F = 685;
|
||||
const int d3G = 499; const int d3H = 573; const int d3I = 655;
|
||||
#define THREEBYTHREE true
|
||||
const int d6A = 154; const int d6B = 832; const int d6C = 109; const int d6D = 685; const int d6E = 33; const int d6F = 12; const int d6G = 27; const int d6H = 30; const int d6I = 339; const int d6J = 499; const int d6K = 296; const int d6L = 169; const int d6M = 169; const int d6N = 831; const int d6O = 15; const int d6P = 411; const int d6Q = 238; const int d6R = 68; const int d6S = 0; const int d6T = 8; const int d6U = 655; const int d6V = 581; const int d6W = 465; const int d6X = 173; const int d6Y = 3; const int d6ZA = 96; const int d6ZB = 573; const int d6ZC = 243; const int d6ZD = 30; const int d6ZE = 188; const int d6ZF = 291; const int d6ZG = 11; const int d6ZH = 372; const int d6ZI = 574; const int d6ZJ = 100; const int d6ZK = 598; //1 to 90 ms, 249 seat club
|
||||
#define SIXBYSIX true // 249seat154832109x6 on 2025-10-31 kWoodRoom
|
||||
const int early[] = {0, 3, 8, 11, 12, 15, 27, 30, 30, 33, 68, 96, 100, 109, 154, 169, 169, 173, 188, 238, 243, 291, 296, 339, 372, 411, 465, 499, 573, 574, 581, 598, 655, 685, 831, 832};
|
||||
|
||||
const int kNumPrograms = 0;
|
||||
const int kNumInputs = 2;
|
||||
const int kNumOutputs = 2;
|
||||
const unsigned long kUniqueId = 'ksta'; //Change this to what the AU identity is!
|
||||
|
||||
class kWoodRoom :
|
||||
public AudioEffectX
|
||||
{
|
||||
public:
|
||||
kWoodRoom(audioMasterCallback audioMaster);
|
||||
~kWoodRoom();
|
||||
virtual bool getEffectName(char* name); // The plug-in name
|
||||
virtual VstPlugCategory getPlugCategory(); // The general category for the plug-in
|
||||
virtual bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg
|
||||
virtual bool getVendorString(char* text); // Vendor info
|
||||
virtual VstInt32 getVendorVersion(); // Version number
|
||||
virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames);
|
||||
virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames);
|
||||
virtual void getProgramName(char *name); // read the name from the host
|
||||
virtual void setProgramName(char *name); // changes the name of the preset displayed in the host
|
||||
virtual VstInt32 getChunk (void** data, bool isPreset);
|
||||
virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset);
|
||||
virtual float getParameter(VstInt32 index); // get the parameter value at the specified index
|
||||
virtual void setParameter(VstInt32 index, float value); // set the parameter at index to value
|
||||
virtual void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB)
|
||||
virtual void getParameterName(VstInt32 index, char *text); // name of the parameter
|
||||
virtual void getParameterDisplay(VstInt32 index, char *text); // text description of the current value
|
||||
virtual VstInt32 canDo(char *text);
|
||||
private:
|
||||
char _programName[kVstMaxProgNameLen + 1];
|
||||
std::set< std::string > _canDo;
|
||||
|
||||
float A;
|
||||
float B;
|
||||
float C;
|
||||
float D;
|
||||
float E;
|
||||
float F;
|
||||
|
||||
double a3AL[d3A+5];
|
||||
double a3BL[d3B+5];
|
||||
double a3CL[d3C+5];
|
||||
double a3DL[d3D+5];
|
||||
double a3EL[d3E+5];
|
||||
double a3FL[d3F+5];
|
||||
double a3GL[d3G+5];
|
||||
double a3HL[d3H+5];
|
||||
double a3IL[d3I+5];
|
||||
double a3AR[d3A+5];
|
||||
double a3BR[d3B+5];
|
||||
double a3CR[d3C+5];
|
||||
double a3DR[d3D+5];
|
||||
double a3ER[d3E+5];
|
||||
double a3FR[d3F+5];
|
||||
double a3GR[d3G+5];
|
||||
double a3HR[d3H+5];
|
||||
double a3IR[d3I+5];
|
||||
int c3AL,c3AR,c3BL,c3BR,c3CL,c3CR,c3DL,c3DR,c3EL,c3ER;
|
||||
int c3FL,c3FR,c3GL,c3GR,c3HL,c3HR,c3IL,c3IR;
|
||||
|
||||
double a6AL[d6A+5];
|
||||
double a6BL[d6B+5];
|
||||
double a6CL[d6C+5];
|
||||
double a6DL[d6D+5];
|
||||
double a6EL[d6E+5];
|
||||
double a6FL[d6F+5];
|
||||
double a6GL[d6G+5];
|
||||
double a6HL[d6H+5];
|
||||
double a6IL[d6I+5];
|
||||
double a6JL[d6J+5];
|
||||
double a6KL[d6K+5];
|
||||
double a6LL[d6L+5];
|
||||
double a6ML[d6M+5];
|
||||
double a6NL[d6N+5];
|
||||
double a6OL[d6O+5];
|
||||
double a6PL[d6P+5];
|
||||
double a6QL[d6Q+5];
|
||||
double a6RL[d6R+5];
|
||||
double a6SL[d6S+5];
|
||||
double a6TL[d6T+5];
|
||||
double a6UL[d6U+5];
|
||||
double a6VL[d6V+5];
|
||||
double a6WL[d6W+5];
|
||||
double a6XL[d6X+5];
|
||||
double a6YL[d6Y+5];
|
||||
double a6ZAL[d6ZA+5];
|
||||
double a6ZBL[d6ZB+5];
|
||||
double a6ZCL[d6ZC+5];
|
||||
double a6ZDL[d6ZD+5];
|
||||
double a6ZEL[d6ZE+5];
|
||||
double a6ZFL[d6ZF+5];
|
||||
double a6ZGL[d6ZG+5];
|
||||
double a6ZHL[d6ZH+5];
|
||||
double a6ZIL[d6ZI+5];
|
||||
double a6ZJL[d6ZJ+5];
|
||||
double a6ZKL[d6ZK+5];
|
||||
double a6AR[d6A+5];
|
||||
double a6BR[d6B+5];
|
||||
double a6CR[d6C+5];
|
||||
double a6DR[d6D+5];
|
||||
double a6ER[d6E+5];
|
||||
double a6FR[d6F+5];
|
||||
double a6GR[d6G+5];
|
||||
double a6HR[d6H+5];
|
||||
double a6IR[d6I+5];
|
||||
double a6JR[d6J+5];
|
||||
double a6KR[d6K+5];
|
||||
double a6LR[d6L+5];
|
||||
double a6MR[d6M+5];
|
||||
double a6NR[d6N+5];
|
||||
double a6OR[d6O+5];
|
||||
double a6PR[d6P+5];
|
||||
double a6QR[d6Q+5];
|
||||
double a6RR[d6R+5];
|
||||
double a6SR[d6S+5];
|
||||
double a6TR[d6T+5];
|
||||
double a6UR[d6U+5];
|
||||
double a6VR[d6V+5];
|
||||
double a6WR[d6W+5];
|
||||
double a6XR[d6X+5];
|
||||
double a6YR[d6Y+5];
|
||||
double a6ZAR[d6ZA+5];
|
||||
double a6ZBR[d6ZB+5];
|
||||
double a6ZCR[d6ZC+5];
|
||||
double a6ZDR[d6ZD+5];
|
||||
double a6ZER[d6ZE+5];
|
||||
double a6ZFR[d6ZF+5];
|
||||
double a6ZGR[d6ZG+5];
|
||||
double a6ZHR[d6ZH+5];
|
||||
double a6ZIR[d6ZI+5];
|
||||
double a6ZJR[d6ZJ+5];
|
||||
double a6ZKR[d6ZK+5];
|
||||
int c6AL,c6BL,c6CL,c6DL,c6EL,c6FL,c6GL,c6HL,c6IL;
|
||||
int c6JL,c6KL,c6LL,c6ML,c6NL,c6OL,c6PL,c6QL,c6RL;
|
||||
int c6SL,c6TL,c6UL,c6VL,c6WL,c6XL,c6YL,c6ZAL,c6ZBL;
|
||||
int c6ZCL,c6ZDL,c6ZEL,c6ZFL,c6ZGL,c6ZHL,c6ZIL,c6ZJL,c6ZKL;
|
||||
int c6AR,c6BR,c6CR,c6DR,c6ER,c6FR,c6GR,c6HR,c6IR;
|
||||
int c6JR,c6KR,c6LR,c6MR,c6NR,c6OR,c6PR,c6QR,c6RR;
|
||||
int c6SR,c6TR,c6UR,c6VR,c6WR,c6XR,c6YR,c6ZAR,c6ZBR;
|
||||
int c6ZCR,c6ZDR,c6ZER,c6ZFR,c6ZGR,c6ZHR,c6ZIR,c6ZJR,c6ZKR;
|
||||
double f6AL,f6BL,f6CL,f6DL,f6EL,f6FL;
|
||||
double f6FR,f6LR,f6RR,f6XR,f6ZER,f6ZKR;
|
||||
double avg6L,avg6R;
|
||||
|
||||
enum {
|
||||
bez_AL,
|
||||
bez_AR,
|
||||
bez_BL,
|
||||
bez_BR,
|
||||
bez_CL,
|
||||
bez_CR,
|
||||
bez_InL,
|
||||
bez_InR,
|
||||
bez_UnInL,
|
||||
bez_UnInR,
|
||||
bez_SampL,
|
||||
bez_SampR,
|
||||
bez_AvgInSampL,
|
||||
bez_AvgInSampR,
|
||||
bez_AvgOutSampL,
|
||||
bez_AvgOutSampR,
|
||||
bez_cycle,
|
||||
bez_total
|
||||
}; //the new undersampling. bez signifies the bezier curve reconstruction
|
||||
double bez[bez_total];
|
||||
|
||||
double bezF[bez_total];
|
||||
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
//default stuff
|
||||
};
|
||||
|
||||
#endif
|
||||
1032
plugins/LinuxVST/src/kWoodRoom/kWoodRoomProc.cpp
Executable file
1032
plugins/LinuxVST/src/kWoodRoom/kWoodRoomProc.cpp
Executable file
File diff suppressed because it is too large
Load diff
|
|
@ -70,12 +70,6 @@ ConsoleX2Buss::ConsoleX2Buss(AudioUnit component)
|
|||
SetParameter(kParam_I, kDefaultValue_ParamI );
|
||||
SetParameter(kParam_J, kDefaultValue_ParamJ );
|
||||
SetParameter(kParam_K, kDefaultValue_ParamK );
|
||||
SetParameter(kParam_L, kDefaultValue_ParamL );
|
||||
SetParameter(kParam_M, kDefaultValue_ParamM );
|
||||
SetParameter(kParam_N, kDefaultValue_ParamN );
|
||||
SetParameter(kParam_O, kDefaultValue_ParamO );
|
||||
SetParameter(kParam_P, kDefaultValue_ParamP );
|
||||
SetParameter(kParam_Q, kDefaultValue_ParamQ );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
|
|
@ -192,50 +186,6 @@ ComponentResult ConsoleX2Buss::GetParameterInfo(AudioUnitScope inScope,
|
|||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamK;
|
||||
break;
|
||||
case kParam_L:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterLName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamL;
|
||||
break;
|
||||
case kParam_M:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterMName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterMUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamM;
|
||||
break;
|
||||
case kParam_N:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterNName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamN;
|
||||
break;
|
||||
case kParam_O:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterOName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterOUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamO;
|
||||
break;
|
||||
case kParam_P:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterPName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamP;
|
||||
break;
|
||||
case kParam_Q:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterQName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamQ;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
|
|
@ -327,40 +277,22 @@ ComponentResult ConsoleX2Buss::Reset(AudioUnitScope inScope, AudioUnitElement i
|
|||
|
||||
for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;}
|
||||
bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0;
|
||||
bezCompS[bez_cycle] = 1.0; bezGate = 2.0;
|
||||
bezCompS[bez_cycle] = 1.0;
|
||||
//Dynamics2
|
||||
|
||||
for(int count = 0; count < 22; count++) {
|
||||
iirHPositionL[count] = 0.0;
|
||||
iirHAngleL[count] = 0.0;
|
||||
iirHPositionR[count] = 0.0;
|
||||
iirHAngleR[count] = 0.0;
|
||||
}
|
||||
hBypass = false;
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
for(int count = 0; count < 14; count++) {
|
||||
iirLPositionL[count] = 0.0;
|
||||
iirLAngleL[count] = 0.0;
|
||||
iirLPositionR[count] = 0.0;
|
||||
iirLAngleR[count] = 0.0;
|
||||
}
|
||||
lBypass = false;
|
||||
//Cabs2
|
||||
|
||||
for(int count = 0; count < dscBuf+2; count++) {
|
||||
dBaL[count] = 0.0;
|
||||
dBaR[count] = 0.0;
|
||||
}
|
||||
dBaPosL = 0.0;
|
||||
dBaPosR = 0.0;
|
||||
dBaXL = 1;
|
||||
dBaXR = 1;
|
||||
//Discontapeity
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
panA = 0.5; panB = 0.5;
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
return noErr;
|
||||
|
|
@ -382,6 +314,8 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (GetParameter( kParam_A )-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
|
|
@ -408,8 +342,8 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/GetSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -418,8 +352,8 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -428,99 +362,90 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_J ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_K ),12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(GetParameter( kParam_L ),4.0),sqrt(bezCThresh+1.0));
|
||||
double bezRez = pow(1.0-GetParameter( kParam_I ), 12.360679774997898) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_I ),10.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez,0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.00001),1.0);
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_M ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_N ),overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_O )*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (GetParameter( kParam_O )*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = GetParameter( kParam_P )*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_Q )*2.0;
|
||||
|
||||
panA = panB; panB = GetParameter( kParam_J )*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_K )*2.0;
|
||||
//Console
|
||||
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
double inputSampleL = *inputL;
|
||||
double inputSampleR = *inputR;
|
||||
|
|
@ -672,10 +597,7 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
//SmoothEQ2
|
||||
|
||||
if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale);
|
||||
else bezGate = fmax(0.0, bezGate-(sloRez*sloRez));
|
||||
|
||||
|
||||
if (bezCThresh > 0.0) {
|
||||
inputSampleL *= ((bezCThresh*0.5)+1.0);
|
||||
inputSampleR *= ((bezCThresh*0.5)+1.0);
|
||||
|
|
@ -688,21 +610,14 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
|
||||
if (bezCompF[bez_cycle] > 1.0) {
|
||||
bezCompF[bez_cycle] -= 1.0;
|
||||
|
||||
if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage,
|
||||
if (bezCompF[bez_SampL]<gate) bezCompF[bez_SampL] = 0.0; //not a bipolar audio signal
|
||||
bezCompF[bez_CL] = bezCompF[bez_BL];
|
||||
bezCompF[bez_BL] = bezCompF[bez_AL];
|
||||
bezCompF[bez_AL] = bezCompF[bez_SampL];
|
||||
bezCompF[bez_SampL] = 0.0;
|
||||
|
||||
if (bezMaxF < gate) bezCompF[bez_SampR] = bezMaxF/gate; //note: SampR is a control voltage,
|
||||
if (bezCompF[bez_SampR]<gate) bezCompF[bez_SampR] = 0.0; //not a bipolar audio signal
|
||||
bezCompF[bez_CR] = bezCompF[bez_BR];
|
||||
bezCompF[bez_BR] = bezCompF[bez_AR];
|
||||
bezCompF[bez_AR] = bezCompF[bez_SampR];
|
||||
bezCompF[bez_SampR] = 0.0;
|
||||
|
||||
bezMaxF = 0.0;
|
||||
}
|
||||
bezCompS[bez_cycle] += sloRez;
|
||||
|
|
@ -710,14 +625,10 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage
|
||||
if (bezCompS[bez_cycle] > 1.0) {
|
||||
bezCompS[bez_cycle] -= 1.0;
|
||||
|
||||
if (bezCompS[bez_SampL]<gate) bezCompS[bez_SampL] = 0.0;
|
||||
bezCompS[bez_CL] = bezCompS[bez_BL];
|
||||
bezCompS[bez_BL] = bezCompS[bez_AL];
|
||||
bezCompS[bez_AL] = bezCompS[bez_SampL];
|
||||
bezCompS[bez_SampL] = 0.0;
|
||||
|
||||
if (bezCompS[bez_SampR]<gate) bezCompS[bez_SampR] = 0.0;
|
||||
bezCompS[bez_CR] = bezCompS[bez_BR];
|
||||
bezCompS[bez_BR] = bezCompS[bez_AR];
|
||||
bezCompS[bez_AR] = bezCompS[bez_SampR];
|
||||
|
|
@ -742,74 +653,61 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;}
|
||||
//Dynamics2
|
||||
|
||||
const double temp = (double)nSampleFrames/inFramesToProcess;
|
||||
const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp));
|
||||
if (hFreq > 0.0) {
|
||||
double lowSampleL = inputSampleL;
|
||||
double lowSampleR = inputSampleR;
|
||||
for(int count = 0; count < 21; count++) {
|
||||
iirHAngleL[count] = (iirHAngleL[count]*(1.0-hFreq))+((lowSampleL-iirHPositionL[count])*hFreq);
|
||||
lowSampleL = ((iirHPositionL[count]+(iirHAngleL[count]*hFreq))*(1.0-hFreq))+(lowSampleL*hFreq);
|
||||
iirHPositionL[count] = ((iirHPositionL[count]+(iirHAngleL[count]*hFreq))*(1.0-hFreq))+(lowSampleL*hFreq);
|
||||
inputSampleL -= (lowSampleL * (1.0/21.0));//left
|
||||
iirHAngleR[count] = (iirHAngleR[count]*(1.0-hFreq))+((lowSampleR-iirHPositionR[count])*hFreq);
|
||||
lowSampleR = ((iirHPositionR[count]+(iirHAngleR[count]*hFreq))*(1.0-hFreq))+(lowSampleR*hFreq);
|
||||
iirHPositionR[count] = ((iirHPositionR[count]+(iirHAngleR[count]*hFreq))*(1.0-hFreq))+(lowSampleR*hFreq);
|
||||
inputSampleR -= (lowSampleR * (1.0/21.0));//right
|
||||
} //the highpass
|
||||
hBypass = false;
|
||||
} else {
|
||||
if (!hBypass) {
|
||||
hBypass = true;
|
||||
for(int count = 0; count < 22; count++) {
|
||||
iirHPositionL[count] = 0.0;
|
||||
iirHAngleL[count] = 0.0;
|
||||
iirHPositionR[count] = 0.0;
|
||||
iirHAngleR[count] = 0.0;
|
||||
}
|
||||
} //blank out highpass if jut switched off
|
||||
}
|
||||
const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp));
|
||||
if (lFreq < 1.0) {
|
||||
for(int count = 0; count < 13; count++) {
|
||||
iirLAngleL[count] = (iirLAngleL[count]*(1.0-lFreq))+((inputSampleL-iirLPositionL[count])*lFreq);
|
||||
inputSampleL = ((iirLPositionL[count]+(iirLAngleL[count]*lFreq))*(1.0-lFreq))+(inputSampleL*lFreq);
|
||||
iirLPositionL[count] = ((iirLPositionL[count]+(iirLAngleL[count]*lFreq))*(1.0-lFreq))+(inputSampleL*lFreq);//left
|
||||
iirLAngleR[count] = (iirLAngleR[count]*(1.0-lFreq))+((inputSampleR-iirLPositionR[count])*lFreq);
|
||||
inputSampleR = ((iirLPositionR[count]+(iirLAngleR[count]*lFreq))*(1.0-lFreq))+(inputSampleR*lFreq);
|
||||
iirLPositionR[count] = ((iirLPositionR[count]+(iirLAngleR[count]*lFreq))*(1.0-lFreq))+(inputSampleR*lFreq);//right
|
||||
} //the lowpass
|
||||
lBypass = false;
|
||||
} else {
|
||||
if (!lBypass) {
|
||||
lBypass = true;
|
||||
for(int count = 0; count < 14; count++) {
|
||||
iirLPositionL[count] = 0.0;
|
||||
iirLAngleL[count] = 0.0;
|
||||
iirLPositionR[count] = 0.0;
|
||||
iirLAngleR[count] = 0.0;
|
||||
}
|
||||
} //blank out lowpass if just switched off
|
||||
}
|
||||
//Cabs2
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
|
|
@ -822,21 +720,11 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
inputSampleL *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
//begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
|
|
@ -849,21 +737,9 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
inputSampleR *= 0.92;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
|
|
|
|||
|
|
@ -65,12 +65,6 @@ static const float kDefaultValue_ParamH = 0.5;
|
|||
static const float kDefaultValue_ParamI = 1.0;
|
||||
static const float kDefaultValue_ParamJ = 0.5;
|
||||
static const float kDefaultValue_ParamK = 0.5;
|
||||
static const float kDefaultValue_ParamL = 0.0;
|
||||
static const float kDefaultValue_ParamM = 1.0;
|
||||
static const float kDefaultValue_ParamN = 0.0;
|
||||
static const float kDefaultValue_ParamO = 0.0;
|
||||
static const float kDefaultValue_ParamP = 0.5;
|
||||
static const float kDefaultValue_ParamQ = 0.5;
|
||||
|
||||
static CFStringRef kParameterAUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterAName = CFSTR("High");
|
||||
|
|
@ -84,16 +78,8 @@ static CFStringRef kParameterGName = CFSTR("LMidF");
|
|||
static CFStringRef kParameterHName = CFSTR("BassF");
|
||||
static CFStringRef kParameterIUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterIName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterJName = CFSTR("Attack");
|
||||
static CFStringRef kParameterKName = CFSTR("Release");
|
||||
static CFStringRef kParameterLName = CFSTR("Gate");
|
||||
static CFStringRef kParameterMUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterMName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterNName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterOUnit = CFSTR("+");
|
||||
static CFStringRef kParameterOName = CFSTR("More");
|
||||
static CFStringRef kParameterPName = CFSTR("Pan");
|
||||
static CFStringRef kParameterQName = CFSTR("Fader");
|
||||
static CFStringRef kParameterJName = CFSTR("Pan");
|
||||
static CFStringRef kParameterKName = CFSTR("Fader");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
|
|
@ -107,18 +93,10 @@ enum {
|
|||
kParam_I =8,
|
||||
kParam_J =9,
|
||||
kParam_K =10,
|
||||
kParam_L =11,
|
||||
kParam_M =12,
|
||||
kParam_N =13,
|
||||
kParam_O =14,
|
||||
kParam_P =15,
|
||||
kParam_Q =16,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=17
|
||||
kNumberOfParameters=11
|
||||
};
|
||||
|
||||
const int dscBuf = 256;
|
||||
|
||||
#pragma mark ____ConsoleX2Buss
|
||||
class ConsoleX2Buss : public AUEffectBase
|
||||
{
|
||||
|
|
@ -216,32 +194,24 @@ public:
|
|||
double bezCompF[bez_total];
|
||||
double bezMaxF;
|
||||
double bezCompS[bez_total];
|
||||
double bezGate;
|
||||
//Dynamics2
|
||||
|
||||
double iirHPositionL[23];
|
||||
double iirHAngleL[23];
|
||||
double iirHPositionR[23];
|
||||
double iirHAngleR[23];
|
||||
bool hBypass;
|
||||
double iirLPositionL[15];
|
||||
double iirLAngleL[15];
|
||||
double iirLPositionR[15];
|
||||
double iirLAngleR[15];
|
||||
bool lBypass;
|
||||
double lFreqA;
|
||||
double lFreqB; //the lowpass
|
||||
double hFreqA;
|
||||
double hFreqB; //the highpass
|
||||
//Cabs2
|
||||
|
||||
double dBaL[dscBuf+5];
|
||||
double dBaPosL;
|
||||
int dBaXL;
|
||||
double dBaR[dscBuf+5];
|
||||
double dBaPosR;
|
||||
int dBaXR;
|
||||
//Discontapeity
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double panA;
|
||||
double panB;
|
||||
|
|
|
|||
|
|
@ -51,20 +51,19 @@
|
|||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 781899426;
|
||||
PBXWorkspaceStateSaveDate = 781899426;
|
||||
PBXPerProjectTemplateStateSaveDate = 783619597;
|
||||
PBXWorkspaceStateSaveDate = 783619597;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B962AAA2E9AD07A000EAC04 /* PBXTextBookmark */ = 8B962AAA2E9AD07A000EAC04 /* PBXTextBookmark */;
|
||||
8B962ADC2E9AD297000EAC04 /* PBXTextBookmark */ = 8B962ADC2E9AD297000EAC04 /* PBXTextBookmark */;
|
||||
8B962B2D2E9AD3DA000EAC04 /* PBXTextBookmark */ = 8B962B2D2E9AD3DA000EAC04 /* PBXTextBookmark */;
|
||||
8B962BA12E9AD778000EAC04 /* PBXTextBookmark */ = 8B962BA12E9AD778000EAC04 /* PBXTextBookmark */;
|
||||
8B5C9E332EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E332EB51644008B9860 /* PBXTextBookmark */;
|
||||
8B5C9E342EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E342EB51644008B9860 /* PBXTextBookmark */;
|
||||
8B5C9E352EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E352EB51644008B9860 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B962AAA2E9AD07A000EAC04 /* PBXTextBookmark */ = {
|
||||
8B5C9E332EB51644008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A690720730100365D66 /* ConsoleX2BussVersion.h */;
|
||||
name = "ConsoleX2BussVersion.h: 1";
|
||||
|
|
@ -74,42 +73,32 @@
|
|||
vrLen = 258;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8B962ADC2E9AD297000EAC04 /* PBXTextBookmark */ = {
|
||||
8B5C9E342EB51644008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */;
|
||||
name = "ConsoleX2Buss.cpp: 516";
|
||||
rLen = 0;
|
||||
rLoc = 22774;
|
||||
name = "ConsoleX2Buss.cpp: 317";
|
||||
rLen = 20897;
|
||||
rLoc = 14098;
|
||||
rType = 0;
|
||||
vrLen = 148;
|
||||
vrLoc = 22439;
|
||||
vrLen = 285;
|
||||
vrLoc = 14098;
|
||||
};
|
||||
8B962B2D2E9AD3DA000EAC04 /* PBXTextBookmark */ = {
|
||||
8B5C9E352EB51644008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Buss.h */;
|
||||
name = "ConsoleX2Buss.h: 97";
|
||||
rLen = 0;
|
||||
rLoc = 4804;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */;
|
||||
name = "ConsoleX2Buss.cpp: 317";
|
||||
rLen = 20897;
|
||||
rLoc = 14098;
|
||||
rType = 0;
|
||||
vrLen = 112;
|
||||
vrLoc = 4700;
|
||||
};
|
||||
8B962BA12E9AD778000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Buss.h */;
|
||||
name = "ConsoleX2Buss.h: 97";
|
||||
rLen = 0;
|
||||
rLoc = 4804;
|
||||
rType = 0;
|
||||
vrLen = 61;
|
||||
vrLoc = 4751;
|
||||
vrLen = 285;
|
||||
vrLoc = 14098;
|
||||
};
|
||||
8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1308, 15822}}";
|
||||
sepNavSelRange = "{39367, 15}";
|
||||
sepNavVisRange = "{38789, 1325}";
|
||||
sepNavWindowFrame = "{{-6, 75}, {1066, 786}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1056, 13716}}";
|
||||
sepNavSelRange = "{14098, 20897}";
|
||||
sepNavVisRange = "{14098, 285}";
|
||||
sepNavWindowFrame = "{{5, 38}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* ConsoleX2BussVersion.h */ = {
|
||||
|
|
@ -129,10 +118,10 @@
|
|||
};
|
||||
8BC6025B073B072D006C4272 /* ConsoleX2Buss.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {554, 4608}}";
|
||||
sepNavSelRange = "{4804, 0}";
|
||||
sepNavVisRange = "{4751, 61}";
|
||||
sepNavWindowFrame = "{{374, 68}, {1066, 786}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1146, 4086}}";
|
||||
sepNavSelRange = "{6056, 1375}";
|
||||
sepNavVisRange = "{4948, 1224}";
|
||||
sepNavWindowFrame = "{{10, 38}, {838, 820}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@
|
|||
<real>185</real>
|
||||
</array>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>13 282 810 487 0 0 1440 878 </string>
|
||||
<string>5 284 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXSmartGroupTreeModule</string>
|
||||
|
|
@ -340,7 +340,7 @@
|
|||
<key>PBXProjectModuleGUID</key>
|
||||
<string>8BD95EC52E957B6B00D77499</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ConsoleX2Buss.h</string>
|
||||
<string>ConsoleX2Buss.cpp</string>
|
||||
<key>PBXSplitModuleInNavigatorKey</key>
|
||||
<dict>
|
||||
<key>Split0</key>
|
||||
|
|
@ -348,16 +348,15 @@
|
|||
<key>PBXProjectModuleGUID</key>
|
||||
<string>8BD95EC62E957B6B00D77499</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ConsoleX2Buss.h</string>
|
||||
<string>ConsoleX2Buss.cpp</string>
|
||||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>8B962BA12E9AD778000EAC04</string>
|
||||
<string>8B5C9E352EB51644008B9860</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>8B962AAA2E9AD07A000EAC04</string>
|
||||
<string>8B962ADC2E9AD297000EAC04</string>
|
||||
<string>8B962B2D2E9AD3DA000EAC04</string>
|
||||
<string>8B5C9E332EB51644008B9860</string>
|
||||
<string>8B5C9E342EB51644008B9860</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
|
|
@ -371,18 +370,18 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {603, 86}}</string>
|
||||
<string>{{0, 0}, {603, 132}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>13 282 810 487 0 0 1440 878 </string>
|
||||
<string>5 284 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
<key>Proportion</key>
|
||||
<string>86pt</string>
|
||||
<string>132pt</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Proportion</key>
|
||||
<string>355pt</string>
|
||||
<string>309pt</string>
|
||||
<key>Tabs</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
@ -396,9 +395,9 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {603, 328}}</string>
|
||||
<string>{{10, 27}, {603, 282}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>13 282 810 487 0 0 1440 878 </string>
|
||||
<string>5 284 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>XCDetailModule</string>
|
||||
|
|
@ -452,7 +451,7 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {603, 414}}</string>
|
||||
<string>{{10, 27}, {603, 401}}</string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXBuildResultsModule</string>
|
||||
|
|
@ -480,11 +479,11 @@
|
|||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>8B962B7F2E9AD6A6000EAC04</string>
|
||||
<string>8B5C9E362EB51644008B9860</string>
|
||||
<string>1CA23ED40692098700951B8B</string>
|
||||
<string>8B962B802E9AD6A6000EAC04</string>
|
||||
<string>8B5C9E372EB51644008B9860</string>
|
||||
<string>8BD95EC52E957B6B00D77499</string>
|
||||
<string>8B962B812E9AD6A6000EAC04</string>
|
||||
<string>8B5C9E382EB51644008B9860</string>
|
||||
<string>1CA23EDF0692099D00951B8B</string>
|
||||
<string>1CA23EE00692099D00951B8B</string>
|
||||
<string>1CA23EE10692099D00951B8B</string>
|
||||
|
|
@ -657,7 +656,7 @@
|
|||
<key>StatusbarIsVisible</key>
|
||||
<true/>
|
||||
<key>TimeStamp</key>
|
||||
<real>781899640.115731</real>
|
||||
<real>783619652.93727398</real>
|
||||
<key>ToolbarConfigUserDefaultsMinorVersion</key>
|
||||
<string>2</string>
|
||||
<key>ToolbarDisplayMode</key>
|
||||
|
|
@ -674,10 +673,11 @@
|
|||
<integer>5</integer>
|
||||
<key>WindowOrderList</key>
|
||||
<array>
|
||||
<string>8B5C9E392EB51644008B9860</string>
|
||||
<string>/Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj</string>
|
||||
</array>
|
||||
<key>WindowString</key>
|
||||
<string>13 282 810 487 0 0 1440 878 </string>
|
||||
<string>5 284 810 487 0 0 1440 878 </string>
|
||||
<key>WindowToolsV3</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
|||
|
|
@ -76,6 +76,7 @@ ConsoleX2Channel::ConsoleX2Channel(AudioUnit component)
|
|||
SetParameter(kParam_O, kDefaultValue_ParamO );
|
||||
SetParameter(kParam_P, kDefaultValue_ParamP );
|
||||
SetParameter(kParam_Q, kDefaultValue_ParamQ );
|
||||
SetParameter(kParam_R, kDefaultValue_ParamR );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
|
|
@ -114,10 +115,9 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
{
|
||||
case kParam_A:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterAName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterAUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Indexed;
|
||||
outParameterInfo.minValue = 0;
|
||||
outParameterInfo.maxValue = 4;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamA;
|
||||
break;
|
||||
case kParam_B:
|
||||
|
|
@ -129,7 +129,8 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_C:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterCName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterCUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamC;
|
||||
|
|
@ -143,8 +144,7 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_E:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterEUnit;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamE;
|
||||
|
|
@ -158,7 +158,8 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_G:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterGName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterGUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamG;
|
||||
|
|
@ -172,8 +173,7 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_I:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterIName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterIUnit;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamI;
|
||||
|
|
@ -187,7 +187,8 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_K:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterKName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterKUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamK;
|
||||
|
|
@ -201,9 +202,8 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_M:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterMName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterMUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamM;
|
||||
break;
|
||||
|
|
@ -236,7 +236,14 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamQ;
|
||||
break;
|
||||
default:
|
||||
case kParam_R:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterRName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamR;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
|
|
@ -356,7 +363,17 @@ ComponentResult ConsoleX2Channel::Reset(AudioUnitScope inScope, AudioUnitElemen
|
|||
dBaXL = 1;
|
||||
dBaXR = 1;
|
||||
//Discontapeity
|
||||
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
panA = 0.5; panB = 0.5;
|
||||
|
|
@ -383,20 +400,33 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double moreTapeHack = (GetParameter( kParam_B )*2.0)+1.0;
|
||||
switch ((int)GetParameter( kParam_A )){
|
||||
case 0: moreTapeHack *= 0.5; break;
|
||||
case 1: break;
|
||||
case 2: moreTapeHack *= 2.0; break;
|
||||
case 3: moreTapeHack *= 4.0; break;
|
||||
case 4: moreTapeHack *= 8.0; break;
|
||||
}
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_B )*0.42,3.0)*overallscale,0.00001);
|
||||
//Discontapeity
|
||||
|
||||
double trebleGain = (GetParameter( kParam_A )-0.5)*2.0;
|
||||
double trebleGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (GetParameter( kParam_B )-0.5)*2.0;
|
||||
double highmidGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
double lowmidGain = (GetParameter( kParam_E )-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
double bassGain = (GetParameter( kParam_F )-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = GetParameter( kParam_E )-0.5;
|
||||
double highmidRef = GetParameter( kParam_F )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_G )-0.5;
|
||||
double bassRef = GetParameter( kParam_H )-0.5;
|
||||
double trebleRef = GetParameter( kParam_G )-0.5;
|
||||
double highmidRef = GetParameter( kParam_H )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_I )-0.5;
|
||||
double bassRef = GetParameter( kParam_J )-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
|
@ -409,8 +439,8 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/GetSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -419,8 +449,8 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -429,97 +459,93 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_J ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_K ),12.0) / overallscale;
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_K ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_L ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_M ),12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(GetParameter( kParam_L ),4.0),sqrt(bezCThresh+1.0));
|
||||
double gate = pow(pow(GetParameter( kParam_N ),4.0),sqrt(bezCThresh+1.0));
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_M ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_N ),overallscale+2.0); //the highpass
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_O ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_P ),overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_O )*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (GetParameter( kParam_O )*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = GetParameter( kParam_P )*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_Q )*2.0;
|
||||
|
||||
panA = panB; panB = GetParameter( kParam_Q )*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_R )*2.0;
|
||||
//Console
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
|
|
@ -528,6 +554,99 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreTapeHack;
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreTapeHack;
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
|
|
@ -787,62 +906,7 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
} //blank out lowpass if just switched off
|
||||
}
|
||||
//Cabs2
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
|
|
@ -850,19 +914,16 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 0.763932022500211;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
inputSampleL *= 0.618033988749895;
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
else if (inputSampleL > 0.0) inputSampleL = -expm1((log1p(-inputSampleL) * 1.618033988749895));
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
else if (inputSampleL < 0.0) inputSampleL = expm1((log1p(inputSampleL) * 1.618033988749895));
|
||||
|
||||
inputSampleR *= 0.618033988749895;
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
else if (inputSampleR > 0.0) inputSampleR = -expm1((log1p(-inputSampleR) * 1.618033988749895));
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
|
|
|
|||
|
|
@ -54,46 +54,47 @@
|
|||
#pragma mark ____ConsoleX2Channel Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamA = 0.5;
|
||||
static const float kDefaultValue_ParamB = 0.5;
|
||||
static const int kDefaultValue_ParamA = 1;
|
||||
static const float kDefaultValue_ParamB = 0.0;
|
||||
static const float kDefaultValue_ParamC = 0.5;
|
||||
static const float kDefaultValue_ParamD = 0.5;
|
||||
static const float kDefaultValue_ParamE = 0.5;
|
||||
static const float kDefaultValue_ParamF = 0.5;
|
||||
static const float kDefaultValue_ParamG = 0.5;
|
||||
static const float kDefaultValue_ParamH = 0.5;
|
||||
static const float kDefaultValue_ParamI = 1.0;
|
||||
static const float kDefaultValue_ParamI = 0.5;
|
||||
static const float kDefaultValue_ParamJ = 0.5;
|
||||
static const float kDefaultValue_ParamK = 0.5;
|
||||
static const float kDefaultValue_ParamL = 0.0;
|
||||
static const float kDefaultValue_ParamM = 1.0;
|
||||
static const float kDefaultValue_ParamK = 1.0;
|
||||
static const float kDefaultValue_ParamL = 0.5;
|
||||
static const float kDefaultValue_ParamM = 0.5;
|
||||
static const float kDefaultValue_ParamN = 0.0;
|
||||
static const float kDefaultValue_ParamO = 0.0;
|
||||
static const float kDefaultValue_ParamP = 0.5;
|
||||
static const float kDefaultValue_ParamO = 1.0;
|
||||
static const float kDefaultValue_ParamP = 0.0;
|
||||
static const float kDefaultValue_ParamQ = 0.5;
|
||||
static const float kDefaultValue_ParamR = 0.5;
|
||||
|
||||
static CFStringRef kParameterAUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterAName = CFSTR("High");
|
||||
static CFStringRef kParameterBName = CFSTR("HMid");
|
||||
static CFStringRef kParameterCName = CFSTR("LMid");
|
||||
static CFStringRef kParameterDName = CFSTR("Bass");
|
||||
static CFStringRef kParameterEUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterEName = CFSTR("HighF");
|
||||
static CFStringRef kParameterFName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterGName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterHName = CFSTR("BassF");
|
||||
static CFStringRef kParameterIUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterIName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterJName = CFSTR("Attack");
|
||||
static CFStringRef kParameterKName = CFSTR("Release");
|
||||
static CFStringRef kParameterLName = CFSTR("Gate");
|
||||
static CFStringRef kParameterMUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterMName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterNName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterOUnit = CFSTR("+");
|
||||
static CFStringRef kParameterOName = CFSTR("More");
|
||||
static CFStringRef kParameterPName = CFSTR("Pan");
|
||||
static CFStringRef kParameterQName = CFSTR("Fader");
|
||||
static CFStringRef kParameterAName = CFSTR("Trim");
|
||||
static CFStringRef kParameterBName = CFSTR("More");
|
||||
static CFStringRef kParameterCUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterCName = CFSTR("High");
|
||||
static CFStringRef kParameterDName = CFSTR("HMid");
|
||||
static CFStringRef kParameterEName = CFSTR("LMid");
|
||||
static CFStringRef kParameterFName = CFSTR("Bass");
|
||||
static CFStringRef kParameterGUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterGName = CFSTR("HighF");
|
||||
static CFStringRef kParameterHName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterIName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterJName = CFSTR("BassF");
|
||||
static CFStringRef kParameterKUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterKName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterLName = CFSTR("Attack");
|
||||
static CFStringRef kParameterMName = CFSTR("Release");
|
||||
static CFStringRef kParameterNName = CFSTR("Gate");
|
||||
static CFStringRef kParameterOUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterOName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterPName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterQName = CFSTR("Pan");
|
||||
static CFStringRef kParameterRName = CFSTR("Fader");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
|
|
@ -113,8 +114,9 @@ enum {
|
|||
kParam_O =14,
|
||||
kParam_P =15,
|
||||
kParam_Q =16,
|
||||
kParam_R =17,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=17
|
||||
kNumberOfParameters=18
|
||||
};
|
||||
|
||||
const int dscBuf = 256;
|
||||
|
|
@ -243,6 +245,23 @@ public:
|
|||
int dBaXR;
|
||||
//Discontapeity
|
||||
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double panA;
|
||||
double panB;
|
||||
double inTrimA;
|
||||
|
|
|
|||
|
|
@ -51,19 +51,39 @@
|
|||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 781897277;
|
||||
PBXWorkspaceStateSaveDate = 781897277;
|
||||
PBXPerProjectTemplateStateSaveDate = 783603960;
|
||||
PBXWorkspaceStateSaveDate = 783603960;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B692BE12EB4E21700F51381 /* PBXTextBookmark */ = 8B692BE12EB4E21700F51381 /* PBXTextBookmark */;
|
||||
8B692BE22EB4E21700F51381 /* PBXTextBookmark */ = 8B692BE22EB4E21700F51381 /* PBXTextBookmark */;
|
||||
8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */ = 8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */;
|
||||
8B9629DA2E9AC7DA000EAC04 /* PBXTextBookmark */ = 8B9629DA2E9AC7DA000EAC04 /* PBXTextBookmark */;
|
||||
8B962AF92E9AD2D8000EAC04 /* PBXTextBookmark */ = 8B962AF92E9AD2D8000EAC04 /* PBXTextBookmark */;
|
||||
8B962AFA2E9AD2D8000EAC04 /* PBXTextBookmark */ = 8B962AFA2E9AD2D8000EAC04 /* PBXTextBookmark */;
|
||||
8BAA80A32EA691D900A83054 /* PBXTextBookmark */ = 8BAA80A32EA691D900A83054 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B692BE12EB4E21700F51381 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */;
|
||||
name = "ConsoleX2Channel.cpp: 377";
|
||||
rLen = 0;
|
||||
rLoc = 16627;
|
||||
rType = 0;
|
||||
vrLen = 22;
|
||||
vrLoc = 54;
|
||||
};
|
||||
8B692BE22EB4E21700F51381 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */;
|
||||
name = "ConsoleX2Channel.cpp: 377";
|
||||
rLen = 0;
|
||||
rLoc = 16627;
|
||||
rType = 0;
|
||||
vrLen = 22;
|
||||
vrLoc = 54;
|
||||
};
|
||||
8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A690720730100365D66 /* ConsoleX2ChannelVersion.h */;
|
||||
|
|
@ -74,42 +94,20 @@
|
|||
vrLen = 258;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8B9629DA2E9AC7DA000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */;
|
||||
name = "ConsoleX2Channel.h: 230";
|
||||
rLen = 0;
|
||||
rLoc = 8099;
|
||||
rType = 0;
|
||||
vrLen = 141;
|
||||
vrLoc = 7736;
|
||||
};
|
||||
8B962AF92E9AD2D8000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */;
|
||||
name = "ConsoleX2Channel.cpp: 355";
|
||||
rLen = 0;
|
||||
rLoc = 15850;
|
||||
rType = 0;
|
||||
vrLen = 103;
|
||||
vrLoc = 15621;
|
||||
};
|
||||
8B962AFA2E9AD2D8000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */;
|
||||
name = "ConsoleX2Channel.h: 235";
|
||||
rLen = 0;
|
||||
rLoc = 8099;
|
||||
rType = 0;
|
||||
vrLen = 105;
|
||||
vrLoc = 7686;
|
||||
};
|
||||
8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1019, 15912}}";
|
||||
sepNavSelRange = "{10994, 0}";
|
||||
sepNavVisRange = "{10196, 2001}";
|
||||
sepNavWindowFrame = "{{22, 92}, {1066, 786}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {696, 17226}}";
|
||||
sepNavSelRange = "{16627, 0}";
|
||||
sepNavVisRange = "{54, 22}";
|
||||
sepNavWindowFrame = "{{6, 88}, {931, 746}}";
|
||||
};
|
||||
};
|
||||
8BA05A670720730100365D66 /* ConsoleX2Channel.exp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {609, 616}}";
|
||||
sepNavSelRange = "{0, 23}";
|
||||
sepNavVisRange = "{0, 23}";
|
||||
sepNavWindowFrame = "{{15, 129}, {656, 744}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* ConsoleX2ChannelVersion.h */ = {
|
||||
|
|
@ -127,12 +125,22 @@
|
|||
sepNavVisRange = "{0, 1336}";
|
||||
};
|
||||
};
|
||||
8BAA80A32EA691D900A83054 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */;
|
||||
name = "ConsoleX2Channel.h: 235";
|
||||
rLen = 0;
|
||||
rLoc = 8160;
|
||||
rType = 0;
|
||||
vrLen = 76;
|
||||
vrLoc = 7715;
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {705, 4968}}";
|
||||
sepNavSelRange = "{8099, 0}";
|
||||
sepNavVisRange = "{7686, 105}";
|
||||
sepNavWindowFrame = "{{8, 39}, {656, 839}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1146, 5058}}";
|
||||
sepNavSelRange = "{8317, 299}";
|
||||
sepNavVisRange = "{3331, 1640}";
|
||||
sepNavWindowFrame = "{{2, 39}, {656, 839}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@
|
|||
<real>185</real>
|
||||
</array>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>37 201 810 487 0 0 1440 878 </string>
|
||||
<string>9 258 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXSmartGroupTreeModule</string>
|
||||
|
|
@ -340,7 +340,7 @@
|
|||
<key>PBXProjectModuleGUID</key>
|
||||
<string>8BD95EA72E957B1200D77499</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ConsoleX2Channel.h</string>
|
||||
<string>ConsoleX2Channel.cpp</string>
|
||||
<key>PBXSplitModuleInNavigatorKey</key>
|
||||
<dict>
|
||||
<key>Split0</key>
|
||||
|
|
@ -348,16 +348,16 @@
|
|||
<key>PBXProjectModuleGUID</key>
|
||||
<string>8BD95EA82E957B1200D77499</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ConsoleX2Channel.h</string>
|
||||
<string>ConsoleX2Channel.cpp</string>
|
||||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>8B962AFA2E9AD2D8000EAC04</string>
|
||||
<string>8B692BE22EB4E21700F51381</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>8B9629D92E9AC7DA000EAC04</string>
|
||||
<string>8B962AF92E9AD2D8000EAC04</string>
|
||||
<string>8B9629DA2E9AC7DA000EAC04</string>
|
||||
<string>8BAA80A32EA691D900A83054</string>
|
||||
<string>8B692BE12EB4E21700F51381</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
|
|
@ -371,18 +371,18 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {603, 117}}</string>
|
||||
<string>{{0, 0}, {603, 51}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>37 201 810 487 0 0 1440 878 </string>
|
||||
<string>9 258 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
<key>Proportion</key>
|
||||
<string>117pt</string>
|
||||
<string>51pt</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Proportion</key>
|
||||
<string>324pt</string>
|
||||
<string>390pt</string>
|
||||
<key>Tabs</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
@ -396,9 +396,9 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {603, 297}}</string>
|
||||
<string>{{10, 27}, {603, 363}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>37 201 810 487 0 0 1440 878 </string>
|
||||
<string>9 258 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>XCDetailModule</string>
|
||||
|
|
@ -452,7 +452,7 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {603, 414}}</string>
|
||||
<string>{{10, 27}, {603, 345}}</string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXBuildResultsModule</string>
|
||||
|
|
@ -480,11 +480,11 @@
|
|||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>8B962AFB2E9AD2D8000EAC04</string>
|
||||
<string>8B692BE32EB4E21700F51381</string>
|
||||
<string>1CA23ED40692098700951B8B</string>
|
||||
<string>8B962AFC2E9AD2D8000EAC04</string>
|
||||
<string>8B692BE42EB4E21700F51381</string>
|
||||
<string>8BD95EA72E957B1200D77499</string>
|
||||
<string>8B962AFD2E9AD2D8000EAC04</string>
|
||||
<string>8B692BE52EB4E21700F51381</string>
|
||||
<string>1CA23EDF0692099D00951B8B</string>
|
||||
<string>1CA23EE00692099D00951B8B</string>
|
||||
<string>1CA23EE10692099D00951B8B</string>
|
||||
|
|
@ -657,7 +657,7 @@
|
|||
<key>StatusbarIsVisible</key>
|
||||
<true/>
|
||||
<key>TimeStamp</key>
|
||||
<real>781898456.47562802</real>
|
||||
<real>783606295.64856899</real>
|
||||
<key>ToolbarConfigUserDefaultsMinorVersion</key>
|
||||
<string>2</string>
|
||||
<key>ToolbarDisplayMode</key>
|
||||
|
|
@ -674,11 +674,10 @@
|
|||
<integer>5</integer>
|
||||
<key>WindowOrderList</key>
|
||||
<array>
|
||||
<string>8B962AFE2E9AD2D8000EAC04</string>
|
||||
<string>/Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj</string>
|
||||
</array>
|
||||
<key>WindowString</key>
|
||||
<string>37 201 810 487 0 0 1440 878 </string>
|
||||
<string>9 258 810 487 0 0 1440 878 </string>
|
||||
<key>WindowToolsV3</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ ConsoleX2Pre::ConsoleX2Pre(AudioUnit component)
|
|||
SetParameter(kParam_N, kDefaultValue_ParamN );
|
||||
SetParameter(kParam_O, kDefaultValue_ParamO );
|
||||
SetParameter(kParam_P, kDefaultValue_ParamP );
|
||||
SetParameter(kParam_Q, kDefaultValue_ParamQ );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
|
|
@ -113,10 +114,9 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
{
|
||||
case kParam_A:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterAName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterAUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Indexed;
|
||||
outParameterInfo.minValue = 0;
|
||||
outParameterInfo.maxValue = 4;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamA;
|
||||
break;
|
||||
case kParam_B:
|
||||
|
|
@ -128,7 +128,8 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_C:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterCName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterCUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamC;
|
||||
|
|
@ -142,8 +143,7 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_E:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterEUnit;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamE;
|
||||
|
|
@ -157,7 +157,8 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_G:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterGName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterGUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamG;
|
||||
|
|
@ -171,8 +172,7 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_I:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterIName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterIUnit;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamI;
|
||||
|
|
@ -186,7 +186,8 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_K:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterKName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterKUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamK;
|
||||
|
|
@ -200,9 +201,8 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_M:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterMName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterMUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamM;
|
||||
break;
|
||||
|
|
@ -228,7 +228,14 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamP;
|
||||
break;
|
||||
default:
|
||||
case kParam_Q:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterQName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamQ;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
|
|
@ -324,9 +331,20 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Reset()
|
|||
dBaXL = 1;
|
||||
//Discontapeity
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0;
|
||||
lastSlewpleL = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
|
||||
}
|
||||
|
||||
|
|
@ -345,20 +363,33 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
|
||||
double trebleGain = (GetParameter( kParam_A )-0.5)*2.0;
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double moreTapeHack = (GetParameter( kParam_B )*2.0)+1.0;
|
||||
switch ((int)GetParameter( kParam_A )){
|
||||
case 0: moreTapeHack *= 0.5; break;
|
||||
case 1: break;
|
||||
case 2: moreTapeHack *= 2.0; break;
|
||||
case 3: moreTapeHack *= 4.0; break;
|
||||
case 4: moreTapeHack *= 8.0; break;
|
||||
}
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_B )*0.42,3.0)*overallscale,0.00001);
|
||||
//Discontapeity
|
||||
|
||||
double trebleGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (GetParameter( kParam_B )-0.5)*2.0;
|
||||
double highmidGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
double lowmidGain = (GetParameter( kParam_E )-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
double bassGain = (GetParameter( kParam_F )-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = GetParameter( kParam_E )-0.5;
|
||||
double highmidRef = GetParameter( kParam_F )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_G )-0.5;
|
||||
double bassRef = GetParameter( kParam_H )-0.5;
|
||||
double trebleRef = GetParameter( kParam_G )-0.5;
|
||||
double highmidRef = GetParameter( kParam_H )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_I )-0.5;
|
||||
double bassRef = GetParameter( kParam_J )-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
|
@ -371,8 +402,8 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/GetSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -381,8 +412,8 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -391,102 +422,158 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_J ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_K ),12.0) / overallscale;
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_K ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_L ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_M ),12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(GetParameter( kParam_L ),4.0),sqrt(bezCThresh+1.0));
|
||||
double gate = pow(pow(GetParameter( kParam_N ),4.0),sqrt(bezCThresh+1.0));
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_M ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_N ),overallscale+2.0); //the highpass
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_O ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_P ),overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_O )*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (GetParameter( kParam_O )*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_P )*2.0;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_Q )*2.0;
|
||||
//Console
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
double inputSampleL = *sourceP;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpd * 1.18e-17;
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];}
|
||||
darkSampleL /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];}
|
||||
darkSampleL /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];}
|
||||
darkSampleL /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];}
|
||||
darkSampleL /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];}
|
||||
darkSampleL /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreTapeHack;
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
|
|
@ -592,7 +679,6 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
|
||||
double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5;
|
||||
|
||||
if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
if (bezGate < 1.0 && gate > 0.0) inputSampleL *= bezGate;
|
||||
|
|
@ -637,40 +723,12 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
}
|
||||
//Cabs2
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
|
||||
inputSampleL *= gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
//applies smoothed fader gain
|
||||
|
||||
//begin 32 bit floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
|
|
|
|||
|
|
@ -54,44 +54,45 @@
|
|||
#pragma mark ____ConsoleX2Pre Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamA = 0.5;
|
||||
static const float kDefaultValue_ParamB = 0.5;
|
||||
static const int kDefaultValue_ParamA = 1;
|
||||
static const float kDefaultValue_ParamB = 0.0;
|
||||
static const float kDefaultValue_ParamC = 0.5;
|
||||
static const float kDefaultValue_ParamD = 0.5;
|
||||
static const float kDefaultValue_ParamE = 0.5;
|
||||
static const float kDefaultValue_ParamF = 0.5;
|
||||
static const float kDefaultValue_ParamG = 0.5;
|
||||
static const float kDefaultValue_ParamH = 0.5;
|
||||
static const float kDefaultValue_ParamI = 1.0;
|
||||
static const float kDefaultValue_ParamI = 0.5;
|
||||
static const float kDefaultValue_ParamJ = 0.5;
|
||||
static const float kDefaultValue_ParamK = 0.5;
|
||||
static const float kDefaultValue_ParamL = 0.0;
|
||||
static const float kDefaultValue_ParamM = 1.0;
|
||||
static const float kDefaultValue_ParamK = 1.0;
|
||||
static const float kDefaultValue_ParamL = 0.5;
|
||||
static const float kDefaultValue_ParamM = 0.5;
|
||||
static const float kDefaultValue_ParamN = 0.0;
|
||||
static const float kDefaultValue_ParamO = 0.0;
|
||||
static const float kDefaultValue_ParamP = 0.5;
|
||||
static const float kDefaultValue_ParamO = 1.0;
|
||||
static const float kDefaultValue_ParamP = 0.0;
|
||||
static const float kDefaultValue_ParamQ = 0.5;
|
||||
|
||||
static CFStringRef kParameterAUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterAName = CFSTR("High");
|
||||
static CFStringRef kParameterBName = CFSTR("HMid");
|
||||
static CFStringRef kParameterCName = CFSTR("LMid");
|
||||
static CFStringRef kParameterDName = CFSTR("Bass");
|
||||
static CFStringRef kParameterEUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterEName = CFSTR("HighF");
|
||||
static CFStringRef kParameterFName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterGName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterHName = CFSTR("BassF");
|
||||
static CFStringRef kParameterIUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterIName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterJName = CFSTR("Attack");
|
||||
static CFStringRef kParameterKName = CFSTR("Release");
|
||||
static CFStringRef kParameterLName = CFSTR("Gate");
|
||||
static CFStringRef kParameterMUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterMName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterNName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterOUnit = CFSTR("+");
|
||||
static CFStringRef kParameterOName = CFSTR("More");
|
||||
static CFStringRef kParameterPName = CFSTR("Fader");
|
||||
static CFStringRef kParameterAName = CFSTR("Trim");
|
||||
static CFStringRef kParameterBName = CFSTR("More");
|
||||
static CFStringRef kParameterCUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterCName = CFSTR("High");
|
||||
static CFStringRef kParameterDName = CFSTR("HMid");
|
||||
static CFStringRef kParameterEName = CFSTR("LMid");
|
||||
static CFStringRef kParameterFName = CFSTR("Bass");
|
||||
static CFStringRef kParameterGUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterGName = CFSTR("HighF");
|
||||
static CFStringRef kParameterHName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterIName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterJName = CFSTR("BassF");
|
||||
static CFStringRef kParameterKUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterKName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterLName = CFSTR("Attack");
|
||||
static CFStringRef kParameterMName = CFSTR("Release");
|
||||
static CFStringRef kParameterNName = CFSTR("Gate");
|
||||
static CFStringRef kParameterOUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterOName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterPName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterQName = CFSTR("Fader");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
|
|
@ -110,8 +111,9 @@ enum {
|
|||
kParam_N =13,
|
||||
kParam_O =14,
|
||||
kParam_P =15,
|
||||
kParam_Q =16,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=16
|
||||
kNumberOfParameters=17
|
||||
};
|
||||
|
||||
const int dscBuf = 256;
|
||||
|
|
@ -238,6 +240,16 @@ public:
|
|||
int dBaXL;
|
||||
//Discontapeity
|
||||
|
||||
double avg32L[33];
|
||||
double avg16L[17];
|
||||
double avg8L[9];
|
||||
double avg4L[5];
|
||||
double avg2L[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewpleL;
|
||||
//preTapeHack
|
||||
|
||||
double inTrimA;
|
||||
double inTrimB;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
292,
|
||||
167,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
|
|
@ -51,82 +51,71 @@
|
|||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 781916083;
|
||||
PBXWorkspaceStateSaveDate = 781916083;
|
||||
PBXPerProjectTemplateStateSaveDate = 783603927;
|
||||
PBXWorkspaceStateSaveDate = 783603927;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B962AF02E9AD2C4000EAC04 /* PBXTextBookmark */ = 8B962AF02E9AD2C4000EAC04 /* PBXTextBookmark */;
|
||||
8B962B712E9AD519000EAC04 /* PBXTextBookmark */ = 8B962B712E9AD519000EAC04 /* PBXTextBookmark */;
|
||||
8B962B722E9AD519000EAC04 /* PBXTextBookmark */ = 8B962B722E9AD519000EAC04 /* PBXTextBookmark */;
|
||||
8B962BEF2E9B17D7000EAC04 /* PBXTextBookmark */ = 8B962BEF2E9B17D7000EAC04 /* PBXTextBookmark */;
|
||||
8B692B762EB4D66E00F51381 /* PBXTextBookmark */ = 8B692B762EB4D66E00F51381 /* PBXTextBookmark */;
|
||||
8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */ = 8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */;
|
||||
8BC5BE482EB1697700031C01 /* PBXTextBookmark */ = 8BC5BE482EB1697700031C01 /* PBXTextBookmark */;
|
||||
8BD964C72E95AA0700D77499 /* PlistBookmark */ = 8BD964C72E95AA0700D77499 /* PlistBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B962AF02E9AD2C4000EAC04 /* PBXTextBookmark */ = {
|
||||
8B692B762EB4D66E00F51381 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */;
|
||||
name = "ConsoleX2Pre.cpp: 698";
|
||||
rLen = 0;
|
||||
rLoc = 31458;
|
||||
rType = 0;
|
||||
vrLen = 66;
|
||||
vrLoc = 3;
|
||||
};
|
||||
8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */;
|
||||
name = "ConsoleX2Pre.cpp: 698";
|
||||
rLen = 0;
|
||||
rLoc = 31458;
|
||||
rType = 0;
|
||||
vrLen = 40;
|
||||
vrLoc = 29;
|
||||
};
|
||||
8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1065, 13572}}";
|
||||
sepNavSelRange = "{31458, 0}";
|
||||
sepNavVisRange = "{29, 40}";
|
||||
sepNavWindowFrame = "{{19, 92}, {1066, 786}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* ConsoleX2PreVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {426, 1116}}";
|
||||
sepNavSelRange = "{2927, 0}";
|
||||
sepNavVisRange = "{3, 306}";
|
||||
sepNavWindowFrame = "{{61, 45}, {1066, 786}}";
|
||||
};
|
||||
};
|
||||
8BC5BE482EB1697700031C01 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A690720730100365D66 /* ConsoleX2PreVersion.h */;
|
||||
name = "ConsoleX2PreVersion.h: 54";
|
||||
rLen = 0;
|
||||
rLoc = 2927;
|
||||
rType = 0;
|
||||
vrLen = 134;
|
||||
vrLoc = 2847;
|
||||
};
|
||||
8B962B712E9AD519000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Pre.h */;
|
||||
name = "ConsoleX2Pre.h: 94";
|
||||
rLen = 0;
|
||||
rLoc = 4648;
|
||||
rType = 0;
|
||||
vrLen = 54;
|
||||
vrLoc = 4648;
|
||||
};
|
||||
8B962B722E9AD519000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */;
|
||||
name = "ConsoleX2Pre.cpp: 612";
|
||||
rLen = 0;
|
||||
rLoc = 27730;
|
||||
rType = 0;
|
||||
vrLen = 66;
|
||||
vrLoc = 27634;
|
||||
};
|
||||
8B962BEF2E9B17D7000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */;
|
||||
name = "ConsoleX2Pre.cpp: 612";
|
||||
rLen = 0;
|
||||
rLoc = 27730;
|
||||
rType = 0;
|
||||
vrLen = 20;
|
||||
vrLoc = 27680;
|
||||
};
|
||||
8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1065, 12510}}";
|
||||
sepNavSelRange = "{27730, 0}";
|
||||
sepNavVisRange = "{27680, 20}";
|
||||
sepNavWindowFrame = "{{374, 88}, {1066, 786}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* ConsoleX2PreVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {696, 1296}}";
|
||||
sepNavSelRange = "{2927, 0}";
|
||||
sepNavVisRange = "{2847, 134}";
|
||||
sepNavWindowFrame = "{{61, 45}, {1066, 786}}";
|
||||
};
|
||||
vrLen = 306;
|
||||
vrLoc = 3;
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* ConsoleX2Pre.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {498, 4572}}";
|
||||
sepNavSelRange = "{4648, 0}";
|
||||
sepNavVisRange = "{4648, 54}";
|
||||
sepNavWindowFrame = "{{374, 63}, {1066, 786}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1146, 4734}}";
|
||||
sepNavSelRange = "{8318, 0}";
|
||||
sepNavVisRange = "{3264, 1603}";
|
||||
sepNavWindowFrame = "{{7, 38}, {657, 832}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
|
|
|
|||
|
|
@ -225,8 +225,8 @@
|
|||
<array/>
|
||||
<key>PerspectiveWidths</key>
|
||||
<array>
|
||||
<integer>841</integer>
|
||||
<integer>841</integer>
|
||||
<integer>716</integer>
|
||||
<integer>716</integer>
|
||||
</array>
|
||||
<key>Perspectives</key>
|
||||
<array>
|
||||
|
|
@ -302,14 +302,14 @@
|
|||
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
|
||||
<array>
|
||||
<array>
|
||||
<integer>4</integer>
|
||||
<integer>3</integer>
|
||||
<integer>2</integer>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</array>
|
||||
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
|
||||
<string>{{0, 0}, {288, 595}}</string>
|
||||
<string>{{0, 0}, {288, 452}}</string>
|
||||
</dict>
|
||||
<key>PBXTopSmartGroupGIDs</key>
|
||||
<array/>
|
||||
|
|
@ -319,14 +319,14 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {305, 613}}</string>
|
||||
<string>{{0, 0}, {305, 470}}</string>
|
||||
<key>GroupTreeTableConfiguration</key>
|
||||
<array>
|
||||
<string>MainColumn</string>
|
||||
<real>288</real>
|
||||
</array>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>599 187 841 654 0 0 1440 878 </string>
|
||||
<string>25 209 716 511 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXSmartGroupTreeModule</string>
|
||||
|
|
@ -354,13 +354,12 @@
|
|||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>8B962BEF2E9B17D7000EAC04</string>
|
||||
<string>8B692BBF2EB4DCD400F51381</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>8BD964C72E95AA0700D77499</string>
|
||||
<string>8B962AF02E9AD2C4000EAC04</string>
|
||||
<string>8B962B712E9AD519000EAC04</string>
|
||||
<string>8B962B722E9AD519000EAC04</string>
|
||||
<string>8BC5BE482EB1697700031C01</string>
|
||||
<string>8B692B762EB4D66E00F51381</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
|
|
@ -374,18 +373,18 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {531, 49}}</string>
|
||||
<string>{{0, 0}, {406, 94}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>599 187 841 654 0 0 1440 878 </string>
|
||||
<string>25 209 716 511 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
<key>Proportion</key>
|
||||
<string>49pt</string>
|
||||
<string>94pt</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Proportion</key>
|
||||
<string>559pt</string>
|
||||
<string>371pt</string>
|
||||
<key>Tabs</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
@ -399,9 +398,9 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {531, 532}}</string>
|
||||
<string>{{10, 27}, {406, 344}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>599 187 841 654 0 0 1440 878 </string>
|
||||
<string>25 209 716 511 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>XCDetailModule</string>
|
||||
|
|
@ -455,7 +454,7 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {531, 445}}</string>
|
||||
<string>{{10, 27}, {406, 438}}</string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXBuildResultsModule</string>
|
||||
|
|
@ -464,7 +463,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>Proportion</key>
|
||||
<string>531pt</string>
|
||||
<string>406pt</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Name</key>
|
||||
|
|
@ -483,11 +482,11 @@
|
|||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>8B962BF02E9B17D7000EAC04</string>
|
||||
<string>8B692B8A2EB4D8DA00F51381</string>
|
||||
<string>1CA23ED40692098700951B8B</string>
|
||||
<string>8B962BF12E9B17D7000EAC04</string>
|
||||
<string>8B692B8B2EB4D8DA00F51381</string>
|
||||
<string>8BD7274A1D46E5A5000176F0</string>
|
||||
<string>8B962BF22E9B17D7000EAC04</string>
|
||||
<string>8B692B8C2EB4D8DA00F51381</string>
|
||||
<string>1CA23EDF0692099D00951B8B</string>
|
||||
<string>1CA23EE00692099D00951B8B</string>
|
||||
<string>1CA23EE10692099D00951B8B</string>
|
||||
|
|
@ -660,7 +659,7 @@
|
|||
<key>StatusbarIsVisible</key>
|
||||
<true/>
|
||||
<key>TimeStamp</key>
|
||||
<real>781916119.01407897</real>
|
||||
<real>783604948.76098895</real>
|
||||
<key>ToolbarConfigUserDefaultsMinorVersion</key>
|
||||
<string>2</string>
|
||||
<key>ToolbarDisplayMode</key>
|
||||
|
|
@ -677,11 +676,10 @@
|
|||
<integer>5</integer>
|
||||
<key>WindowOrderList</key>
|
||||
<array>
|
||||
<string>8B962BF32E9B17D7000EAC04</string>
|
||||
<string>/Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj</string>
|
||||
</array>
|
||||
<key>WindowString</key>
|
||||
<string>599 187 841 654 0 0 1440 878 </string>
|
||||
<string>25 209 716 511 0 0 1440 878 </string>
|
||||
<key>WindowToolsV3</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
|||
BIN
plugins/MacAU/X2Buss/English.lproj/InfoPlist.strings
Executable file
BIN
plugins/MacAU/X2Buss/English.lproj/InfoPlist.strings
Executable file
Binary file not shown.
28
plugins/MacAU/X2Buss/Info.plist
Executable file
28
plugins/MacAU/X2Buss/Info.plist
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.airwindows.audiounit.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PROJECTNAMEASIDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Dthr</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
5
plugins/MacAU/X2Buss/StarterAU_Prefix.pch
Executable file
5
plugins/MacAU/X2Buss/StarterAU_Prefix.pch
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Prefix header for all source files of the '«PROJECTNAMEASIDENTIFIER»' target in the '«PROJECTNAMEASIDENTIFIER»' project.
|
||||
//
|
||||
|
||||
#include <CoreServices/CoreServices.h>
|
||||
751
plugins/MacAU/X2Buss/X2Buss.cpp
Executable file
751
plugins/MacAU/X2Buss/X2Buss.cpp
Executable file
|
|
@ -0,0 +1,751 @@
|
|||
/*
|
||||
* File: X2Buss.cpp
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 10/31/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/*=============================================================================
|
||||
X2Buss.cpp
|
||||
|
||||
=============================================================================*/
|
||||
#include "X2Buss.h"
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
COMPONENT_ENTRY(X2Buss)
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::X2Buss
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
X2Buss::X2Buss(AudioUnit component)
|
||||
: AUEffectBase(component)
|
||||
{
|
||||
CreateElements();
|
||||
Globals()->UseIndexedParameters(kNumberOfParameters);
|
||||
SetParameter(kParam_A, kDefaultValue_ParamA );
|
||||
SetParameter(kParam_B, kDefaultValue_ParamB );
|
||||
SetParameter(kParam_C, kDefaultValue_ParamC );
|
||||
SetParameter(kParam_D, kDefaultValue_ParamD );
|
||||
SetParameter(kParam_E, kDefaultValue_ParamE );
|
||||
SetParameter(kParam_F, kDefaultValue_ParamF );
|
||||
SetParameter(kParam_G, kDefaultValue_ParamG );
|
||||
SetParameter(kParam_H, kDefaultValue_ParamH );
|
||||
SetParameter(kParam_I, kDefaultValue_ParamI );
|
||||
SetParameter(kParam_J, kDefaultValue_ParamJ );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::GetParameterValueStrings
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings)
|
||||
{
|
||||
|
||||
return kAudioUnitErr_InvalidProperty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::GetParameterInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo )
|
||||
{
|
||||
ComponentResult result = noErr;
|
||||
|
||||
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
|
||||
| kAudioUnitParameterFlag_IsReadable;
|
||||
|
||||
if (inScope == kAudioUnitScope_Global) {
|
||||
switch(inParameterID)
|
||||
{
|
||||
case kParam_A:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterAName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterAUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamA;
|
||||
break;
|
||||
case kParam_B:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterBName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamB;
|
||||
break;
|
||||
case kParam_C:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterCName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamC;
|
||||
break;
|
||||
case kParam_D:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterDName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamD;
|
||||
break;
|
||||
case kParam_E:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterEUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamE;
|
||||
break;
|
||||
case kParam_F:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterFName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamF;
|
||||
break;
|
||||
case kParam_G:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterGName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamG;
|
||||
break;
|
||||
case kParam_H:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterHName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamH;
|
||||
break;
|
||||
case kParam_I:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterIName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterIUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamI;
|
||||
break;
|
||||
case kParam_J:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterJName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamJ;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::GetPropertyInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::GetPropertyInfo (AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable)
|
||||
{
|
||||
return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// state that plugin supports only stereo-in/stereo-out processing
|
||||
UInt32 X2Buss::SupportedNumChannels(const AUChannelInfo ** outInfo)
|
||||
{
|
||||
if (outInfo != NULL)
|
||||
{
|
||||
static AUChannelInfo info;
|
||||
info.inChannels = 2;
|
||||
info.outChannels = 2;
|
||||
*outInfo = &info;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::GetProperty
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::GetProperty( AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData )
|
||||
{
|
||||
return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
|
||||
}
|
||||
|
||||
// X2Buss::Initialize
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::Initialize()
|
||||
{
|
||||
ComponentResult result = AUEffectBase::Initialize();
|
||||
if (result == noErr)
|
||||
Reset(kAudioUnitScope_Global, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark ____X2BussEffectKernel
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::X2BussKernel::Reset()
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::Reset(AudioUnitScope inScope, AudioUnitElement inElement)
|
||||
{
|
||||
for (int x = 0; x < biq_total; x++) {
|
||||
highA[x] = 0.0;
|
||||
highB[x] = 0.0;
|
||||
highC[x] = 0.0;
|
||||
midA[x] = 0.0;
|
||||
midB[x] = 0.0;
|
||||
midC[x] = 0.0;
|
||||
lowA[x] = 0.0;
|
||||
lowB[x] = 0.0;
|
||||
lowC[x] = 0.0;
|
||||
}
|
||||
highLIIR = 0.0;
|
||||
highRIIR = 0.0;
|
||||
midLIIR = 0.0;
|
||||
midRIIR = 0.0;
|
||||
lowLIIR = 0.0;
|
||||
lowRIIR = 0.0;
|
||||
//SmoothEQ2
|
||||
|
||||
for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;}
|
||||
bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0;
|
||||
bezCompS[bez_cycle] = 1.0;
|
||||
//Dynamics2
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::ProcessBufferLists
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
OSStatus X2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
|
||||
const AudioBufferList & inBuffer,
|
||||
AudioBufferList & outBuffer,
|
||||
UInt32 inFramesToProcess)
|
||||
{
|
||||
Float32 * inputL = (Float32*)(inBuffer.mBuffers[0].mData);
|
||||
Float32 * inputR = (Float32*)(inBuffer.mBuffers[1].mData);
|
||||
Float32 * outputL = (Float32*)(outBuffer.mBuffers[0].mData);
|
||||
Float32 * outputR = (Float32*)(outBuffer.mBuffers[1].mData);
|
||||
UInt32 nSampleFrames = inFramesToProcess;
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (GetParameter( kParam_A )-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (GetParameter( kParam_B )-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = GetParameter( kParam_E )-0.5;
|
||||
double highmidRef = GetParameter( kParam_F )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_G )-0.5;
|
||||
double bassRef = GetParameter( kParam_H )-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
||||
double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125);
|
||||
double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125);
|
||||
double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125);
|
||||
|
||||
highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate());
|
||||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/GetSampleRate());
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
||||
midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate());
|
||||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/GetSampleRate());
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
||||
lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate());
|
||||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/GetSampleRate());
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_I ), 12.360679774997898) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_I ),10.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez,0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.00001),1.0);
|
||||
//Dynamics2
|
||||
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_J )*2.0;
|
||||
//Console
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
double inputSampleL = *inputL;
|
||||
double inputSampleR = *inputR;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
else if (inputSampleL > 0.0) inputSampleL = -expm1((log1p(-inputSampleL) * 0.6180339887498949));
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
else if (inputSampleL < 0.0) inputSampleL = expm1((log1p(inputSampleL) * 0.6180339887498949));
|
||||
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
else if (inputSampleR > 0.0) inputSampleR = -expm1((log1p(-inputSampleR) * 0.6180339887498949));
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949));
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]);
|
||||
double highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1];
|
||||
midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2];
|
||||
midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]);
|
||||
double lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1];
|
||||
lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2];
|
||||
lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]);
|
||||
double bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//first stage of three crossovers
|
||||
|
||||
outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1];
|
||||
highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2];
|
||||
highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]);
|
||||
highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1];
|
||||
midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2];
|
||||
midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]);
|
||||
lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1];
|
||||
lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2];
|
||||
lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]);
|
||||
bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//second stage of three crossovers
|
||||
|
||||
outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1];
|
||||
highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2];
|
||||
highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]);
|
||||
highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1];
|
||||
midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2];
|
||||
midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]);
|
||||
lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1];
|
||||
lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2];
|
||||
lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]);
|
||||
bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//third stage of three crossovers
|
||||
|
||||
highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef));
|
||||
highmidL = highLIIR; trebleL -= highmidL;
|
||||
|
||||
midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef));
|
||||
lowmidL = midLIIR; highmidL -= lowmidL;
|
||||
|
||||
lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef));
|
||||
bassL = lowLIIR; lowmidL -= bassL;
|
||||
|
||||
inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
|
||||
|
||||
double trebleR = inputSampleR;
|
||||
outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1];
|
||||
highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2];
|
||||
highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]);
|
||||
double highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1];
|
||||
midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2];
|
||||
midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]);
|
||||
double lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1];
|
||||
lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2];
|
||||
lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]);
|
||||
double bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//first stage of three crossovers
|
||||
|
||||
outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1];
|
||||
highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2];
|
||||
highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]);
|
||||
highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1];
|
||||
midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2];
|
||||
midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]);
|
||||
lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1];
|
||||
lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2];
|
||||
lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]);
|
||||
bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//second stage of three crossovers
|
||||
|
||||
outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1];
|
||||
highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2];
|
||||
highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]);
|
||||
highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1];
|
||||
midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2];
|
||||
midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]);
|
||||
lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1];
|
||||
lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2];
|
||||
lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]);
|
||||
bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//third stage of three crossovers
|
||||
|
||||
highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef));
|
||||
highmidR = highRIIR; trebleR -= highmidR;
|
||||
|
||||
midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef));
|
||||
lowmidR = midRIIR; highmidR -= lowmidR;
|
||||
|
||||
lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef));
|
||||
bassR = lowRIIR; lowmidR -= bassR;
|
||||
|
||||
inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
//SmoothEQ2
|
||||
|
||||
if (bezCThresh > 0.0) {
|
||||
inputSampleL *= ((bezCThresh*0.5)+1.0);
|
||||
inputSampleR *= ((bezCThresh*0.5)+1.0);
|
||||
}
|
||||
|
||||
bezCompF[bez_cycle] += bezRez;
|
||||
bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez);
|
||||
bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez);
|
||||
bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR)));
|
||||
|
||||
if (bezCompF[bez_cycle] > 1.0) {
|
||||
bezCompF[bez_cycle] -= 1.0;
|
||||
bezCompF[bez_CL] = bezCompF[bez_BL];
|
||||
bezCompF[bez_BL] = bezCompF[bez_AL];
|
||||
bezCompF[bez_AL] = bezCompF[bez_SampL];
|
||||
bezCompF[bez_SampL] = 0.0;
|
||||
bezCompF[bez_CR] = bezCompF[bez_BR];
|
||||
bezCompF[bez_BR] = bezCompF[bez_AR];
|
||||
bezCompF[bez_AR] = bezCompF[bez_SampR];
|
||||
bezCompF[bez_SampR] = 0.0;
|
||||
bezMaxF = 0.0;
|
||||
}
|
||||
bezCompS[bez_cycle] += sloRez;
|
||||
bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage
|
||||
bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage
|
||||
if (bezCompS[bez_cycle] > 1.0) {
|
||||
bezCompS[bez_cycle] -= 1.0;
|
||||
bezCompS[bez_CL] = bezCompS[bez_BL];
|
||||
bezCompS[bez_BL] = bezCompS[bez_AL];
|
||||
bezCompS[bez_AL] = bezCompS[bez_SampL];
|
||||
bezCompS[bez_SampL] = 0.0;
|
||||
bezCompS[bez_CR] = bezCompS[bez_BR];
|
||||
bezCompS[bez_BR] = bezCompS[bez_AR];
|
||||
bezCompS[bez_AR] = bezCompS[bez_SampR];
|
||||
bezCompS[bez_SampR] = 0.0;
|
||||
}
|
||||
double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]);
|
||||
double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]);
|
||||
double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5;
|
||||
double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]);
|
||||
double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]);
|
||||
double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5;
|
||||
double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]);
|
||||
double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]);
|
||||
double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5;
|
||||
double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]);
|
||||
double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]);
|
||||
double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5;
|
||||
CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0));
|
||||
//Dynamics2
|
||||
|
||||
const double temp = (double)nSampleFrames/inFramesToProcess;
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gain;
|
||||
inputSampleR = inputSampleR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.92;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
frexpf((float)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*outputL = inputSampleL;
|
||||
*outputR = inputSampleR;
|
||||
//direct stereo out
|
||||
|
||||
inputL += 1;
|
||||
inputR += 1;
|
||||
outputL += 1;
|
||||
outputR += 1;
|
||||
}
|
||||
return noErr;
|
||||
}
|
||||
|
||||
1
plugins/MacAU/X2Buss/X2Buss.exp
Executable file
1
plugins/MacAU/X2Buss/X2Buss.exp
Executable file
|
|
@ -0,0 +1 @@
|
|||
_X2BussEntry
|
||||
222
plugins/MacAU/X2Buss/X2Buss.h
Executable file
222
plugins/MacAU/X2Buss/X2Buss.h
Executable file
|
|
@ -0,0 +1,222 @@
|
|||
/*
|
||||
* File: X2Buss.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 10/31/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include "AUEffectBase.h"
|
||||
#include "X2BussVersion.h"
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
#include "AUDebugDispatcher.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __X2Buss_h__
|
||||
#define __X2Buss_h__
|
||||
|
||||
|
||||
#pragma mark ____X2Buss Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamA = 0.5;
|
||||
static const float kDefaultValue_ParamB = 0.5;
|
||||
static const float kDefaultValue_ParamC = 0.5;
|
||||
static const float kDefaultValue_ParamD = 0.5;
|
||||
static const float kDefaultValue_ParamE = 0.5;
|
||||
static const float kDefaultValue_ParamF = 0.5;
|
||||
static const float kDefaultValue_ParamG = 0.5;
|
||||
static const float kDefaultValue_ParamH = 0.5;
|
||||
static const float kDefaultValue_ParamI = 1.0;
|
||||
static const float kDefaultValue_ParamJ = 0.5;
|
||||
|
||||
static CFStringRef kParameterAUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterAName = CFSTR("High");
|
||||
static CFStringRef kParameterBName = CFSTR("HMid");
|
||||
static CFStringRef kParameterCName = CFSTR("LMid");
|
||||
static CFStringRef kParameterDName = CFSTR("Bass");
|
||||
static CFStringRef kParameterEUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterEName = CFSTR("HighF");
|
||||
static CFStringRef kParameterFName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterGName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterHName = CFSTR("BassF");
|
||||
static CFStringRef kParameterIUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterIName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterJName = CFSTR("Fader");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
kParam_B =1,
|
||||
kParam_C =2,
|
||||
kParam_D =3,
|
||||
kParam_E =4,
|
||||
kParam_F =5,
|
||||
kParam_G =6,
|
||||
kParam_H =7,
|
||||
kParam_I =8,
|
||||
kParam_J =9,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=10
|
||||
};
|
||||
|
||||
#pragma mark ____X2Buss
|
||||
class X2Buss : public AUEffectBase
|
||||
{
|
||||
public:
|
||||
X2Buss(AudioUnit component);
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
virtual ~X2Buss () { delete mDebugDispatcher; }
|
||||
#endif
|
||||
|
||||
virtual ComponentResult Reset(AudioUnitScope inScope, AudioUnitElement inElement);
|
||||
|
||||
virtual OSStatus ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
|
||||
const AudioBufferList & inBuffer, AudioBufferList & outBuffer,
|
||||
UInt32 inFramesToProcess);
|
||||
virtual UInt32 SupportedNumChannels(const AUChannelInfo ** outInfo);
|
||||
|
||||
virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings);
|
||||
|
||||
virtual ComponentResult GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo);
|
||||
|
||||
virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable );
|
||||
|
||||
virtual ComponentResult GetProperty(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData);
|
||||
|
||||
virtual ComponentResult Initialize();
|
||||
virtual bool SupportsTail () { return true; }
|
||||
virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples
|
||||
virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples
|
||||
|
||||
/*! @method Version */
|
||||
virtual ComponentResult Version() { return kX2BussVersion; }
|
||||
|
||||
private:
|
||||
|
||||
enum {
|
||||
biq_freq,
|
||||
biq_reso,
|
||||
biq_a0,
|
||||
biq_a1,
|
||||
biq_a2,
|
||||
biq_b1,
|
||||
biq_b2,
|
||||
biq_sL1,
|
||||
biq_sL2,
|
||||
biq_sR1,
|
||||
biq_sR2,
|
||||
biq_total
|
||||
}; //coefficient interpolating bessel filter, stereo
|
||||
double highA[biq_total];
|
||||
double highB[biq_total];
|
||||
double highC[biq_total];
|
||||
double highLIIR;
|
||||
double highRIIR;
|
||||
|
||||
double midA[biq_total];
|
||||
double midB[biq_total];
|
||||
double midC[biq_total];
|
||||
double midLIIR;
|
||||
double midRIIR;
|
||||
|
||||
double lowA[biq_total];
|
||||
double lowB[biq_total];
|
||||
double lowC[biq_total];
|
||||
double lowLIIR;
|
||||
double lowRIIR;
|
||||
//SmoothEQ2
|
||||
|
||||
enum {
|
||||
bez_AL,
|
||||
bez_BL,
|
||||
bez_CL,
|
||||
bez_InL,
|
||||
bez_UnInL,
|
||||
bez_SampL,
|
||||
bez_AR,
|
||||
bez_BR,
|
||||
bez_CR,
|
||||
bez_InR,
|
||||
bez_UnInR,
|
||||
bez_SampR,
|
||||
bez_cycle,
|
||||
bez_total
|
||||
}; //the new undersampling. bez signifies the bezier curve reconstruction
|
||||
double bezCompF[bez_total];
|
||||
double bezMaxF;
|
||||
double bezCompS[bez_total];
|
||||
//Dynamics2
|
||||
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double inTrimA;
|
||||
double inTrimB;
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#endif
|
||||
61
plugins/MacAU/X2Buss/X2Buss.r
Executable file
61
plugins/MacAU/X2Buss/X2Buss.r
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* File: X2Buss.r
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 10/31/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include <AudioUnit/AudioUnit.r>
|
||||
|
||||
#include "X2BussVersion.h"
|
||||
|
||||
// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description
|
||||
#define kAudioUnitResID_X2Buss 1000
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ X2Buss~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#define RES_ID kAudioUnitResID_X2Buss
|
||||
#define COMP_TYPE kAudioUnitType_Effect
|
||||
#define COMP_SUBTYPE X2Buss_COMP_SUBTYPE
|
||||
#define COMP_MANUF X2Buss_COMP_MANF
|
||||
|
||||
#define VERSION kX2BussVersion
|
||||
#define NAME "Airwindows: X2Buss"
|
||||
#define DESCRIPTION "X2Buss AU"
|
||||
#define ENTRY_POINT "X2BussEntry"
|
||||
|
||||
#include "AUResources.r"
|
||||
1359
plugins/MacAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.mode1v3
Executable file
1359
plugins/MacAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.mode1v3
Executable file
File diff suppressed because it is too large
Load diff
131
plugins/MacAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.pbxuser
Executable file
131
plugins/MacAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.pbxuser
Executable file
|
|
@ -0,0 +1,131 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
activeBuildConfigurationName = Release;
|
||||
activeTarget = 8D01CCC60486CAD60068D4B7 /* X2Buss */;
|
||||
codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */;
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
364,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
188,
|
||||
60,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXTargetDataSource_PrimaryAttribute,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 783619103;
|
||||
PBXWorkspaceStateSaveDate = 783619103;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B5C9E262EB515ED008B9860 /* PBXTextBookmark */ = 8B5C9E262EB515ED008B9860 /* PBXTextBookmark */;
|
||||
8B5C9E3E2EB516CF008B9860 /* PBXTextBookmark */ = 8B5C9E3E2EB516CF008B9860 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B5C9E262EB515ED008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* X2Buss.h */;
|
||||
name = "X2Buss.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 62;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8B5C9E3E2EB516CF008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* X2Buss.h */;
|
||||
name = "X2Buss.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 62;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8BA05A660720730100365D66 /* X2Buss.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {903, 13608}}";
|
||||
sepNavSelRange = "{9006, 0}";
|
||||
sepNavVisRange = "{7185, 1986}";
|
||||
sepNavWindowFrame = "{{506, 48}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* X2BussVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}";
|
||||
sepNavSelRange = "{2887, 0}";
|
||||
sepNavVisRange = "{965, 1985}";
|
||||
sepNavWindowFrame = "{{15, 47}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {516, 23430}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 1336}";
|
||||
};
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* X2Buss.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {948, 3402}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 62}";
|
||||
sepNavWindowFrame = "{{528, 52}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
repositoryNamesForRoots = {
|
||||
"" = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
8BD3CCB9148830B20062E48C /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
8D01CCC60486CAD60068D4B7 /* X2Buss */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
}
|
||||
1481
plugins/MacAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.perspectivev3
Executable file
1481
plugins/MacAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.perspectivev3
Executable file
File diff suppressed because it is too large
Load diff
490
plugins/MacAU/X2Buss/X2Buss.xcodeproj/project.pbxproj
Executable file
490
plugins/MacAU/X2Buss/X2Buss.xcodeproj/project.pbxproj
Executable file
|
|
@ -0,0 +1,490 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */; };
|
||||
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */; };
|
||||
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */; };
|
||||
8B4119B70749654200361ABE /* X2Buss.r in Rez */ = {isa = PBXBuildFile; fileRef = 8BA05A680720730100365D66 /* X2Buss.r */; };
|
||||
8BA05A6B0720730100365D66 /* X2Buss.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* X2Buss.cpp */; };
|
||||
8BA05A6E0720730100365D66 /* X2BussVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* X2BussVersion.h */; };
|
||||
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A7F072073D200365D66 /* AUBase.cpp */; };
|
||||
8BA05AAF072073D300365D66 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A80072073D200365D66 /* AUBase.h */; };
|
||||
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A81072073D200365D66 /* AUDispatch.cpp */; };
|
||||
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A82072073D200365D66 /* AUDispatch.h */; };
|
||||
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A83072073D200365D66 /* AUInputElement.cpp */; };
|
||||
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A84072073D200365D66 /* AUInputElement.h */; };
|
||||
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A85072073D200365D66 /* AUOutputElement.cpp */; };
|
||||
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A86072073D200365D66 /* AUOutputElement.h */; };
|
||||
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A88072073D200365D66 /* AUScopeElement.cpp */; };
|
||||
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A89072073D200365D66 /* AUScopeElement.h */; };
|
||||
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A8A072073D200365D66 /* ComponentBase.cpp */; };
|
||||
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A8B072073D200365D66 /* ComponentBase.h */; };
|
||||
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */; };
|
||||
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A9B072073D200365D66 /* AUEffectBase.h */; };
|
||||
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA7072073D200365D66 /* AUBuffer.cpp */; };
|
||||
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AA8072073D200365D66 /* AUBuffer.h */; };
|
||||
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */; };
|
||||
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */; };
|
||||
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */; };
|
||||
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */; };
|
||||
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */; };
|
||||
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */; };
|
||||
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */; };
|
||||
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE10720742100365D66 /* CAMutex.cpp */; };
|
||||
8BA05AE80720742100365D66 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE20720742100365D66 /* CAMutex.h */; };
|
||||
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */; };
|
||||
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */; };
|
||||
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; };
|
||||
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; };
|
||||
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; };
|
||||
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05B050720754400365D66 /* CAAUParameter.cpp */; };
|
||||
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05B060720754400365D66 /* CAAUParameter.h */; };
|
||||
8BC6025C073B072D006C4272 /* X2Buss.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* X2Buss.h */; };
|
||||
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */; };
|
||||
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = "<group>"; };
|
||||
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = "<group>"; };
|
||||
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = "<group>"; };
|
||||
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
|
||||
8BA05A660720730100365D66 /* X2Buss.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X2Buss.cpp; sourceTree = "<group>"; };
|
||||
8BA05A670720730100365D66 /* X2Buss.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = X2Buss.exp; sourceTree = "<group>"; };
|
||||
8BA05A680720730100365D66 /* X2Buss.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = X2Buss.r; sourceTree = "<group>"; };
|
||||
8BA05A690720730100365D66 /* X2BussVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X2BussVersion.h; sourceTree = "<group>"; };
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A80072073D200365D66 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = "<group>"; };
|
||||
8BA05A81072073D200365D66 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = "<group>"; };
|
||||
8BA05A82072073D200365D66 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = "<group>"; };
|
||||
8BA05A83072073D200365D66 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A84072073D200365D66 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = "<group>"; };
|
||||
8BA05A85072073D200365D66 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A86072073D200365D66 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = "<group>"; };
|
||||
8BA05A87072073D200365D66 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
|
||||
8BA05A88072073D200365D66 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A89072073D200365D66 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = "<group>"; };
|
||||
8BA05A8A072073D200365D66 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A8B072073D200365D66 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = "<group>"; };
|
||||
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A9B072073D200365D66 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = "<group>"; };
|
||||
8BA05AA7072073D200365D66 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = "<group>"; };
|
||||
8BA05AA8072073D200365D66 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = "<group>"; };
|
||||
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDebugDispatcher.cpp; sourceTree = "<group>"; };
|
||||
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDebugDispatcher.h; sourceTree = "<group>"; };
|
||||
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = "<group>"; };
|
||||
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = "<group>"; };
|
||||
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = "<group>"; };
|
||||
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = "<group>"; };
|
||||
8BA05AE10720742100365D66 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE20720742100365D66 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = "<group>"; };
|
||||
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = "<group>"; };
|
||||
8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
|
||||
8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
|
||||
8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
|
||||
8BA05B050720754400365D66 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = "<group>"; };
|
||||
8BA05B060720754400365D66 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = "<group>"; };
|
||||
8BC6025B073B072D006C4272 /* X2Buss.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X2Buss.h; sourceTree = "<group>"; };
|
||||
8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D01CCD20486CAD60068D4B7 /* X2Buss.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = X2Buss.component; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBaseHelper.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
|
||||
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.h; sourceTree = SYSTEM_DEVELOPER_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D01CCCD0486CAD60068D4B7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */,
|
||||
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */,
|
||||
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
089C166AFE841209C02AAC07 /* X2Buss */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB77ADFE841716C02AAC07 /* Source */,
|
||||
089C167CFE841241C02AAC07 /* Resources */,
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
|
||||
19C28FB4FE9D528D11CA2CBB /* Products */,
|
||||
);
|
||||
name = X2Buss;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */,
|
||||
8BA05B01072074F900365D66 /* CoreServices.framework */,
|
||||
8BA05AF9072074E100365D66 /* AudioToolbox.framework */,
|
||||
8BA05AFA072074E100365D66 /* AudioUnit.framework */,
|
||||
);
|
||||
name = "External Frameworks and Libraries";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C167CFE841241C02AAC07 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D01CCD10486CAD60068D4B7 /* Info.plist */,
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB77ADFE841716C02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A56072072A900365D66 /* AU Source */,
|
||||
8BA05AEB0720742700365D66 /* PublicUtility */,
|
||||
8BA05A7D072073D200365D66 /* AUPublic */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FB4FE9D528D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D01CCD20486CAD60068D4B7 /* X2Buss.component */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A56072072A900365D66 /* AU Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BC6025B073B072D006C4272 /* X2Buss.h */,
|
||||
8BA05A660720730100365D66 /* X2Buss.cpp */,
|
||||
8BA05A670720730100365D66 /* X2Buss.exp */,
|
||||
8BA05A680720730100365D66 /* X2Buss.r */,
|
||||
8BA05A690720730100365D66 /* X2BussVersion.h */,
|
||||
);
|
||||
name = "AU Source";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A7D072073D200365D66 /* AUPublic */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A7E072073D200365D66 /* AUBase */,
|
||||
8BA05A99072073D200365D66 /* OtherBases */,
|
||||
8BA05AA6072073D200365D66 /* Utility */,
|
||||
);
|
||||
name = AUPublic;
|
||||
path = Extras/CoreAudio/AudioUnits/AUPublic;
|
||||
sourceTree = SYSTEM_DEVELOPER_DIR;
|
||||
};
|
||||
8BA05A7E072073D200365D66 /* AUBase */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */,
|
||||
8BA05A80072073D200365D66 /* AUBase.h */,
|
||||
8BA05A81072073D200365D66 /* AUDispatch.cpp */,
|
||||
8BA05A82072073D200365D66 /* AUDispatch.h */,
|
||||
8BA05A83072073D200365D66 /* AUInputElement.cpp */,
|
||||
8BA05A84072073D200365D66 /* AUInputElement.h */,
|
||||
8BA05A85072073D200365D66 /* AUOutputElement.cpp */,
|
||||
8BA05A86072073D200365D66 /* AUOutputElement.h */,
|
||||
8BA05A87072073D200365D66 /* AUResources.r */,
|
||||
8BA05A88072073D200365D66 /* AUScopeElement.cpp */,
|
||||
8BA05A89072073D200365D66 /* AUScopeElement.h */,
|
||||
8BA05A8A072073D200365D66 /* ComponentBase.cpp */,
|
||||
8BA05A8B072073D200365D66 /* ComponentBase.h */,
|
||||
);
|
||||
path = AUBase;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A99072073D200365D66 /* OtherBases */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */,
|
||||
8BA05A9B072073D200365D66 /* AUEffectBase.h */,
|
||||
);
|
||||
path = OtherBases;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05AA6072073D200365D66 /* Utility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */,
|
||||
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */,
|
||||
8BA05AA7072073D200365D66 /* AUBuffer.cpp */,
|
||||
8BA05AA8072073D200365D66 /* AUBuffer.h */,
|
||||
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */,
|
||||
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */,
|
||||
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */,
|
||||
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */,
|
||||
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */,
|
||||
);
|
||||
path = Utility;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05AEB0720742700365D66 /* PublicUtility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05B050720754400365D66 /* CAAUParameter.cpp */,
|
||||
8BA05B060720754400365D66 /* CAAUParameter.h */,
|
||||
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */,
|
||||
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */,
|
||||
8BA05AE10720742100365D66 /* CAMutex.cpp */,
|
||||
8BA05AE20720742100365D66 /* CAMutex.h */,
|
||||
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */,
|
||||
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */,
|
||||
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */,
|
||||
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */,
|
||||
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */,
|
||||
);
|
||||
name = PublicUtility;
|
||||
path = Extras/CoreAudio/PublicUtility;
|
||||
sourceTree = SYSTEM_DEVELOPER_DIR;
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
8D01CCC70486CAD60068D4B7 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05A6E0720730100365D66 /* X2BussVersion.h in Headers */,
|
||||
8BA05AAF072073D300365D66 /* AUBase.h in Headers */,
|
||||
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */,
|
||||
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */,
|
||||
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */,
|
||||
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */,
|
||||
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */,
|
||||
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */,
|
||||
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */,
|
||||
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */,
|
||||
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */,
|
||||
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */,
|
||||
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */,
|
||||
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */,
|
||||
8BA05AE80720742100365D66 /* CAMutex.h in Headers */,
|
||||
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */,
|
||||
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */,
|
||||
8BC6025C073B072D006C4272 /* X2Buss.h in Headers */,
|
||||
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */,
|
||||
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */,
|
||||
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D01CCC60486CAD60068D4B7 /* X2Buss */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "X2Buss" */;
|
||||
buildPhases = (
|
||||
8D01CCC70486CAD60068D4B7 /* Headers */,
|
||||
8D01CCC90486CAD60068D4B7 /* Resources */,
|
||||
8D01CCCB0486CAD60068D4B7 /* Sources */,
|
||||
8D01CCCD0486CAD60068D4B7 /* Frameworks */,
|
||||
8D01CCCF0486CAD60068D4B7 /* Rez */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = X2Buss;
|
||||
productInstallPath = "$(HOME)/Library/Bundles";
|
||||
productName = X2Buss;
|
||||
productReference = 8D01CCD20486CAD60068D4B7 /* X2Buss.component */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "X2Buss" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 089C166AFE841209C02AAC07 /* X2Buss */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D01CCC60486CAD60068D4B7 /* X2Buss */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D01CCC90486CAD60068D4B7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXRezBuildPhase section */
|
||||
8D01CCCF0486CAD60068D4B7 /* Rez */ = {
|
||||
isa = PBXRezBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8B4119B70749654200361ABE /* X2Buss.r in Rez */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXRezBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D01CCCB0486CAD60068D4B7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05A6B0720730100365D66 /* X2Buss.cpp in Sources */,
|
||||
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */,
|
||||
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */,
|
||||
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */,
|
||||
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */,
|
||||
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */,
|
||||
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */,
|
||||
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */,
|
||||
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */,
|
||||
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */,
|
||||
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */,
|
||||
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */,
|
||||
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */,
|
||||
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */,
|
||||
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */,
|
||||
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C167EFE841241C02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3E4BA244089833B7007656EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
EXPORTED_SYMBOLS_FILE = X2Buss.exp;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
||||
LIBRARY_STYLE = Bundle;
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
|
||||
PRODUCT_NAME = X2Buss;
|
||||
WRAPPER_EXTENSION = component;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3E4BA245089833B7007656EC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
x86_64,
|
||||
);
|
||||
EXPORTED_SYMBOLS_FILE = X2Buss.exp;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
|
||||
PRODUCT_NAME = X2Buss;
|
||||
SDKROOT = macosx10.5;
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = all;
|
||||
WRAPPER_EXTENSION = component;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3E4BA248089833B7007656EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
SDKROOT = macosx10.6;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3E4BA249089833B7007656EC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
SDKROOT = macosx10.6;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "X2Buss" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3E4BA244089833B7007656EC /* Debug */,
|
||||
3E4BA245089833B7007656EC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
3E4BA247089833B7007656EC /* Build configuration list for PBXProject "X2Buss" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3E4BA248089833B7007656EC /* Debug */,
|
||||
3E4BA249089833B7007656EC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
}
|
||||
58
plugins/MacAU/X2Buss/X2BussVersion.h
Executable file
58
plugins/MacAU/X2Buss/X2BussVersion.h
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* File: X2BussVersion.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 10/31/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef __X2BussVersion_h__
|
||||
#define __X2BussVersion_h__
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
#define kX2BussVersion 0xFFFFFFFF
|
||||
#else
|
||||
#define kX2BussVersion 0x00010000
|
||||
#endif
|
||||
|
||||
//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~//
|
||||
#define X2Buss_COMP_MANF 'Dthr'
|
||||
#define X2Buss_COMP_SUBTYPE 'x2bs'
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#endif
|
||||
|
||||
16
plugins/MacAU/X2Buss/version.plist
Executable file
16
plugins/MacAU/X2Buss/version.plist
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildVersion</key>
|
||||
<string>3</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>ProjectName</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>SourceVersion</key>
|
||||
<string>590000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
plugins/MacAU/kWoodRoom/English.lproj/InfoPlist.strings
Executable file
BIN
plugins/MacAU/kWoodRoom/English.lproj/InfoPlist.strings
Executable file
Binary file not shown.
28
plugins/MacAU/kWoodRoom/Info.plist
Executable file
28
plugins/MacAU/kWoodRoom/Info.plist
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.airwindows.audiounit.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PROJECTNAMEASIDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Dthr</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
5
plugins/MacAU/kWoodRoom/StarterAU_Prefix.pch
Executable file
5
plugins/MacAU/kWoodRoom/StarterAU_Prefix.pch
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Prefix header for all source files of the '«PROJECTNAMEASIDENTIFIER»' target in the '«PROJECTNAMEASIDENTIFIER»' project.
|
||||
//
|
||||
|
||||
#include <CoreServices/CoreServices.h>
|
||||
804
plugins/MacAU/kWoodRoom/kWoodRoom.cpp
Executable file
804
plugins/MacAU/kWoodRoom/kWoodRoom.cpp
Executable file
|
|
@ -0,0 +1,804 @@
|
|||
/*
|
||||
* File: kWoodRoom.cpp
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 11/1/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/*=============================================================================
|
||||
kWoodRoom.cpp
|
||||
|
||||
=============================================================================*/
|
||||
#include "kWoodRoom.h"
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
COMPONENT_ENTRY(kWoodRoom)
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::kWoodRoom
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
kWoodRoom::kWoodRoom(AudioUnit component)
|
||||
: AUEffectBase(component)
|
||||
{
|
||||
CreateElements();
|
||||
Globals()->UseIndexedParameters(kNumberOfParameters);
|
||||
SetParameter(kParam_A, kDefaultValue_ParamA );
|
||||
SetParameter(kParam_B, kDefaultValue_ParamB );
|
||||
SetParameter(kParam_C, kDefaultValue_ParamC );
|
||||
SetParameter(kParam_D, kDefaultValue_ParamD );
|
||||
SetParameter(kParam_E, kDefaultValue_ParamE );
|
||||
SetParameter(kParam_F, kDefaultValue_ParamF );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::GetParameterValueStrings
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings)
|
||||
{
|
||||
|
||||
return kAudioUnitErr_InvalidProperty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::GetParameterInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo )
|
||||
{
|
||||
ComponentResult result = noErr;
|
||||
|
||||
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
|
||||
| kAudioUnitParameterFlag_IsReadable;
|
||||
|
||||
if (inScope == kAudioUnitScope_Global) {
|
||||
switch(inParameterID)
|
||||
{
|
||||
case kParam_A:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterAName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamA;
|
||||
break;
|
||||
case kParam_B:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterBName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamB;
|
||||
break;
|
||||
case kParam_C:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterCName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamC;
|
||||
break;
|
||||
case kParam_D:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterDName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamD;
|
||||
break;
|
||||
case kParam_E:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamE;
|
||||
break;
|
||||
case kParam_F:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterFName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamF;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::GetPropertyInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::GetPropertyInfo (AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable)
|
||||
{
|
||||
return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// state that plugin supports only stereo-in/stereo-out processing
|
||||
UInt32 kWoodRoom::SupportedNumChannels(const AUChannelInfo ** outInfo)
|
||||
{
|
||||
if (outInfo != NULL)
|
||||
{
|
||||
static AUChannelInfo info;
|
||||
info.inChannels = 2;
|
||||
info.outChannels = 2;
|
||||
*outInfo = &info;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::GetProperty
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::GetProperty( AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData )
|
||||
{
|
||||
return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
|
||||
}
|
||||
|
||||
// kWoodRoom::Initialize
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::Initialize()
|
||||
{
|
||||
ComponentResult result = AUEffectBase::Initialize();
|
||||
if (result == noErr)
|
||||
Reset(kAudioUnitScope_Global, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark ____kWoodRoomEffectKernel
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::kWoodRoomKernel::Reset()
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::Reset(AudioUnitScope inScope, AudioUnitElement inElement)
|
||||
{
|
||||
for(int x = 0; x < d3A+2; x++) {a3AL[x] = 0.0; a3AR[x] = 0.0;}
|
||||
for(int x = 0; x < d3B+2; x++) {a3BL[x] = 0.0; a3BR[x] = 0.0;}
|
||||
for(int x = 0; x < d3C+2; x++) {a3CL[x] = 0.0; a3CR[x] = 0.0;}
|
||||
for(int x = 0; x < d3D+2; x++) {a3DL[x] = 0.0; a3DR[x] = 0.0;}
|
||||
for(int x = 0; x < d3E+2; x++) {a3EL[x] = 0.0; a3ER[x] = 0.0;}
|
||||
for(int x = 0; x < d3F+2; x++) {a3FL[x] = 0.0; a3FR[x] = 0.0;}
|
||||
for(int x = 0; x < d3G+2; x++) {a3GL[x] = 0.0; a3GR[x] = 0.0;}
|
||||
for(int x = 0; x < d3H+2; x++) {a3HL[x] = 0.0; a3HR[x] = 0.0;}
|
||||
for(int x = 0; x < d3I+2; x++) {a3IL[x] = 0.0; a3IR[x] = 0.0;}
|
||||
c3AL = c3BL = c3CL = c3DL = c3EL = c3FL = c3GL = c3HL = c3IL = 1;
|
||||
c3AR = c3BR = c3CR = c3DR = c3ER = c3FR = c3GR = c3HR = c3IR = 1;
|
||||
|
||||
for(int x = 0; x < d6A+2; x++) {a6AL[x] = 0.0; a6AR[x] = 0.0;}
|
||||
for(int x = 0; x < d6B+2; x++) {a6BL[x] = 0.0; a6BR[x] = 0.0;}
|
||||
for(int x = 0; x < d6C+2; x++) {a6CL[x] = 0.0; a6CR[x] = 0.0;}
|
||||
for(int x = 0; x < d6D+2; x++) {a6DL[x] = 0.0; a6DR[x] = 0.0;}
|
||||
for(int x = 0; x < d6E+2; x++) {a6EL[x] = 0.0; a6ER[x] = 0.0;}
|
||||
for(int x = 0; x < d6F+2; x++) {a6FL[x] = 0.0; a6FR[x] = 0.0;}
|
||||
for(int x = 0; x < d6G+2; x++) {a6GL[x] = 0.0; a6GR[x] = 0.0;}
|
||||
for(int x = 0; x < d6H+2; x++) {a6HL[x] = 0.0; a6HR[x] = 0.0;}
|
||||
for(int x = 0; x < d6I+2; x++) {a6IL[x] = 0.0; a6IR[x] = 0.0;}
|
||||
for(int x = 0; x < d6J+2; x++) {a6JL[x] = 0.0; a6JR[x] = 0.0;}
|
||||
for(int x = 0; x < d6K+2; x++) {a6KL[x] = 0.0; a6KR[x] = 0.0;}
|
||||
for(int x = 0; x < d6L+2; x++) {a6LL[x] = 0.0; a6LR[x] = 0.0;}
|
||||
for(int x = 0; x < d6M+2; x++) {a6ML[x] = 0.0; a6MR[x] = 0.0;}
|
||||
for(int x = 0; x < d6N+2; x++) {a6NL[x] = 0.0; a6NR[x] = 0.0;}
|
||||
for(int x = 0; x < d6O+2; x++) {a6OL[x] = 0.0; a6OR[x] = 0.0;}
|
||||
for(int x = 0; x < d6P+2; x++) {a6PL[x] = 0.0; a6PR[x] = 0.0;}
|
||||
for(int x = 0; x < d6Q+2; x++) {a6QL[x] = 0.0; a6QR[x] = 0.0;}
|
||||
for(int x = 0; x < d6R+2; x++) {a6RL[x] = 0.0; a6RR[x] = 0.0;}
|
||||
for(int x = 0; x < d6S+2; x++) {a6SL[x] = 0.0; a6SR[x] = 0.0;}
|
||||
for(int x = 0; x < d6T+2; x++) {a6TL[x] = 0.0; a6TR[x] = 0.0;}
|
||||
for(int x = 0; x < d6U+2; x++) {a6UL[x] = 0.0; a6UR[x] = 0.0;}
|
||||
for(int x = 0; x < d6V+2; x++) {a6VL[x] = 0.0; a6VR[x] = 0.0;}
|
||||
for(int x = 0; x < d6W+2; x++) {a6WL[x] = 0.0; a6WR[x] = 0.0;}
|
||||
for(int x = 0; x < d6X+2; x++) {a6XL[x] = 0.0; a6XR[x] = 0.0;}
|
||||
for(int x = 0; x < d6Y+2; x++) {a6YL[x] = 0.0; a6YR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZA+2; x++) {a6ZAL[x] = 0.0; a6ZAR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZB+2; x++) {a6ZBL[x] = 0.0; a6ZBR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZC+2; x++) {a6ZCL[x] = 0.0; a6ZCR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZD+2; x++) {a6ZDL[x] = 0.0; a6ZDR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZE+2; x++) {a6ZEL[x] = 0.0; a6ZER[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZF+2; x++) {a6ZFL[x] = 0.0; a6ZFR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZG+2; x++) {a6ZGL[x] = 0.0; a6ZGR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZH+2; x++) {a6ZHL[x] = 0.0; a6ZHR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZI+2; x++) {a6ZIL[x] = 0.0; a6ZIR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZJ+2; x++) {a6ZJL[x] = 0.0; a6ZJR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZK+2; x++) {a6ZKL[x] = 0.0; a6ZKR[x] = 0.0;}
|
||||
c6AL = c6BL = c6CL = c6DL = c6EL = c6FL = c6GL = c6HL = c6IL = 1;
|
||||
c6JL = c6KL = c6LL = c6ML = c6NL = c6OL = c6PL = c6QL = c6RL = 1;
|
||||
c6SL = c6TL = c6UL = c6VL = c6WL = c6XL = c6YL = c6ZAL = c6ZBL = 1;
|
||||
c6ZCL = c6ZDL = c6ZEL = c6ZFL = c6ZGL = c6ZHL = c6ZIL = c6ZJL = c6ZKL = 1;
|
||||
c6AR = c6BR = c6CR = c6DR = c6ER = c6FR = c6GR = c6HR = c6IR = 1;
|
||||
c6JR = c6KR = c6LR = c6MR = c6NR = c6OR = c6PR = c6QR = c6RR = 1;
|
||||
c6SR = c6TR = c6UR = c6VR = c6WR = c6XR = c6YR = c6ZAR = c6ZBR = 1;
|
||||
c6ZCR = c6ZDR = c6ZER = c6ZFR = c6ZGR = c6ZHR = c6ZIR = c6ZJR = c6ZKR = 1;
|
||||
f6AL = f6BL = f6CL = f6DL = f6EL = f6FL = 0.0;
|
||||
f6FR = f6LR = f6RR = f6XR = f6ZER = f6ZKR = 0.0;
|
||||
avg6L = avg6R = 0.0;
|
||||
|
||||
for (int x = 0; x < bez_total; x++) {
|
||||
bez[x] = 0.0;
|
||||
bezF[x] = 0.0;
|
||||
}
|
||||
bez[bez_cycle] = 1.0;
|
||||
bezF[bez_cycle] = 1.0;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::ProcessBufferLists
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
OSStatus kWoodRoom::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
|
||||
const AudioBufferList & inBuffer,
|
||||
AudioBufferList & outBuffer,
|
||||
UInt32 inFramesToProcess)
|
||||
{
|
||||
Float32 * inputL = (Float32*)(inBuffer.mBuffers[0].mData);
|
||||
Float32 * inputR = (Float32*)(inBuffer.mBuffers[1].mData);
|
||||
Float32 * outputL = (Float32*)(outBuffer.mBuffers[0].mData);
|
||||
Float32 * outputR = (Float32*)(outBuffer.mBuffers[1].mData);
|
||||
UInt32 nSampleFrames = inFramesToProcess;
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
|
||||
double fdb6ck = (0.0009765625+0.0009765625+0.001953125)*0.3333333;
|
||||
double reg6n = (1.0-pow(1.0-GetParameter( kParam_A ),1.618033988749894))*fdb6ck;
|
||||
//start this but pad it in the loop by volume of output?
|
||||
|
||||
double derez = GetParameter( kParam_B )*2.0;
|
||||
bool stepped = true; // Revised Bezier Undersampling
|
||||
if (derez > 1.0) { // has full rez at center, stepped
|
||||
stepped = false; // to left, continuous to right
|
||||
derez = 1.0-(derez-1.0);
|
||||
} //if it's set up like that it's the revised algorithm
|
||||
derez = fmin(fmax(derez/overallscale,0.0005),1.0);
|
||||
int bezFraction = (int)(1.0/derez);
|
||||
double bezTrim = (double)bezFraction/(bezFraction+1.0);
|
||||
if (stepped) { //this hard-locks derez to exact subdivisions of 1.0
|
||||
derez = 1.0 / bezFraction;
|
||||
bezTrim = 1.0-(derez*bezTrim);
|
||||
} else { //this makes it match the 1.0 case using stepped
|
||||
derez /= (2.0/pow(overallscale,0.5-((overallscale-1.0)*0.0375)));
|
||||
bezTrim = 1.0-pow(derez*0.5,1.0/(derez*0.5));
|
||||
} //the revision more accurately connects the bezier curves
|
||||
|
||||
double derezFreq = GetParameter( kParam_C )*2.0;
|
||||
bool steppedFreq = true; // Revised Bezier Undersampling
|
||||
if (derezFreq > 1.0) { // has full rez at center, stepped
|
||||
steppedFreq = false; // to left, continuous to right
|
||||
derezFreq = 1.0-(derezFreq-1.0);
|
||||
} //if it's set up like that it's the revised algorithm
|
||||
derezFreq = fmin(fmax(derezFreq,0.0005),1.0); //note: no overallscale, already inside undersampling
|
||||
int bezFreqFraction = (int)(1.0/derezFreq);
|
||||
double bezFreqTrim = (double)bezFreqFraction/(bezFreqFraction+1.0);
|
||||
if (steppedFreq) { //this hard-locks derez to exact subdivisions of 1.0
|
||||
derezFreq = 1.0 / bezFreqFraction;
|
||||
bezFreqTrim = 1.0-(derezFreq*bezFreqTrim);
|
||||
} else { //this makes it match the 1.0 case using stepped
|
||||
bezFreqTrim = 1.0-pow(derezFreq*0.5,1.0/(derezFreq*0.5));
|
||||
} //the revision more accurately connects the bezier curves
|
||||
|
||||
double earlyLoudness = GetParameter( kParam_D )*2.0;
|
||||
int start = (int)(GetParameter( kParam_E ) * 27.0);
|
||||
int ld3G = early[start];
|
||||
int ld3H = early[start+1];
|
||||
int ld3D = early[start+2];
|
||||
int ld3A = early[start+3];
|
||||
int ld3E = early[start+4];
|
||||
int ld3I = early[start+5];
|
||||
int ld3F = early[start+6];
|
||||
int ld3B = early[start+7];
|
||||
int ld3C = early[start+8];
|
||||
double wet = GetParameter( kParam_F );
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
double inputSampleL = *inputL;
|
||||
double inputSampleR = *inputR;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
bez[bez_cycle] += derez;
|
||||
bez[bez_SampL] += ((inputSampleL+bez[bez_InL]) * derez);
|
||||
bez[bez_SampR] += ((inputSampleR+bez[bez_InR]) * derez);
|
||||
bez[bez_InL] = inputSampleL; bez[bez_InR] = inputSampleR;
|
||||
if (bez[bez_cycle] > 1.0) { //hit the end point and we do a reverb sample
|
||||
if (stepped) bez[bez_cycle] = 0.0;
|
||||
else bez[bez_cycle] -= 1.0;
|
||||
|
||||
inputSampleL = (bez[bez_SampL]+bez[bez_AvgInSampL])*0.5;
|
||||
bez[bez_AvgInSampL] = bez[bez_SampL];
|
||||
inputSampleR = (bez[bez_SampR]+bez[bez_AvgInSampR])*0.5;
|
||||
bez[bez_AvgInSampR] = bez[bez_SampR];
|
||||
|
||||
a3AL[c3AL] = inputSampleL;// + (f3AL * reg3n);
|
||||
a3BL[c3BL] = inputSampleL;// + (f3BL * reg3n);
|
||||
a3CL[c3CL] = inputSampleL;// + (f3CL * reg3n);
|
||||
|
||||
a3CR[c3CR] = inputSampleR;// + (f3CR * reg3n);
|
||||
a3FR[c3FR] = inputSampleR;// + (f3FR * reg3n);
|
||||
a3IR[c3IR] = inputSampleR;// + (f3IR * reg3n);
|
||||
|
||||
c3AL++; if (c3AL < 0 || c3AL > ld3A) c3AL = 0;
|
||||
c3BL++; if (c3BL < 0 || c3BL > ld3B) c3BL = 0;
|
||||
c3CL++; if (c3CL < 0 || c3CL > ld3C) c3CL = 0;
|
||||
c3CR++; if (c3CR < 0 || c3CR > ld3C) c3CR = 0;
|
||||
c3FR++; if (c3FR < 0 || c3FR > ld3F) c3FR = 0;
|
||||
c3IR++; if (c3IR < 0 || c3IR > ld3I) c3IR = 0;
|
||||
|
||||
double o3AL = a3AL[c3AL-((c3AL > ld3A)?c3AL+1:0)];
|
||||
double o3BL = a3BL[c3BL-((c3BL > ld3B)?c3BL+1:0)];
|
||||
double o3CL = a3CL[c3CL-((c3CL > ld3C)?c3CL+1:0)];
|
||||
double o3CR = a3CR[c3CR-((c3CR > ld3C)?c3CR+1:0)];
|
||||
double o3FR = a3FR[c3FR-((c3FR > ld3F)?c3FR+1:0)];
|
||||
double o3IR = a3IR[c3IR-((c3IR > ld3I)?c3IR+1:0)];
|
||||
|
||||
a3DL[c3DL] = (((o3BL + o3CL) * -2.0) + o3AL);
|
||||
a3EL[c3EL] = (((o3AL + o3CL) * -2.0) + o3BL);
|
||||
a3FL[c3FL] = (((o3AL + o3BL) * -2.0) + o3CL);
|
||||
a3BR[c3BR] = (((o3FR + o3IR) * -2.0) + o3CR);
|
||||
a3ER[c3ER] = (((o3CR + o3IR) * -2.0) + o3FR);
|
||||
a3HR[c3HR] = (((o3CR + o3FR) * -2.0) + o3IR);
|
||||
|
||||
c3DL++; if (c3DL < 0 || c3DL > ld3D) c3DL = 0;
|
||||
c3EL++; if (c3EL < 0 || c3EL > ld3E) c3EL = 0;
|
||||
c3FL++; if (c3FL < 0 || c3FL > ld3F) c3FL = 0;
|
||||
c3BR++; if (c3BR < 0 || c3BR > ld3B) c3BR = 0;
|
||||
c3ER++; if (c3ER < 0 || c3ER > ld3E) c3ER = 0;
|
||||
c3HR++; if (c3HR < 0 || c3HR > ld3H) c3HR = 0;
|
||||
|
||||
double o3DL = a3DL[c3DL-((c3DL > ld3D)?c3DL+1:0)];
|
||||
double o3EL = a3EL[c3EL-((c3EL > ld3E)?c3EL+1:0)];
|
||||
double o3FL = a3FL[c3FL-((c3FL > ld3F)?c3FL+1:0)];
|
||||
double o3BR = a3BR[c3BR-((c3BR > ld3B)?c3BR+1:0)];
|
||||
double o3ER = a3ER[c3ER-((c3ER > ld3E)?c3ER+1:0)];
|
||||
double o3HR = a3HR[c3HR-((c3HR > ld3H)?c3HR+1:0)];
|
||||
|
||||
a3GL[c3GL] = (((o3EL + o3FL) * -2.0) + o3DL);
|
||||
a3HL[c3HL] = (((o3DL + o3FL) * -2.0) + o3EL);
|
||||
a3IL[c3IL] = (((o3DL + o3EL) * -2.0) + o3FL);
|
||||
a3AR[c3AR] = (((o3ER + o3HR) * -2.0) + o3BR);
|
||||
a3DR[c3DR] = (((o3BR + o3HR) * -2.0) + o3ER);
|
||||
a3GR[c3GR] = (((o3BR + o3ER) * -2.0) + o3HR);
|
||||
|
||||
c3GL++; if (c3GL < 0 || c3GL > ld3G) c3GL = 0;
|
||||
c3HL++; if (c3HL < 0 || c3HL > ld3H) c3HL = 0;
|
||||
c3IL++; if (c3IL < 0 || c3IL > ld3I) c3IL = 0;
|
||||
c3AR++; if (c3AR < 0 || c3AR > ld3A) c3AR = 0;
|
||||
c3DR++; if (c3DR < 0 || c3DR > ld3D) c3DR = 0;
|
||||
c3GR++; if (c3GR < 0 || c3GR > ld3G) c3GR = 0;
|
||||
|
||||
double o3GL = a3GL[c3GL-((c3GL > ld3G)?c3GL+1:0)];
|
||||
double o3HL = a3HL[c3HL-((c3HL > ld3H)?c3HL+1:0)];
|
||||
double o3IL = a3IL[c3IL-((c3IL > ld3I)?c3IL+1:0)];
|
||||
double o3AR = a3AR[c3AR-((c3AR > ld3A)?c3AR+1:0)];
|
||||
double o3DR = a3DR[c3DR-((c3DR > ld3D)?c3DR+1:0)];
|
||||
double o3GR = a3GR[c3GR-((c3GR > ld3G)?c3GR+1:0)];
|
||||
|
||||
double inputSampleL = (o3GL + o3HL + o3IL)*0.03125;
|
||||
double inputSampleR = (o3AR + o3DR + o3GR)*0.03125;
|
||||
|
||||
bezF[bez_cycle] += derezFreq;
|
||||
bezF[bez_SampL] += ((inputSampleL+bezF[bez_InL]) * derezFreq);
|
||||
bezF[bez_SampR] += ((inputSampleL+bezF[bez_InR]) * derezFreq);
|
||||
bezF[bez_InL] = inputSampleL; bezF[bez_InR] = inputSampleR;
|
||||
if (bezF[bez_cycle] > 1.0) { //hit the end point and we do a filter sample
|
||||
if (steppedFreq) bezF[bez_cycle] = 0.0;
|
||||
else bezF[bez_cycle] -= 1.0;
|
||||
bezF[bez_CL] = bezF[bez_BL];
|
||||
bezF[bez_BL] = bezF[bez_AL];
|
||||
bezF[bez_AL] = (bezF[bez_SampL]+bezF[bez_AvgInSampL])*0.5;
|
||||
bezF[bez_AvgInSampL] = bezF[bez_SampL]; bezF[bez_SampL] = 0.0;
|
||||
bezF[bez_CR] = bezF[bez_BR];
|
||||
bezF[bez_BR] = bezF[bez_AR];
|
||||
bezF[bez_AR] = (bezF[bez_SampR]+bezF[bez_AvgInSampR])*0.5;
|
||||
bezF[bez_AvgInSampR] = bezF[bez_SampR]; bezF[bez_SampR] = 0.0;
|
||||
}
|
||||
double X = bezF[bez_cycle]*bezFreqTrim;
|
||||
double CBLfreq = (bezF[bez_CL]*(1.0-X))+(bezF[bez_BL]*X);
|
||||
double BALfreq = (bezF[bez_BL]*(1.0-X))+(bezF[bez_AL]*X);
|
||||
double CBALfreq = (bezF[bez_BL]+(CBLfreq*(1.0-X))+(BALfreq*X))*0.125;
|
||||
double CBRfreq = (bezF[bez_CR]*(1.0-X))+(bezF[bez_BR]*X);
|
||||
double BARfreq = (bezF[bez_BR]*(1.0-X))+(bezF[bez_AR]*X);
|
||||
double CBARfreq = (bezF[bez_BR]+(CBRfreq*(1.0-X))+(BARfreq*X))*0.125;
|
||||
inputSampleL = CBALfreq+bezF[bez_AvgOutSampL];
|
||||
bezF[bez_AvgOutSampL] = CBALfreq;
|
||||
inputSampleR = CBARfreq+bezF[bez_AvgOutSampR];
|
||||
bezF[bez_AvgOutSampR] = CBARfreq;
|
||||
|
||||
double earlyReflectionL = inputSampleL;
|
||||
double earlyReflectionR = inputSampleR; //kWoodRoom has filtered early reflections
|
||||
|
||||
a6AL[c6AL] = inputSampleL + (f6BL * reg6n);
|
||||
a6BL[c6BL] = inputSampleL + (f6CL * reg6n);
|
||||
a6CL[c6CL] = inputSampleL + (f6DL * reg6n);
|
||||
a6DL[c6DL] = inputSampleL + (f6EL * reg6n);
|
||||
a6EL[c6EL] = inputSampleL + (f6FL * reg6n);
|
||||
a6FL[c6FL] = inputSampleL + (f6AL * reg6n);
|
||||
|
||||
c6AL++; if (c6AL < 0 || c6AL > d6A) c6AL = 0;
|
||||
c6BL++; if (c6BL < 0 || c6BL > d6B) c6BL = 0;
|
||||
c6CL++; if (c6CL < 0 || c6CL > d6C) c6CL = 0;
|
||||
c6DL++; if (c6DL < 0 || c6DL > d6D) c6DL = 0;
|
||||
c6EL++; if (c6EL < 0 || c6EL > d6E) c6EL = 0;
|
||||
c6FL++; if (c6FL < 0 || c6FL > d6F) c6FL = 0;
|
||||
|
||||
double o6AL = a6AL[c6AL-((c6AL > d6A)?d6A+1:0)];
|
||||
double o6BL = a6BL[c6BL-((c6BL > d6B)?d6B+1:0)];
|
||||
double o6CL = a6CL[c6CL-((c6CL > d6C)?d6C+1:0)];
|
||||
double o6DL = a6DL[c6DL-((c6DL > d6D)?d6D+1:0)];
|
||||
double o6EL = a6EL[c6EL-((c6EL > d6E)?d6E+1:0)];
|
||||
double o6FL = a6FL[c6FL-((c6FL > d6F)?d6F+1:0)];
|
||||
|
||||
a6FR[c6FR] = inputSampleR + (f6LR * reg6n);
|
||||
a6LR[c6LR] = inputSampleR + (f6RR * reg6n);
|
||||
a6RR[c6RR] = inputSampleR + (f6XR * reg6n);
|
||||
a6XR[c6XR] = inputSampleR + (f6ZER * reg6n);
|
||||
a6ZER[c6ZER] = inputSampleR + (f6ZKR * reg6n);
|
||||
a6ZKR[c6ZKR] = inputSampleR + (f6FR * reg6n);
|
||||
|
||||
c6FR++; if (c6FR < 0 || c6FR > d6F) c6FR = 0;
|
||||
c6LR++; if (c6LR < 0 || c6LR > d6L) c6LR = 0;
|
||||
c6RR++; if (c6RR < 0 || c6RR > d6R) c6RR = 0;
|
||||
c6XR++; if (c6XR < 0 || c6XR > d6X) c6XR = 0;
|
||||
c6ZER++; if (c6ZER < 0 || c6ZER > d6ZE) c6ZER = 0;
|
||||
c6ZKR++; if (c6ZKR < 0 || c6ZKR > d6ZK) c6ZKR = 0;
|
||||
|
||||
double o6FR = a6FR[c6FR-((c6FR > d6F)?d6F+1:0)];
|
||||
double o6LR = a6LR[c6LR-((c6LR > d6L)?d6L+1:0)];
|
||||
double o6RR = a6RR[c6RR-((c6RR > d6R)?d6R+1:0)];
|
||||
double o6XR = a6XR[c6XR-((c6XR > d6X)?d6X+1:0)];
|
||||
double o6ZER = a6ZER[c6ZER-((c6ZER > d6ZE)?d6ZE+1:0)];
|
||||
double o6ZKR = a6ZKR[c6ZKR-((c6ZKR > d6ZK)?d6ZK+1:0)];
|
||||
|
||||
//-------- one
|
||||
|
||||
a6GL[c6GL] = ((o6AL*2.0) - (o6BL + o6CL + o6DL + o6EL + o6FL));
|
||||
a6HL[c6HL] = ((o6BL*2.0) - (o6AL + o6CL + o6DL + o6EL + o6FL));
|
||||
a6IL[c6IL] = ((o6CL*2.0) - (o6AL + o6BL + o6DL + o6EL + o6FL));
|
||||
a6JL[c6JL] = ((o6DL*2.0) - (o6AL + o6BL + o6CL + o6EL + o6FL));
|
||||
a6KL[c6KL] = ((o6EL*2.0) - (o6AL + o6BL + o6CL + o6DL + o6FL));
|
||||
a6LL[c6LL] = ((o6FL*2.0) - (o6AL + o6BL + o6CL + o6DL + o6EL));
|
||||
|
||||
c6GL++; if (c6GL < 0 || c6GL > d6G) c6GL = 0;
|
||||
c6HL++; if (c6HL < 0 || c6HL > d6H) c6HL = 0;
|
||||
c6IL++; if (c6IL < 0 || c6IL > d6I) c6IL = 0;
|
||||
c6JL++; if (c6JL < 0 || c6JL > d6J) c6JL = 0;
|
||||
c6KL++; if (c6KL < 0 || c6KL > d6K) c6KL = 0;
|
||||
c6LL++; if (c6LL < 0 || c6LL > d6L) c6LL = 0;
|
||||
|
||||
double o6GL = a6GL[c6GL-((c6GL > d6G)?d6G+1:0)];
|
||||
double o6HL = a6HL[c6HL-((c6HL > d6H)?d6H+1:0)];
|
||||
double o6IL = a6IL[c6IL-((c6IL > d6I)?d6I+1:0)];
|
||||
double o6JL = a6JL[c6JL-((c6JL > d6J)?d6J+1:0)];
|
||||
double o6KL = a6KL[c6KL-((c6KL > d6K)?d6K+1:0)];
|
||||
double o6LL = a6LL[c6LL-((c6LL > d6L)?d6L+1:0)];
|
||||
|
||||
a6ER[c6ER] = ((o6FR*2.0) - (o6LR + o6RR + o6XR + o6ZER + o6ZKR));
|
||||
a6KR[c6KR] = ((o6LR*2.0) - (o6FR + o6RR + o6XR + o6ZER + o6ZKR));
|
||||
a6QR[c6QR] = ((o6RR*2.0) - (o6FR + o6LR + o6XR + o6ZER + o6ZKR));
|
||||
a6WR[c6WR] = ((o6XR*2.0) - (o6FR + o6LR + o6RR + o6ZER + o6ZKR));
|
||||
a6ZDR[c6ZDR] = ((o6ZER*2.0) - (o6FR + o6LR + o6RR + o6XR + o6ZKR));
|
||||
a6ZJR[c6ZJR] = ((o6ZKR*2.0) - (o6FR + o6LR + o6RR + o6XR + o6ZER));
|
||||
|
||||
c6ER++; if (c6ER < 0 || c6ER > d6E) c6ER = 0;
|
||||
c6KR++; if (c6KR < 0 || c6KR > d6K) c6KR = 0;
|
||||
c6QR++; if (c6QR < 0 || c6QR > d6Q) c6QR = 0;
|
||||
c6WR++; if (c6WR < 0 || c6WR > d6W) c6WR = 0;
|
||||
c6ZDR++; if (c6ZDR < 0 || c6ZDR > d6ZD) c6ZDR = 0;
|
||||
c6ZJR++; if (c6ZJR < 0 || c6ZJR > d6ZJ) c6ZJR = 0;
|
||||
|
||||
double o6ER = a6ER[c6ER-((c6ER > d6E)?d6E+1:0)];
|
||||
double o6KR = a6KR[c6KR-((c6KR > d6K)?d6K+1:0)];
|
||||
double o6QR = a6QR[c6QR-((c6QR > d6Q)?d6Q+1:0)];
|
||||
double o6WR = a6WR[c6WR-((c6WR > d6W)?d6W+1:0)];
|
||||
double o6ZDR = a6ZDR[c6ZDR-((c6ZDR > d6ZD)?d6ZD+1:0)];
|
||||
double o6ZJR = a6ZJR[c6ZJR-((c6ZJR > d6ZJ)?d6ZJ+1:0)];
|
||||
|
||||
//-------- two
|
||||
|
||||
a6ML[c6ML] = ((o6GL*2.0) - (o6HL + o6IL + o6JL + o6KL + o6LL));
|
||||
a6NL[c6NL] = ((o6HL*2.0) - (o6GL + o6IL + o6JL + o6KL + o6LL));
|
||||
a6OL[c6OL] = ((o6IL*2.0) - (o6GL + o6HL + o6JL + o6KL + o6LL));
|
||||
a6PL[c6PL] = ((o6JL*2.0) - (o6GL + o6HL + o6IL + o6KL + o6LL));
|
||||
a6QL[c6QL] = ((o6KL*2.0) - (o6GL + o6HL + o6IL + o6JL + o6LL));
|
||||
a6RL[c6RL] = ((o6LL*2.0) - (o6GL + o6HL + o6IL + o6JL + o6KL));
|
||||
|
||||
c6ML++; if (c6ML < 0 || c6ML > d6M) c6ML = 0;
|
||||
c6NL++; if (c6NL < 0 || c6NL > d6N) c6NL = 0;
|
||||
c6OL++; if (c6OL < 0 || c6OL > d6O) c6OL = 0;
|
||||
c6PL++; if (c6PL < 0 || c6PL > d6P) c6PL = 0;
|
||||
c6QL++; if (c6QL < 0 || c6QL > d6Q) c6QL = 0;
|
||||
c6RL++; if (c6RL < 0 || c6RL > d6R) c6RL = 0;
|
||||
|
||||
double o6ML = a6ML[c6ML-((c6ML > d6M)?d6M+1:0)];
|
||||
double o6NL = a6NL[c6NL-((c6NL > d6N)?d6N+1:0)];
|
||||
double o6OL = a6OL[c6OL-((c6OL > d6O)?d6O+1:0)];
|
||||
double o6PL = a6PL[c6PL-((c6PL > d6P)?d6P+1:0)];
|
||||
double o6QL = a6QL[c6QL-((c6QL > d6Q)?d6Q+1:0)];
|
||||
double o6RL = a6RL[c6RL-((c6RL > d6R)?d6R+1:0)];
|
||||
|
||||
a6DR[c6DR] = ((o6ER*2.0) - (o6KR + o6QR + o6WR + o6ZDR + o6ZJR));
|
||||
a6JR[c6JR] = ((o6KR*2.0) - (o6ER + o6QR + o6WR + o6ZDR + o6ZJR));
|
||||
a6PR[c6PR] = ((o6QR*2.0) - (o6ER + o6KR + o6WR + o6ZDR + o6ZJR));
|
||||
a6VR[c6VR] = ((o6WR*2.0) - (o6ER + o6KR + o6QR + o6ZDR + o6ZJR));
|
||||
a6ZCR[c6ZCR] = ((o6ZDR*2.0) - (o6ER + o6KR + o6QR + o6WR + o6ZJR));
|
||||
a6ZIR[c6ZIR] = ((o6ZJR*2.0) - (o6ER + o6KR + o6QR + o6WR + o6ZDR));
|
||||
|
||||
c6DR++; if (c6DR < 0 || c6DR > d6D) c6DR = 0;
|
||||
c6JR++; if (c6JR < 0 || c6JR > d6J) c6JR = 0;
|
||||
c6PR++; if (c6PR < 0 || c6PR > d6P) c6PR = 0;
|
||||
c6VR++; if (c6VR < 0 || c6VR > d6V) c6VR = 0;
|
||||
c6ZCR++; if (c6ZCR < 0 || c6ZCR > d6ZC) c6ZCR = 0;
|
||||
c6ZIR++; if (c6ZIR < 0 || c6ZIR > d6ZI) c6ZIR = 0;
|
||||
|
||||
double o6DR = a6DR[c6DR-((c6DR > d6D)?d6D+1:0)];
|
||||
double o6JR = a6JR[c6JR-((c6JR > d6J)?d6J+1:0)];
|
||||
double o6PR = a6PR[c6PR-((c6PR > d6P)?d6P+1:0)];
|
||||
double o6VR = a6VR[c6VR-((c6VR > d6V)?d6V+1:0)];
|
||||
double o6ZCR = a6ZCR[c6ZCR-((c6ZCR > d6ZC)?d6ZC+1:0)];
|
||||
double o6ZIR = a6ZIR[c6ZIR-((c6ZIR > d6ZI)?d6ZI+1:0)];
|
||||
|
||||
//-------- three
|
||||
|
||||
a6SL[c6SL] = ((o6ML*2.0) - (o6NL + o6OL + o6PL + o6QL + o6RL));
|
||||
a6TL[c6TL] = ((o6NL*2.0) - (o6ML + o6OL + o6PL + o6QL + o6RL));
|
||||
a6UL[c6UL] = ((o6OL*2.0) - (o6ML + o6NL + o6PL + o6QL + o6RL));
|
||||
a6VL[c6VL] = ((o6PL*2.0) - (o6ML + o6NL + o6OL + o6QL + o6RL));
|
||||
a6WL[c6WL] = ((o6QL*2.0) - (o6ML + o6NL + o6OL + o6PL + o6RL));
|
||||
a6XL[c6XL] = ((o6RL*2.0) - (o6ML + o6NL + o6OL + o6PL + o6QL));
|
||||
|
||||
c6SL++; if (c6SL < 0 || c6SL > d6S) c6SL = 0;
|
||||
c6TL++; if (c6TL < 0 || c6TL > d6T) c6TL = 0;
|
||||
c6UL++; if (c6UL < 0 || c6UL > d6U) c6UL = 0;
|
||||
c6VL++; if (c6VL < 0 || c6VL > d6V) c6VL = 0;
|
||||
c6WL++; if (c6WL < 0 || c6WL > d6W) c6WL = 0;
|
||||
c6XL++; if (c6XL < 0 || c6XL > d6X) c6XL = 0;
|
||||
|
||||
double o6SL = a6SL[c6SL-((c6SL > d6S)?d6S+1:0)];
|
||||
double o6TL = a6TL[c6TL-((c6TL > d6T)?d6T+1:0)];
|
||||
double o6UL = a6UL[c6UL-((c6UL > d6U)?d6U+1:0)];
|
||||
double o6VL = a6VL[c6VL-((c6VL > d6V)?d6V+1:0)];
|
||||
double o6WL = a6WL[c6WL-((c6WL > d6W)?d6W+1:0)];
|
||||
double o6XL = a6XL[c6XL-((c6XL > d6X)?d6X+1:0)];
|
||||
|
||||
a6CR[c6CR] = ((o6DR*2.0) - (o6JR + o6PR + o6VR + o6ZCR + o6ZIR));
|
||||
a6IR[c6IR] = ((o6JR*2.0) - (o6DR + o6PR + o6VR + o6ZCR + o6ZIR));
|
||||
a6OR[c6OR] = ((o6PR*2.0) - (o6DR + o6JR + o6VR + o6ZCR + o6ZIR));
|
||||
a6UR[c6UR] = ((o6VR*2.0) - (o6DR + o6JR + o6PR + o6ZCR + o6ZIR));
|
||||
a6ZBR[c6ZBR] = ((o6ZCR*2.0) - (o6DR + o6JR + o6PR + o6VR + o6ZIR));
|
||||
a6ZHR[c6ZHR] = ((o6ZIR*2.0) - (o6DR + o6JR + o6PR + o6VR + o6ZCR));
|
||||
|
||||
c6CR++; if (c6CR < 0 || c6CR > d6C) c6CR = 0;
|
||||
c6IR++; if (c6IR < 0 || c6IR > d6I) c6IR = 0;
|
||||
c6OR++; if (c6OR < 0 || c6OR > d6O) c6OR = 0;
|
||||
c6UR++; if (c6UR < 0 || c6UR > d6U) c6UR = 0;
|
||||
c6ZBR++; if (c6ZBR < 0 || c6ZBR > d6ZB) c6ZBR = 0;
|
||||
c6ZHR++; if (c6ZHR < 0 || c6ZHR > d6ZH) c6ZHR = 0;
|
||||
|
||||
double o6CR = a6CR[c6CR-((c6CR > d6C)?d6C+1:0)];
|
||||
double o6IR = a6IR[c6IR-((c6IR > d6I)?d6I+1:0)];
|
||||
double o6OR = a6OR[c6OR-((c6OR > d6O)?d6O+1:0)];
|
||||
double o6UR = a6UR[c6UR-((c6UR > d6U)?d6U+1:0)];
|
||||
double o6ZBR = a6ZBR[c6ZBR-((c6ZBR > d6ZB)?d6ZB+1:0)];
|
||||
double o6ZHR = a6ZHR[c6ZHR-((c6ZHR > d6ZH)?d6ZH+1:0)];
|
||||
|
||||
//-------- four
|
||||
|
||||
a6YL[c6YL] = ((o6SL*2.0) - (o6TL + o6UL + o6VL + o6WL + o6XL));
|
||||
a6ZAL[c6ZAL] = ((o6TL*2.0) - (o6SL + o6UL + o6VL + o6WL + o6XL));
|
||||
a6ZBL[c6ZBL] = ((o6UL*2.0) - (o6SL + o6TL + o6VL + o6WL + o6XL));
|
||||
a6ZCL[c6ZCL] = ((o6VL*2.0) - (o6SL + o6TL + o6UL + o6WL + o6XL));
|
||||
a6ZDL[c6ZDL] = ((o6WL*2.0) - (o6SL + o6TL + o6UL + o6VL + o6XL));
|
||||
a6ZEL[c6ZEL] = ((o6XL*2.0) - (o6SL + o6TL + o6UL + o6VL + o6WL));
|
||||
|
||||
c6YL++; if (c6YL < 0 || c6YL > d6Y) c6YL = 0;
|
||||
c6ZAL++; if (c6ZAL < 0 || c6ZAL > d6ZA) c6ZAL = 0;
|
||||
c6ZBL++; if (c6ZBL < 0 || c6ZBL > d6ZB) c6ZBL = 0;
|
||||
c6ZCL++; if (c6ZCL < 0 || c6ZCL > d6ZC) c6ZCL = 0;
|
||||
c6ZDL++; if (c6ZDL < 0 || c6ZDL > d6ZD) c6ZDL = 0;
|
||||
c6ZEL++; if (c6ZEL < 0 || c6ZEL > d6ZE) c6ZEL = 0;
|
||||
|
||||
double o6YL = a6YL[c6YL-((c6YL > d6Y)?d6Y+1:0)];
|
||||
double o6ZAL = a6ZAL[c6ZAL-((c6ZAL > d6ZA)?d6ZA+1:0)];
|
||||
double o6ZBL = a6ZBL[c6ZBL-((c6ZBL > d6ZB)?d6ZB+1:0)];
|
||||
double o6ZCL = a6ZCL[c6ZCL-((c6ZCL > d6ZC)?d6ZC+1:0)];
|
||||
double o6ZDL = a6ZDL[c6ZDL-((c6ZDL > d6ZD)?d6ZD+1:0)];
|
||||
double o6ZEL = a6ZEL[c6ZEL-((c6ZEL > d6ZE)?d6ZE+1:0)];
|
||||
|
||||
a6BR[c6BR] = ((o6CR*2.0) - (o6IR + o6OR + o6UR + o6ZBR + o6ZHR));
|
||||
a6HR[c6HR] = ((o6IR*2.0) - (o6CR + o6OR + o6UR + o6ZBR + o6ZHR));
|
||||
a6NR[c6NR] = ((o6OR*2.0) - (o6CR + o6IR + o6UR + o6ZBR + o6ZHR));
|
||||
a6TR[c6TR] = ((o6UR*2.0) - (o6CR + o6IR + o6OR + o6ZBR + o6ZHR));
|
||||
a6ZAR[c6ZAR] = ((o6ZBR*2.0) - (o6CR + o6IR + o6OR + o6UR + o6ZHR));
|
||||
a6ZGR[c6ZGR] = ((o6ZHR*2.0) - (o6CR + o6IR + o6OR + o6UR + o6ZBR));
|
||||
|
||||
c6BR++; if (c6BR < 0 || c6BR > d6B) c6BR = 0;
|
||||
c6HR++; if (c6HR < 0 || c6HR > d6H) c6HR = 0;
|
||||
c6NR++; if (c6NR < 0 || c6NR > d6N) c6NR = 0;
|
||||
c6TR++; if (c6TR < 0 || c6TR > d6T) c6TR = 0;
|
||||
c6ZBR++; if (c6ZBR < 0 || c6ZBR > d6ZB) c6ZBR = 0;
|
||||
c6ZGR++; if (c6ZGR < 0 || c6ZGR > d6ZG) c6ZGR = 0;
|
||||
|
||||
double o6BR = a6BR[c6BR-((c6BR > d6B)?d6B+1:0)];
|
||||
double o6HR = a6HR[c6HR-((c6HR > d6H)?d6H+1:0)];
|
||||
double o6NR = a6NR[c6NR-((c6NR > d6N)?d6N+1:0)];
|
||||
double o6TR = a6TR[c6TR-((c6TR > d6T)?d6T+1:0)];
|
||||
double o6ZAR = a6ZAR[c6ZAR-((c6ZAR > d6ZA)?d6ZA+1:0)];
|
||||
double o6ZGR = a6ZGR[c6ZGR-((c6ZGR > d6ZG)?d6ZG+1:0)];
|
||||
|
||||
//-------- five
|
||||
|
||||
a6ZFL[c6ZFL] = ((o6YL*2.0) - (o6ZAL + o6ZBL + o6ZCL + o6ZDL + o6ZEL));
|
||||
a6ZGL[c6ZGL] = ((o6ZAL*2.0) - (o6YL + o6ZBL + o6ZCL + o6ZDL + o6ZEL));
|
||||
a6ZHL[c6ZHL] = ((o6ZBL*2.0) - (o6YL + o6ZAL + o6ZCL + o6ZDL + o6ZEL));
|
||||
a6ZIL[c6ZIL] = ((o6ZCL*2.0) - (o6YL + o6ZAL + o6ZBL + o6ZDL + o6ZEL));
|
||||
a6ZJL[c6ZJL] = ((o6ZDL*2.0) - (o6YL + o6ZAL + o6ZBL + o6ZCL + o6ZEL));
|
||||
a6ZKL[c6ZKL] = ((o6ZEL*2.0) - (o6YL + o6ZAL + o6ZBL + o6ZCL + o6ZDL));
|
||||
|
||||
c6ZFL++; if (c6ZFL < 0 || c6ZFL > d6ZF) c6ZFL = 0;
|
||||
c6ZGL++; if (c6ZGL < 0 || c6ZGL > d6ZG) c6ZGL = 0;
|
||||
c6ZHL++; if (c6ZHL < 0 || c6ZHL > d6ZH) c6ZHL = 0;
|
||||
c6ZIL++; if (c6ZIL < 0 || c6ZIL > d6ZI) c6ZIL = 0;
|
||||
c6ZJL++; if (c6ZJL < 0 || c6ZJL > d6ZJ) c6ZJL = 0;
|
||||
c6ZKL++; if (c6ZKL < 0 || c6ZKL > d6ZK) c6ZKL = 0;
|
||||
|
||||
double o6ZFL = a6ZFL[c6ZFL-((c6ZFL > d6ZF)?d6ZF+1:0)];
|
||||
double o6ZGL = a6ZGL[c6ZGL-((c6ZGL > d6ZG)?d6ZG+1:0)];
|
||||
double o6ZHL = a6ZHL[c6ZHL-((c6ZHL > d6ZH)?d6ZH+1:0)];
|
||||
double o6ZIL = a6ZIL[c6ZIL-((c6ZIL > d6ZI)?d6ZI+1:0)];
|
||||
double o6ZJL = a6ZJL[c6ZJL-((c6ZJL > d6ZJ)?d6ZJ+1:0)];
|
||||
double o6ZKL = a6ZKL[c6ZKL-((c6ZKL > d6ZK)?d6ZK+1:0)];
|
||||
|
||||
a6AR[c6AR] = ((o6BR*2.0) - (o6HR + o6NR + o6TR + o6ZAR + o6ZGR));
|
||||
a6GR[c6GR] = ((o6HR*2.0) - (o6BR + o6NR + o6TR + o6ZAR + o6ZGR));
|
||||
a6MR[c6MR] = ((o6NR*2.0) - (o6BR + o6HR + o6TR + o6ZAR + o6ZGR));
|
||||
a6SR[c6SR] = ((o6TR*2.0) - (o6BR + o6HR + o6NR + o6ZAR + o6ZGR));
|
||||
a6YR[c6YR] = ((o6ZAR*2.0) - (o6BR + o6HR + o6NR + o6TR + o6ZGR));
|
||||
a6ZFR[c6ZFR] = ((o6ZGR*2.0) - (o6BR + o6HR + o6NR + o6TR + o6ZAR));
|
||||
|
||||
c6AR++; if (c6AR < 0 || c6AR > d6A) c6AR = 0;
|
||||
c6GR++; if (c6GR < 0 || c6GR > d6G) c6GR = 0;
|
||||
c6MR++; if (c6MR < 0 || c6MR > d6M) c6MR = 0;
|
||||
c6SR++; if (c6SR < 0 || c6SR > d6S) c6SR = 0;
|
||||
c6YR++; if (c6YR < 0 || c6YR > d6Y) c6YR = 0;
|
||||
c6ZFR++; if (c6ZFR < 0 || c6ZFR > d6ZF) c6ZFR = 0;
|
||||
|
||||
double o6AR = a6AR[c6AR-((c6AR > d6A)?d6A+1:0)];
|
||||
double o6GR = a6GR[c6GR-((c6GR > d6G)?d6G+1:0)];
|
||||
double o6MR = a6MR[c6MR-((c6MR > d6M)?d6M+1:0)];
|
||||
double o6SR = a6SR[c6SR-((c6SR > d6S)?d6S+1:0)];
|
||||
double o6YR = a6YR[c6YR-((c6YR > d6Y)?d6Y+1:0)];
|
||||
double o6ZFR = a6ZFR[c6ZFR-((c6ZFR > d6ZF)?d6ZF+1:0)];
|
||||
|
||||
//-------- six
|
||||
|
||||
f6AL = ((o6AR*2.0) - (o6GR + o6MR + o6SR + o6YR + o6ZFR));
|
||||
f6BL = ((o6GR*2.0) - (o6AR + o6MR + o6SR + o6YR + o6ZFR));
|
||||
f6CL = ((o6MR*2.0) - (o6AR + o6GR + o6SR + o6YR + o6ZFR));
|
||||
f6DL = ((o6SR*2.0) - (o6AR + o6GR + o6MR + o6YR + o6ZFR));
|
||||
f6EL = ((o6YR*2.0) - (o6AR + o6GR + o6MR + o6SR + o6ZFR));
|
||||
f6FL = ((o6ZFR*2.0) - (o6AR + o6GR + o6MR + o6SR + o6YR));
|
||||
|
||||
f6FR = ((o6ZFL*2.0) - (o6ZGL + o6ZHL + o6ZIL + o6ZJL + o6ZKL));
|
||||
f6LR = ((o6ZGL*2.0) - (o6ZFL + o6ZHL + o6ZIL + o6ZJL + o6ZKL));
|
||||
f6RR = ((o6ZHL*2.0) - (o6ZFL + o6ZGL + o6ZIL + o6ZJL + o6ZKL));
|
||||
f6XR = ((o6ZIL*2.0) - (o6ZFL + o6ZGL + o6ZHL + o6ZJL + o6ZKL));
|
||||
f6ZER = ((o6ZJL*2.0) - (o6ZFL + o6ZGL + o6ZHL + o6ZIL + o6ZKL));
|
||||
f6ZKR = ((o6ZKL*2.0) - (o6ZFL + o6ZGL + o6ZHL + o6ZIL + o6ZJL));
|
||||
|
||||
inputSampleL = (o6ZFL + o6ZGL + o6ZHL + o6ZIL + o6ZJL + o6ZKL)*0.001953125;
|
||||
inputSampleR = (o6AR + o6GR + o6MR + o6SR + o6YR + o6ZFR)*0.001953125;
|
||||
|
||||
f6AL = (f6AL+avg6L)*0.5; avg6L = f6AL;
|
||||
f6FR = (f6FR+avg6R)*0.5; avg6R = f6FR;
|
||||
//manipulating deep reverb tail for realism
|
||||
|
||||
inputSampleL += (earlyReflectionL * earlyLoudness);
|
||||
inputSampleR += (earlyReflectionR * earlyLoudness);
|
||||
|
||||
bez[bez_CL] = bez[bez_BL];
|
||||
bez[bez_BL] = bez[bez_AL];
|
||||
bez[bez_AL] = inputSampleL;
|
||||
bez[bez_SampL] = 0.0;
|
||||
|
||||
bez[bez_CR] = bez[bez_BR];
|
||||
bez[bez_BR] = bez[bez_AR];
|
||||
bez[bez_AR] = inputSampleR;
|
||||
bez[bez_SampR] = 0.0;
|
||||
}
|
||||
double X = bez[bez_cycle]*bezTrim;
|
||||
double CBL = (bez[bez_CL]*(1.0-X))+(bez[bez_BL]*X);
|
||||
double CBR = (bez[bez_CR]*(1.0-X))+(bez[bez_BR]*X);
|
||||
double BAL = (bez[bez_BL]*(1.0-X))+(bez[bez_AL]*X);
|
||||
double BAR = (bez[bez_BR]*(1.0-X))+(bez[bez_AR]*X);
|
||||
double CBAL = (bez[bez_BL]+(CBL*(1.0-X))+(BAL*X))*-0.0625;
|
||||
double CBAR = (bez[bez_BR]+(CBR*(1.0-X))+(BAR*X))*-0.0625;
|
||||
inputSampleL = CBAL+bez[bez_AvgOutSampL]; bez[bez_AvgOutSampL] = CBAL;
|
||||
inputSampleR = CBAR+bez[bez_AvgOutSampR]; bez[bez_AvgOutSampR] = CBAR;
|
||||
|
||||
inputSampleL = (inputSampleL * wet)+(drySampleL * (1.0-wet));
|
||||
inputSampleR = (inputSampleR * wet)+(drySampleR * (1.0-wet));
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
frexpf((float)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*outputL = inputSampleL;
|
||||
*outputR = inputSampleR;
|
||||
//direct stereo out
|
||||
|
||||
inputL += 1;
|
||||
inputR += 1;
|
||||
outputL += 1;
|
||||
outputR += 1;
|
||||
}
|
||||
return noErr;
|
||||
}
|
||||
1
plugins/MacAU/kWoodRoom/kWoodRoom.exp
Executable file
1
plugins/MacAU/kWoodRoom/kWoodRoom.exp
Executable file
|
|
@ -0,0 +1 @@
|
|||
_kWoodRoomEntry
|
||||
270
plugins/MacAU/kWoodRoom/kWoodRoom.h
Executable file
270
plugins/MacAU/kWoodRoom/kWoodRoom.h
Executable file
|
|
@ -0,0 +1,270 @@
|
|||
/*
|
||||
* File: kWoodRoom.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 11/1/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include "AUEffectBase.h"
|
||||
#include "kWoodRoomVersion.h"
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
#include "AUDebugDispatcher.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __kWoodRoom_h__
|
||||
#define __kWoodRoom_h__
|
||||
|
||||
|
||||
#pragma mark ____kWoodRoom Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamA = 0.5;
|
||||
static const float kDefaultValue_ParamB = 0.5;
|
||||
static const float kDefaultValue_ParamC = 0.25;
|
||||
static const float kDefaultValue_ParamD = 0.5;
|
||||
static const float kDefaultValue_ParamE = 0.5;
|
||||
static const float kDefaultValue_ParamF = 0.5;
|
||||
|
||||
static CFStringRef kParameterAName = CFSTR("Regen");
|
||||
static CFStringRef kParameterBName = CFSTR("Derez");
|
||||
static CFStringRef kParameterCName = CFSTR("Filter");
|
||||
static CFStringRef kParameterDName = CFSTR("EarlyRf");
|
||||
static CFStringRef kParameterEName = CFSTR("Positin");
|
||||
static CFStringRef kParameterFName = CFSTR("Dry/Wet");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
kParam_B =1,
|
||||
kParam_C =2,
|
||||
kParam_D =3,
|
||||
kParam_E =4,
|
||||
kParam_F =5,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=6
|
||||
};
|
||||
|
||||
const int d3A = 581; const int d3B = 831; const int d3C = 832;
|
||||
const int d3D = 574; const int d3E = 598; const int d3F = 685;
|
||||
const int d3G = 499; const int d3H = 573; const int d3I = 655;
|
||||
#define THREEBYTHREE true
|
||||
const int d6A = 154; const int d6B = 832; const int d6C = 109; const int d6D = 685; const int d6E = 33; const int d6F = 12; const int d6G = 27; const int d6H = 30; const int d6I = 339; const int d6J = 499; const int d6K = 296; const int d6L = 169; const int d6M = 169; const int d6N = 831; const int d6O = 15; const int d6P = 411; const int d6Q = 238; const int d6R = 68; const int d6S = 0; const int d6T = 8; const int d6U = 655; const int d6V = 581; const int d6W = 465; const int d6X = 173; const int d6Y = 3; const int d6ZA = 96; const int d6ZB = 573; const int d6ZC = 243; const int d6ZD = 30; const int d6ZE = 188; const int d6ZF = 291; const int d6ZG = 11; const int d6ZH = 372; const int d6ZI = 574; const int d6ZJ = 100; const int d6ZK = 598; //1 to 90 ms, 249 seat club
|
||||
#define SIXBYSIX true // 249seat154832109x6 on 2025-10-31 kWoodRoom
|
||||
const int early[] = {0, 3, 8, 11, 12, 15, 27, 30, 30, 33, 68, 96, 100, 109, 154, 169, 169, 173, 188, 238, 243, 291, 296, 339, 372, 411, 465, 499, 573, 574, 581, 598, 655, 685, 831, 832};
|
||||
|
||||
#pragma mark ____kWoodRoom
|
||||
class kWoodRoom : public AUEffectBase
|
||||
{
|
||||
public:
|
||||
kWoodRoom(AudioUnit component);
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
virtual ~kWoodRoom () { delete mDebugDispatcher; }
|
||||
#endif
|
||||
|
||||
virtual ComponentResult Reset(AudioUnitScope inScope, AudioUnitElement inElement);
|
||||
|
||||
virtual OSStatus ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
|
||||
const AudioBufferList & inBuffer, AudioBufferList & outBuffer,
|
||||
UInt32 inFramesToProcess);
|
||||
virtual UInt32 SupportedNumChannels(const AUChannelInfo ** outInfo);
|
||||
|
||||
virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings);
|
||||
|
||||
virtual ComponentResult GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo);
|
||||
|
||||
virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable );
|
||||
|
||||
virtual ComponentResult GetProperty(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData);
|
||||
|
||||
virtual ComponentResult Initialize();
|
||||
virtual bool SupportsTail () { return true; }
|
||||
virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples
|
||||
virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples
|
||||
|
||||
/*! @method Version */
|
||||
virtual ComponentResult Version() { return kkWoodRoomVersion; }
|
||||
|
||||
private:
|
||||
double a3AL[d3A+5];
|
||||
double a3BL[d3B+5];
|
||||
double a3CL[d3C+5];
|
||||
double a3DL[d3D+5];
|
||||
double a3EL[d3E+5];
|
||||
double a3FL[d3F+5];
|
||||
double a3GL[d3G+5];
|
||||
double a3HL[d3H+5];
|
||||
double a3IL[d3I+5];
|
||||
double a3AR[d3A+5];
|
||||
double a3BR[d3B+5];
|
||||
double a3CR[d3C+5];
|
||||
double a3DR[d3D+5];
|
||||
double a3ER[d3E+5];
|
||||
double a3FR[d3F+5];
|
||||
double a3GR[d3G+5];
|
||||
double a3HR[d3H+5];
|
||||
double a3IR[d3I+5];
|
||||
int c3AL,c3AR,c3BL,c3BR,c3CL,c3CR,c3DL,c3DR,c3EL,c3ER;
|
||||
int c3FL,c3FR,c3GL,c3GR,c3HL,c3HR,c3IL,c3IR;
|
||||
|
||||
double a6AL[d6A+5];
|
||||
double a6BL[d6B+5];
|
||||
double a6CL[d6C+5];
|
||||
double a6DL[d6D+5];
|
||||
double a6EL[d6E+5];
|
||||
double a6FL[d6F+5];
|
||||
double a6GL[d6G+5];
|
||||
double a6HL[d6H+5];
|
||||
double a6IL[d6I+5];
|
||||
double a6JL[d6J+5];
|
||||
double a6KL[d6K+5];
|
||||
double a6LL[d6L+5];
|
||||
double a6ML[d6M+5];
|
||||
double a6NL[d6N+5];
|
||||
double a6OL[d6O+5];
|
||||
double a6PL[d6P+5];
|
||||
double a6QL[d6Q+5];
|
||||
double a6RL[d6R+5];
|
||||
double a6SL[d6S+5];
|
||||
double a6TL[d6T+5];
|
||||
double a6UL[d6U+5];
|
||||
double a6VL[d6V+5];
|
||||
double a6WL[d6W+5];
|
||||
double a6XL[d6X+5];
|
||||
double a6YL[d6Y+5];
|
||||
double a6ZAL[d6ZA+5];
|
||||
double a6ZBL[d6ZB+5];
|
||||
double a6ZCL[d6ZC+5];
|
||||
double a6ZDL[d6ZD+5];
|
||||
double a6ZEL[d6ZE+5];
|
||||
double a6ZFL[d6ZF+5];
|
||||
double a6ZGL[d6ZG+5];
|
||||
double a6ZHL[d6ZH+5];
|
||||
double a6ZIL[d6ZI+5];
|
||||
double a6ZJL[d6ZJ+5];
|
||||
double a6ZKL[d6ZK+5];
|
||||
double a6AR[d6A+5];
|
||||
double a6BR[d6B+5];
|
||||
double a6CR[d6C+5];
|
||||
double a6DR[d6D+5];
|
||||
double a6ER[d6E+5];
|
||||
double a6FR[d6F+5];
|
||||
double a6GR[d6G+5];
|
||||
double a6HR[d6H+5];
|
||||
double a6IR[d6I+5];
|
||||
double a6JR[d6J+5];
|
||||
double a6KR[d6K+5];
|
||||
double a6LR[d6L+5];
|
||||
double a6MR[d6M+5];
|
||||
double a6NR[d6N+5];
|
||||
double a6OR[d6O+5];
|
||||
double a6PR[d6P+5];
|
||||
double a6QR[d6Q+5];
|
||||
double a6RR[d6R+5];
|
||||
double a6SR[d6S+5];
|
||||
double a6TR[d6T+5];
|
||||
double a6UR[d6U+5];
|
||||
double a6VR[d6V+5];
|
||||
double a6WR[d6W+5];
|
||||
double a6XR[d6X+5];
|
||||
double a6YR[d6Y+5];
|
||||
double a6ZAR[d6ZA+5];
|
||||
double a6ZBR[d6ZB+5];
|
||||
double a6ZCR[d6ZC+5];
|
||||
double a6ZDR[d6ZD+5];
|
||||
double a6ZER[d6ZE+5];
|
||||
double a6ZFR[d6ZF+5];
|
||||
double a6ZGR[d6ZG+5];
|
||||
double a6ZHR[d6ZH+5];
|
||||
double a6ZIR[d6ZI+5];
|
||||
double a6ZJR[d6ZJ+5];
|
||||
double a6ZKR[d6ZK+5];
|
||||
int c6AL,c6BL,c6CL,c6DL,c6EL,c6FL,c6GL,c6HL,c6IL;
|
||||
int c6JL,c6KL,c6LL,c6ML,c6NL,c6OL,c6PL,c6QL,c6RL;
|
||||
int c6SL,c6TL,c6UL,c6VL,c6WL,c6XL,c6YL,c6ZAL,c6ZBL;
|
||||
int c6ZCL,c6ZDL,c6ZEL,c6ZFL,c6ZGL,c6ZHL,c6ZIL,c6ZJL,c6ZKL;
|
||||
int c6AR,c6BR,c6CR,c6DR,c6ER,c6FR,c6GR,c6HR,c6IR;
|
||||
int c6JR,c6KR,c6LR,c6MR,c6NR,c6OR,c6PR,c6QR,c6RR;
|
||||
int c6SR,c6TR,c6UR,c6VR,c6WR,c6XR,c6YR,c6ZAR,c6ZBR;
|
||||
int c6ZCR,c6ZDR,c6ZER,c6ZFR,c6ZGR,c6ZHR,c6ZIR,c6ZJR,c6ZKR;
|
||||
double f6AL,f6BL,f6CL,f6DL,f6EL,f6FL;
|
||||
double f6FR,f6LR,f6RR,f6XR,f6ZER,f6ZKR;
|
||||
double avg6L,avg6R;
|
||||
|
||||
enum {
|
||||
bez_AL,
|
||||
bez_AR,
|
||||
bez_BL,
|
||||
bez_BR,
|
||||
bez_CL,
|
||||
bez_CR,
|
||||
bez_InL,
|
||||
bez_InR,
|
||||
bez_UnInL,
|
||||
bez_UnInR,
|
||||
bez_SampL,
|
||||
bez_SampR,
|
||||
bez_AvgInSampL,
|
||||
bez_AvgInSampR,
|
||||
bez_AvgOutSampL,
|
||||
bez_AvgOutSampR,
|
||||
bez_cycle,
|
||||
bez_total
|
||||
}; //the new undersampling. bez signifies the bezier curve reconstruction
|
||||
double bez[bez_total];
|
||||
|
||||
double bezF[bez_total];
|
||||
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#endif
|
||||
61
plugins/MacAU/kWoodRoom/kWoodRoom.r
Executable file
61
plugins/MacAU/kWoodRoom/kWoodRoom.r
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* File: kWoodRoom.r
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 11/1/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include <AudioUnit/AudioUnit.r>
|
||||
|
||||
#include "kWoodRoomVersion.h"
|
||||
|
||||
// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description
|
||||
#define kAudioUnitResID_kWoodRoom 1000
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kWoodRoom~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#define RES_ID kAudioUnitResID_kWoodRoom
|
||||
#define COMP_TYPE kAudioUnitType_Effect
|
||||
#define COMP_SUBTYPE kWoodRoom_COMP_SUBTYPE
|
||||
#define COMP_MANUF kWoodRoom_COMP_MANF
|
||||
|
||||
#define VERSION kkWoodRoomVersion
|
||||
#define NAME "Airwindows: kWoodRoom"
|
||||
#define DESCRIPTION "kWoodRoom AU"
|
||||
#define ENTRY_POINT "kWoodRoomEntry"
|
||||
|
||||
#include "AUResources.r"
|
||||
1359
plugins/MacAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.mode1v3
Executable file
1359
plugins/MacAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.mode1v3
Executable file
File diff suppressed because it is too large
Load diff
142
plugins/MacAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.pbxuser
Executable file
142
plugins/MacAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.pbxuser
Executable file
|
|
@ -0,0 +1,142 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
activeBuildConfigurationName = Release;
|
||||
activeTarget = 8D01CCC60486CAD60068D4B7 /* kWoodRoom */;
|
||||
codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */;
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
364,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
188,
|
||||
60,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXTargetDataSource_PrimaryAttribute,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 783773359;
|
||||
PBXWorkspaceStateSaveDate = 783773359;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B2829512EB7764F003789A7 /* PBXTextBookmark */ = 8B2829512EB7764F003789A7 /* PBXTextBookmark */;
|
||||
8BD128442EB6E2C500B339E5 /* PBXTextBookmark */ = 8BD128442EB6E2C500B339E5 /* PBXTextBookmark */;
|
||||
8BD128462EB6E2C500B339E5 /* PBXTextBookmark */ = 8BD128462EB6E2C500B339E5 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B2829512EB7764F003789A7 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* kWoodRoom.h */;
|
||||
name = "kWoodRoom.h: 88";
|
||||
rLen = 0;
|
||||
rLoc = 4838;
|
||||
rType = 0;
|
||||
vrLen = 1065;
|
||||
vrLoc = 3804;
|
||||
};
|
||||
8BA05A660720730100365D66 /* kWoodRoom.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {939, 14634}}";
|
||||
sepNavSelRange = "{35694, 84}";
|
||||
sepNavVisRange = "{21092, 1777}";
|
||||
sepNavWindowFrame = "{{7, 52}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* kWoodRoomVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}";
|
||||
sepNavSelRange = "{2906, 0}";
|
||||
sepNavVisRange = "{1069, 1900}";
|
||||
sepNavWindowFrame = "{{15, 47}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {516, 23430}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 1336}";
|
||||
};
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* kWoodRoom.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {7041, 4446}}";
|
||||
sepNavSelRange = "{4838, 0}";
|
||||
sepNavVisRange = "{3804, 1065}";
|
||||
sepNavWindowFrame = "{{15, 47}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BD128442EB6E2C500B339E5 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* kWoodRoom.cpp */;
|
||||
name = "kWoodRoom.cpp: 472";
|
||||
rLen = 0;
|
||||
rLoc = 22228;
|
||||
rType = 0;
|
||||
vrLen = 184;
|
||||
vrLoc = 22080;
|
||||
};
|
||||
8BD128462EB6E2C500B339E5 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* kWoodRoom.h */;
|
||||
name = "kWoodRoom.h: 88";
|
||||
rLen = 0;
|
||||
rLoc = 4838;
|
||||
rType = 0;
|
||||
vrLen = 1065;
|
||||
vrLoc = 3804;
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
repositoryNamesForRoots = {
|
||||
"" = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
8BD3CCB9148830B20062E48C /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
8D01CCC60486CAD60068D4B7 /* kWoodRoom */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
}
|
||||
1485
plugins/MacAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.perspectivev3
Executable file
1485
plugins/MacAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.perspectivev3
Executable file
File diff suppressed because it is too large
Load diff
490
plugins/MacAU/kWoodRoom/kWoodRoom.xcodeproj/project.pbxproj
Executable file
490
plugins/MacAU/kWoodRoom/kWoodRoom.xcodeproj/project.pbxproj
Executable file
|
|
@ -0,0 +1,490 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */; };
|
||||
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126C089847F5002C6BFC /* CAVectorUnit.h */; };
|
||||
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */; };
|
||||
8B4119B70749654200361ABE /* kWoodRoom.r in Rez */ = {isa = PBXBuildFile; fileRef = 8BA05A680720730100365D66 /* kWoodRoom.r */; };
|
||||
8BA05A6B0720730100365D66 /* kWoodRoom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* kWoodRoom.cpp */; };
|
||||
8BA05A6E0720730100365D66 /* kWoodRoomVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* kWoodRoomVersion.h */; };
|
||||
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A7F072073D200365D66 /* AUBase.cpp */; };
|
||||
8BA05AAF072073D300365D66 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A80072073D200365D66 /* AUBase.h */; };
|
||||
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A81072073D200365D66 /* AUDispatch.cpp */; };
|
||||
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A82072073D200365D66 /* AUDispatch.h */; };
|
||||
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A83072073D200365D66 /* AUInputElement.cpp */; };
|
||||
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A84072073D200365D66 /* AUInputElement.h */; };
|
||||
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A85072073D200365D66 /* AUOutputElement.cpp */; };
|
||||
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A86072073D200365D66 /* AUOutputElement.h */; };
|
||||
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A88072073D200365D66 /* AUScopeElement.cpp */; };
|
||||
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A89072073D200365D66 /* AUScopeElement.h */; };
|
||||
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A8A072073D200365D66 /* ComponentBase.cpp */; };
|
||||
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A8B072073D200365D66 /* ComponentBase.h */; };
|
||||
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A9A072073D200365D66 /* AUEffectBase.cpp */; };
|
||||
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A9B072073D200365D66 /* AUEffectBase.h */; };
|
||||
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA7072073D200365D66 /* AUBuffer.cpp */; };
|
||||
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AA8072073D200365D66 /* AUBuffer.h */; };
|
||||
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */; };
|
||||
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */; };
|
||||
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */; };
|
||||
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAC072073D200365D66 /* AUSilentTimeout.h */; };
|
||||
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */; };
|
||||
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */; };
|
||||
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */; };
|
||||
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE10720742100365D66 /* CAMutex.cpp */; };
|
||||
8BA05AE80720742100365D66 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE20720742100365D66 /* CAMutex.h */; };
|
||||
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */; };
|
||||
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */; };
|
||||
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; };
|
||||
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; };
|
||||
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; };
|
||||
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05B050720754400365D66 /* CAAUParameter.cpp */; };
|
||||
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05B060720754400365D66 /* CAAUParameter.h */; };
|
||||
8BC6025C073B072D006C4272 /* kWoodRoom.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* kWoodRoom.h */; };
|
||||
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */; };
|
||||
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
089C167EFE841241C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = "<group>"; };
|
||||
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = "<group>"; };
|
||||
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = "<group>"; };
|
||||
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
|
||||
8BA05A660720730100365D66 /* kWoodRoom.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = kWoodRoom.cpp; sourceTree = "<group>"; };
|
||||
8BA05A670720730100365D66 /* kWoodRoom.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = kWoodRoom.exp; sourceTree = "<group>"; };
|
||||
8BA05A680720730100365D66 /* kWoodRoom.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = kWoodRoom.r; sourceTree = "<group>"; };
|
||||
8BA05A690720730100365D66 /* kWoodRoomVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kWoodRoomVersion.h; sourceTree = "<group>"; };
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A80072073D200365D66 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = "<group>"; };
|
||||
8BA05A81072073D200365D66 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = "<group>"; };
|
||||
8BA05A82072073D200365D66 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = "<group>"; };
|
||||
8BA05A83072073D200365D66 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A84072073D200365D66 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = "<group>"; };
|
||||
8BA05A85072073D200365D66 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A86072073D200365D66 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = "<group>"; };
|
||||
8BA05A87072073D200365D66 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
|
||||
8BA05A88072073D200365D66 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = "<group>"; };
|
||||
8BA05A89072073D200365D66 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = "<group>"; };
|
||||
8BA05A8A072073D200365D66 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A8B072073D200365D66 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = "<group>"; };
|
||||
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = "<group>"; };
|
||||
8BA05A9B072073D200365D66 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = "<group>"; };
|
||||
8BA05AA7072073D200365D66 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = "<group>"; };
|
||||
8BA05AA8072073D200365D66 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = "<group>"; };
|
||||
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = AUDebugDispatcher.cpp; sourceTree = "<group>"; };
|
||||
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUDebugDispatcher.h; sourceTree = "<group>"; };
|
||||
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = "<group>"; };
|
||||
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = "<group>"; };
|
||||
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = "<group>"; };
|
||||
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = "<group>"; };
|
||||
8BA05AE10720742100365D66 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE20720742100365D66 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = "<group>"; };
|
||||
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = "<group>"; };
|
||||
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = "<group>"; };
|
||||
8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
|
||||
8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
|
||||
8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
|
||||
8BA05B050720754400365D66 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = "<group>"; };
|
||||
8BA05B060720754400365D66 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = "<group>"; };
|
||||
8BC6025B073B072D006C4272 /* kWoodRoom.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = kWoodRoom.h; sourceTree = "<group>"; };
|
||||
8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D01CCD20486CAD60068D4B7 /* kWoodRoom.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = kWoodRoom.component; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AUBaseHelper.cpp; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.cpp; sourceTree = SYSTEM_DEVELOPER_DIR; };
|
||||
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AUBaseHelper.h; path = Extras/CoreAudio/AudioUnits/AUPublic/Utility/AUBaseHelper.h; sourceTree = SYSTEM_DEVELOPER_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D01CCCD0486CAD60068D4B7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */,
|
||||
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */,
|
||||
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
089C166AFE841209C02AAC07 /* kWoodRoom */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB77ADFE841716C02AAC07 /* Source */,
|
||||
089C167CFE841241C02AAC07 /* Resources */,
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
|
||||
19C28FB4FE9D528D11CA2CBB /* Products */,
|
||||
);
|
||||
name = kWoodRoom;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */,
|
||||
8BA05B01072074F900365D66 /* CoreServices.framework */,
|
||||
8BA05AF9072074E100365D66 /* AudioToolbox.framework */,
|
||||
8BA05AFA072074E100365D66 /* AudioUnit.framework */,
|
||||
);
|
||||
name = "External Frameworks and Libraries";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C167CFE841241C02AAC07 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D01CCD10486CAD60068D4B7 /* Info.plist */,
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB77ADFE841716C02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A56072072A900365D66 /* AU Source */,
|
||||
8BA05AEB0720742700365D66 /* PublicUtility */,
|
||||
8BA05A7D072073D200365D66 /* AUPublic */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FB4FE9D528D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D01CCD20486CAD60068D4B7 /* kWoodRoom.component */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A56072072A900365D66 /* AU Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BC6025B073B072D006C4272 /* kWoodRoom.h */,
|
||||
8BA05A660720730100365D66 /* kWoodRoom.cpp */,
|
||||
8BA05A670720730100365D66 /* kWoodRoom.exp */,
|
||||
8BA05A680720730100365D66 /* kWoodRoom.r */,
|
||||
8BA05A690720730100365D66 /* kWoodRoomVersion.h */,
|
||||
);
|
||||
name = "AU Source";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A7D072073D200365D66 /* AUPublic */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A7E072073D200365D66 /* AUBase */,
|
||||
8BA05A99072073D200365D66 /* OtherBases */,
|
||||
8BA05AA6072073D200365D66 /* Utility */,
|
||||
);
|
||||
name = AUPublic;
|
||||
path = Extras/CoreAudio/AudioUnits/AUPublic;
|
||||
sourceTree = SYSTEM_DEVELOPER_DIR;
|
||||
};
|
||||
8BA05A7E072073D200365D66 /* AUBase */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */,
|
||||
8BA05A80072073D200365D66 /* AUBase.h */,
|
||||
8BA05A81072073D200365D66 /* AUDispatch.cpp */,
|
||||
8BA05A82072073D200365D66 /* AUDispatch.h */,
|
||||
8BA05A83072073D200365D66 /* AUInputElement.cpp */,
|
||||
8BA05A84072073D200365D66 /* AUInputElement.h */,
|
||||
8BA05A85072073D200365D66 /* AUOutputElement.cpp */,
|
||||
8BA05A86072073D200365D66 /* AUOutputElement.h */,
|
||||
8BA05A87072073D200365D66 /* AUResources.r */,
|
||||
8BA05A88072073D200365D66 /* AUScopeElement.cpp */,
|
||||
8BA05A89072073D200365D66 /* AUScopeElement.h */,
|
||||
8BA05A8A072073D200365D66 /* ComponentBase.cpp */,
|
||||
8BA05A8B072073D200365D66 /* ComponentBase.h */,
|
||||
);
|
||||
path = AUBase;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A99072073D200365D66 /* OtherBases */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05A9A072073D200365D66 /* AUEffectBase.cpp */,
|
||||
8BA05A9B072073D200365D66 /* AUEffectBase.h */,
|
||||
);
|
||||
path = OtherBases;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05AA6072073D200365D66 /* Utility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
F7C347EE0ECE5AF8008ADFB6 /* AUBaseHelper.cpp */,
|
||||
F7C347EF0ECE5AF8008ADFB6 /* AUBaseHelper.h */,
|
||||
8BA05AA7072073D200365D66 /* AUBuffer.cpp */,
|
||||
8BA05AA8072073D200365D66 /* AUBuffer.h */,
|
||||
8BA05AA9072073D200365D66 /* AUDebugDispatcher.cpp */,
|
||||
8BA05AAA072073D200365D66 /* AUDebugDispatcher.h */,
|
||||
8BA05AAB072073D200365D66 /* AUInputFormatConverter.h */,
|
||||
8BA05AAC072073D200365D66 /* AUSilentTimeout.h */,
|
||||
8BA05AAD072073D200365D66 /* AUTimestampGenerator.h */,
|
||||
);
|
||||
path = Utility;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05AEB0720742700365D66 /* PublicUtility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BA05B050720754400365D66 /* CAAUParameter.cpp */,
|
||||
8BA05B060720754400365D66 /* CAAUParameter.h */,
|
||||
8BA05ADF0720742100365D66 /* CAAudioChannelLayout.cpp */,
|
||||
8BA05AE00720742100365D66 /* CAAudioChannelLayout.h */,
|
||||
8BA05AE10720742100365D66 /* CAMutex.cpp */,
|
||||
8BA05AE20720742100365D66 /* CAMutex.h */,
|
||||
8BA05AE30720742100365D66 /* CAStreamBasicDescription.cpp */,
|
||||
8BA05AE40720742100365D66 /* CAStreamBasicDescription.h */,
|
||||
3EEA126D089847F5002C6BFC /* CAVectorUnitTypes.h */,
|
||||
3EEA126B089847F5002C6BFC /* CAVectorUnit.cpp */,
|
||||
3EEA126C089847F5002C6BFC /* CAVectorUnit.h */,
|
||||
);
|
||||
name = PublicUtility;
|
||||
path = Extras/CoreAudio/PublicUtility;
|
||||
sourceTree = SYSTEM_DEVELOPER_DIR;
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
8D01CCC70486CAD60068D4B7 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05A6E0720730100365D66 /* kWoodRoomVersion.h in Headers */,
|
||||
8BA05AAF072073D300365D66 /* AUBase.h in Headers */,
|
||||
8BA05AB1072073D300365D66 /* AUDispatch.h in Headers */,
|
||||
8BA05AB3072073D300365D66 /* AUInputElement.h in Headers */,
|
||||
8BA05AB5072073D300365D66 /* AUOutputElement.h in Headers */,
|
||||
8BA05AB8072073D300365D66 /* AUScopeElement.h in Headers */,
|
||||
8BA05ABA072073D300365D66 /* ComponentBase.h in Headers */,
|
||||
8BA05AC7072073D300365D66 /* AUEffectBase.h in Headers */,
|
||||
8BA05AD3072073D300365D66 /* AUBuffer.h in Headers */,
|
||||
8BA05AD5072073D300365D66 /* AUDebugDispatcher.h in Headers */,
|
||||
8BA05AD6072073D300365D66 /* AUInputFormatConverter.h in Headers */,
|
||||
8BA05AD7072073D300365D66 /* AUSilentTimeout.h in Headers */,
|
||||
8BA05AD8072073D300365D66 /* AUTimestampGenerator.h in Headers */,
|
||||
8BA05AE60720742100365D66 /* CAAudioChannelLayout.h in Headers */,
|
||||
8BA05AE80720742100365D66 /* CAMutex.h in Headers */,
|
||||
8BA05AEA0720742100365D66 /* CAStreamBasicDescription.h in Headers */,
|
||||
8BA05B080720754400365D66 /* CAAUParameter.h in Headers */,
|
||||
8BC6025C073B072D006C4272 /* kWoodRoom.h in Headers */,
|
||||
3EEA126F089847F5002C6BFC /* CAVectorUnit.h in Headers */,
|
||||
3EEA1270089847F5002C6BFC /* CAVectorUnitTypes.h in Headers */,
|
||||
F7C347F10ECE5AF8008ADFB6 /* AUBaseHelper.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D01CCC60486CAD60068D4B7 /* kWoodRoom */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "kWoodRoom" */;
|
||||
buildPhases = (
|
||||
8D01CCC70486CAD60068D4B7 /* Headers */,
|
||||
8D01CCC90486CAD60068D4B7 /* Resources */,
|
||||
8D01CCCB0486CAD60068D4B7 /* Sources */,
|
||||
8D01CCCD0486CAD60068D4B7 /* Frameworks */,
|
||||
8D01CCCF0486CAD60068D4B7 /* Rez */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = kWoodRoom;
|
||||
productInstallPath = "$(HOME)/Library/Bundles";
|
||||
productName = kWoodRoom;
|
||||
productReference = 8D01CCD20486CAD60068D4B7 /* kWoodRoom.component */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "kWoodRoom" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
English,
|
||||
Japanese,
|
||||
French,
|
||||
German,
|
||||
);
|
||||
mainGroup = 089C166AFE841209C02AAC07 /* kWoodRoom */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D01CCC60486CAD60068D4B7 /* kWoodRoom */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D01CCC90486CAD60068D4B7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXRezBuildPhase section */
|
||||
8D01CCCF0486CAD60068D4B7 /* Rez */ = {
|
||||
isa = PBXRezBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8B4119B70749654200361ABE /* kWoodRoom.r in Rez */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXRezBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D01CCCB0486CAD60068D4B7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05A6B0720730100365D66 /* kWoodRoom.cpp in Sources */,
|
||||
8BA05AAE072073D300365D66 /* AUBase.cpp in Sources */,
|
||||
8BA05AB0072073D300365D66 /* AUDispatch.cpp in Sources */,
|
||||
8BA05AB2072073D300365D66 /* AUInputElement.cpp in Sources */,
|
||||
8BA05AB4072073D300365D66 /* AUOutputElement.cpp in Sources */,
|
||||
8BA05AB7072073D300365D66 /* AUScopeElement.cpp in Sources */,
|
||||
8BA05AB9072073D300365D66 /* ComponentBase.cpp in Sources */,
|
||||
8BA05AC6072073D300365D66 /* AUEffectBase.cpp in Sources */,
|
||||
8BA05AD2072073D300365D66 /* AUBuffer.cpp in Sources */,
|
||||
8BA05AD4072073D300365D66 /* AUDebugDispatcher.cpp in Sources */,
|
||||
8BA05AE50720742100365D66 /* CAAudioChannelLayout.cpp in Sources */,
|
||||
8BA05AE70720742100365D66 /* CAMutex.cpp in Sources */,
|
||||
8BA05AE90720742100365D66 /* CAStreamBasicDescription.cpp in Sources */,
|
||||
8BA05B070720754400365D66 /* CAAUParameter.cpp in Sources */,
|
||||
3EEA126E089847F5002C6BFC /* CAVectorUnit.cpp in Sources */,
|
||||
F7C347F00ECE5AF8008ADFB6 /* AUBaseHelper.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
089C167EFE841241C02AAC07 /* English */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3E4BA244089833B7007656EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
EXPORTED_SYMBOLS_FILE = kWoodRoom.exp;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
||||
LIBRARY_STYLE = Bundle;
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d ppc64_$ppc64 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
|
||||
PRODUCT_NAME = kWoodRoom;
|
||||
WRAPPER_EXTENSION = component;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3E4BA245089833B7007656EC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = (
|
||||
ppc,
|
||||
i386,
|
||||
x86_64,
|
||||
);
|
||||
EXPORTED_SYMBOLS_FILE = kWoodRoom.exp;
|
||||
GCC_ENABLE_FIX_AND_CONTINUE = NO;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 10.4;
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
OTHER_REZFLAGS = "-d ppc_$ppc -d i386_$i386 -d x86_64_$x86_64 -I /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Versions/A/Headers -I \"$(DEVELOPER_DIR)/Examples/CoreAudio/AudioUnits/AUPublic/AUBase\"";
|
||||
PRODUCT_NAME = kWoodRoom;
|
||||
SDKROOT = macosx10.5;
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = all;
|
||||
WRAPPER_EXTENSION = component;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3E4BA248089833B7007656EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
SDKROOT = macosx10.6;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3E4BA249089833B7007656EC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
SDKROOT = macosx10.6;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "kWoodRoom" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3E4BA244089833B7007656EC /* Debug */,
|
||||
3E4BA245089833B7007656EC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
3E4BA247089833B7007656EC /* Build configuration list for PBXProject "kWoodRoom" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3E4BA248089833B7007656EC /* Debug */,
|
||||
3E4BA249089833B7007656EC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
}
|
||||
58
plugins/MacAU/kWoodRoom/kWoodRoomVersion.h
Executable file
58
plugins/MacAU/kWoodRoom/kWoodRoomVersion.h
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* File: kWoodRoomVersion.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 11/1/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef __kWoodRoomVersion_h__
|
||||
#define __kWoodRoomVersion_h__
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
#define kkWoodRoomVersion 0xFFFFFFFF
|
||||
#else
|
||||
#define kkWoodRoomVersion 0x00010000
|
||||
#endif
|
||||
|
||||
//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~//
|
||||
#define kWoodRoom_COMP_MANF 'Dthr'
|
||||
#define kWoodRoom_COMP_SUBTYPE 'kwdr'
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#endif
|
||||
|
||||
16
plugins/MacAU/kWoodRoom/version.plist
Executable file
16
plugins/MacAU/kWoodRoom/version.plist
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildVersion</key>
|
||||
<string>3</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>ProjectName</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>SourceVersion</key>
|
||||
<string>590000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
|
|
@ -70,12 +70,6 @@ ConsoleX2Buss::ConsoleX2Buss(AudioUnit component)
|
|||
SetParameter(kParam_I, kDefaultValue_ParamI );
|
||||
SetParameter(kParam_J, kDefaultValue_ParamJ );
|
||||
SetParameter(kParam_K, kDefaultValue_ParamK );
|
||||
SetParameter(kParam_L, kDefaultValue_ParamL );
|
||||
SetParameter(kParam_M, kDefaultValue_ParamM );
|
||||
SetParameter(kParam_N, kDefaultValue_ParamN );
|
||||
SetParameter(kParam_O, kDefaultValue_ParamO );
|
||||
SetParameter(kParam_P, kDefaultValue_ParamP );
|
||||
SetParameter(kParam_Q, kDefaultValue_ParamQ );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
|
|
@ -192,50 +186,6 @@ ComponentResult ConsoleX2Buss::GetParameterInfo(AudioUnitScope inScope,
|
|||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamK;
|
||||
break;
|
||||
case kParam_L:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterLName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamL;
|
||||
break;
|
||||
case kParam_M:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterMName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterMUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamM;
|
||||
break;
|
||||
case kParam_N:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterNName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamN;
|
||||
break;
|
||||
case kParam_O:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterOName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterOUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamO;
|
||||
break;
|
||||
case kParam_P:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterPName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamP;
|
||||
break;
|
||||
case kParam_Q:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterQName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamQ;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
|
|
@ -327,40 +277,22 @@ ComponentResult ConsoleX2Buss::Reset(AudioUnitScope inScope, AudioUnitElement i
|
|||
|
||||
for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;}
|
||||
bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0;
|
||||
bezCompS[bez_cycle] = 1.0; bezGate = 2.0;
|
||||
bezCompS[bez_cycle] = 1.0;
|
||||
//Dynamics2
|
||||
|
||||
for(int count = 0; count < 22; count++) {
|
||||
iirHPositionL[count] = 0.0;
|
||||
iirHAngleL[count] = 0.0;
|
||||
iirHPositionR[count] = 0.0;
|
||||
iirHAngleR[count] = 0.0;
|
||||
}
|
||||
hBypass = false;
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
for(int count = 0; count < 14; count++) {
|
||||
iirLPositionL[count] = 0.0;
|
||||
iirLAngleL[count] = 0.0;
|
||||
iirLPositionR[count] = 0.0;
|
||||
iirLAngleR[count] = 0.0;
|
||||
}
|
||||
lBypass = false;
|
||||
//Cabs2
|
||||
|
||||
for(int count = 0; count < dscBuf+2; count++) {
|
||||
dBaL[count] = 0.0;
|
||||
dBaR[count] = 0.0;
|
||||
}
|
||||
dBaPosL = 0.0;
|
||||
dBaPosR = 0.0;
|
||||
dBaXL = 1;
|
||||
dBaXR = 1;
|
||||
//Discontapeity
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
panA = 0.5; panB = 0.5;
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
return noErr;
|
||||
|
|
@ -382,6 +314,8 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (GetParameter( kParam_A )-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
|
|
@ -408,8 +342,8 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/GetSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -418,8 +352,8 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -428,99 +362,90 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_J ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_K ),12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(GetParameter( kParam_L ),4.0),sqrt(bezCThresh+1.0));
|
||||
double bezRez = pow(1.0-GetParameter( kParam_I ), 12.360679774997898) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_I ),10.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez,0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.00001),1.0);
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_M ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_N ),overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_O )*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (GetParameter( kParam_O )*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = GetParameter( kParam_P )*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_Q )*2.0;
|
||||
|
||||
panA = panB; panB = GetParameter( kParam_J )*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_K )*2.0;
|
||||
//Console
|
||||
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
double inputSampleL = *inputL;
|
||||
double inputSampleR = *inputR;
|
||||
|
|
@ -672,10 +597,7 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
//SmoothEQ2
|
||||
|
||||
if (fmax(fabs(inputSampleL),fabs(inputSampleR)) > gate+(sloRez*bezGate)) bezGate = ((bezGate*overallscale*3.0)+3.0)*(0.25/overallscale);
|
||||
else bezGate = fmax(0.0, bezGate-(sloRez*sloRez));
|
||||
|
||||
|
||||
if (bezCThresh > 0.0) {
|
||||
inputSampleL *= ((bezCThresh*0.5)+1.0);
|
||||
inputSampleR *= ((bezCThresh*0.5)+1.0);
|
||||
|
|
@ -688,21 +610,14 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
|
||||
if (bezCompF[bez_cycle] > 1.0) {
|
||||
bezCompF[bez_cycle] -= 1.0;
|
||||
|
||||
if (bezMaxF < gate) bezCompF[bez_SampL] = bezMaxF/gate; //note: SampL is a control voltage,
|
||||
if (bezCompF[bez_SampL]<gate) bezCompF[bez_SampL] = 0.0; //not a bipolar audio signal
|
||||
bezCompF[bez_CL] = bezCompF[bez_BL];
|
||||
bezCompF[bez_BL] = bezCompF[bez_AL];
|
||||
bezCompF[bez_AL] = bezCompF[bez_SampL];
|
||||
bezCompF[bez_SampL] = 0.0;
|
||||
|
||||
if (bezMaxF < gate) bezCompF[bez_SampR] = bezMaxF/gate; //note: SampR is a control voltage,
|
||||
if (bezCompF[bez_SampR]<gate) bezCompF[bez_SampR] = 0.0; //not a bipolar audio signal
|
||||
bezCompF[bez_CR] = bezCompF[bez_BR];
|
||||
bezCompF[bez_BR] = bezCompF[bez_AR];
|
||||
bezCompF[bez_AR] = bezCompF[bez_SampR];
|
||||
bezCompF[bez_SampR] = 0.0;
|
||||
|
||||
bezMaxF = 0.0;
|
||||
}
|
||||
bezCompS[bez_cycle] += sloRez;
|
||||
|
|
@ -710,14 +625,10 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage
|
||||
if (bezCompS[bez_cycle] > 1.0) {
|
||||
bezCompS[bez_cycle] -= 1.0;
|
||||
|
||||
if (bezCompS[bez_SampL]<gate) bezCompS[bez_SampL] = 0.0;
|
||||
bezCompS[bez_CL] = bezCompS[bez_BL];
|
||||
bezCompS[bez_BL] = bezCompS[bez_AL];
|
||||
bezCompS[bez_AL] = bezCompS[bez_SampL];
|
||||
bezCompS[bez_SampL] = 0.0;
|
||||
|
||||
if (bezCompS[bez_SampR]<gate) bezCompS[bez_SampR] = 0.0;
|
||||
bezCompS[bez_CR] = bezCompS[bez_BR];
|
||||
bezCompS[bez_BR] = bezCompS[bez_AR];
|
||||
bezCompS[bez_AR] = bezCompS[bez_SampR];
|
||||
|
|
@ -742,74 +653,61 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
if (bezGate < 1.0 && gate > 0.0) {inputSampleL *= bezGate; inputSampleR *= bezGate;}
|
||||
//Dynamics2
|
||||
|
||||
const double temp = (double)nSampleFrames/inFramesToProcess;
|
||||
const double hFreq = (hFreqA*temp)+(hFreqB*(1.0-temp));
|
||||
if (hFreq > 0.0) {
|
||||
double lowSampleL = inputSampleL;
|
||||
double lowSampleR = inputSampleR;
|
||||
for(int count = 0; count < 21; count++) {
|
||||
iirHAngleL[count] = (iirHAngleL[count]*(1.0-hFreq))+((lowSampleL-iirHPositionL[count])*hFreq);
|
||||
lowSampleL = ((iirHPositionL[count]+(iirHAngleL[count]*hFreq))*(1.0-hFreq))+(lowSampleL*hFreq);
|
||||
iirHPositionL[count] = ((iirHPositionL[count]+(iirHAngleL[count]*hFreq))*(1.0-hFreq))+(lowSampleL*hFreq);
|
||||
inputSampleL -= (lowSampleL * (1.0/21.0));//left
|
||||
iirHAngleR[count] = (iirHAngleR[count]*(1.0-hFreq))+((lowSampleR-iirHPositionR[count])*hFreq);
|
||||
lowSampleR = ((iirHPositionR[count]+(iirHAngleR[count]*hFreq))*(1.0-hFreq))+(lowSampleR*hFreq);
|
||||
iirHPositionR[count] = ((iirHPositionR[count]+(iirHAngleR[count]*hFreq))*(1.0-hFreq))+(lowSampleR*hFreq);
|
||||
inputSampleR -= (lowSampleR * (1.0/21.0));//right
|
||||
} //the highpass
|
||||
hBypass = false;
|
||||
} else {
|
||||
if (!hBypass) {
|
||||
hBypass = true;
|
||||
for(int count = 0; count < 22; count++) {
|
||||
iirHPositionL[count] = 0.0;
|
||||
iirHAngleL[count] = 0.0;
|
||||
iirHPositionR[count] = 0.0;
|
||||
iirHAngleR[count] = 0.0;
|
||||
}
|
||||
} //blank out highpass if jut switched off
|
||||
}
|
||||
const double lFreq = (lFreqA*temp)+(lFreqB*(1.0-temp));
|
||||
if (lFreq < 1.0) {
|
||||
for(int count = 0; count < 13; count++) {
|
||||
iirLAngleL[count] = (iirLAngleL[count]*(1.0-lFreq))+((inputSampleL-iirLPositionL[count])*lFreq);
|
||||
inputSampleL = ((iirLPositionL[count]+(iirLAngleL[count]*lFreq))*(1.0-lFreq))+(inputSampleL*lFreq);
|
||||
iirLPositionL[count] = ((iirLPositionL[count]+(iirLAngleL[count]*lFreq))*(1.0-lFreq))+(inputSampleL*lFreq);//left
|
||||
iirLAngleR[count] = (iirLAngleR[count]*(1.0-lFreq))+((inputSampleR-iirLPositionR[count])*lFreq);
|
||||
inputSampleR = ((iirLPositionR[count]+(iirLAngleR[count]*lFreq))*(1.0-lFreq))+(inputSampleR*lFreq);
|
||||
iirLPositionR[count] = ((iirLPositionR[count]+(iirLAngleR[count]*lFreq))*(1.0-lFreq))+(inputSampleR*lFreq);//right
|
||||
} //the lowpass
|
||||
lBypass = false;
|
||||
} else {
|
||||
if (!lBypass) {
|
||||
lBypass = true;
|
||||
for(int count = 0; count < 14; count++) {
|
||||
iirLPositionL[count] = 0.0;
|
||||
iirLAngleL[count] = 0.0;
|
||||
iirLPositionR[count] = 0.0;
|
||||
iirLAngleR[count] = 0.0;
|
||||
}
|
||||
} //blank out lowpass if just switched off
|
||||
}
|
||||
//Cabs2
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
|
|
@ -822,21 +720,11 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
inputSampleL *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
//begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
|
|
@ -849,21 +737,9 @@ OSStatus ConsoleX2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActio
|
|||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
inputSampleR *= 0.92;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
|
|
|
|||
|
|
@ -65,12 +65,6 @@ static const float kDefaultValue_ParamH = 0.5;
|
|||
static const float kDefaultValue_ParamI = 1.0;
|
||||
static const float kDefaultValue_ParamJ = 0.5;
|
||||
static const float kDefaultValue_ParamK = 0.5;
|
||||
static const float kDefaultValue_ParamL = 0.0;
|
||||
static const float kDefaultValue_ParamM = 1.0;
|
||||
static const float kDefaultValue_ParamN = 0.0;
|
||||
static const float kDefaultValue_ParamO = 0.0;
|
||||
static const float kDefaultValue_ParamP = 0.5;
|
||||
static const float kDefaultValue_ParamQ = 0.5;
|
||||
|
||||
static CFStringRef kParameterAUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterAName = CFSTR("High");
|
||||
|
|
@ -84,16 +78,8 @@ static CFStringRef kParameterGName = CFSTR("LMidF");
|
|||
static CFStringRef kParameterHName = CFSTR("BassF");
|
||||
static CFStringRef kParameterIUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterIName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterJName = CFSTR("Attack");
|
||||
static CFStringRef kParameterKName = CFSTR("Release");
|
||||
static CFStringRef kParameterLName = CFSTR("Gate");
|
||||
static CFStringRef kParameterMUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterMName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterNName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterOUnit = CFSTR("+");
|
||||
static CFStringRef kParameterOName = CFSTR("More");
|
||||
static CFStringRef kParameterPName = CFSTR("Pan");
|
||||
static CFStringRef kParameterQName = CFSTR("Fader");
|
||||
static CFStringRef kParameterJName = CFSTR("Pan");
|
||||
static CFStringRef kParameterKName = CFSTR("Fader");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
|
|
@ -107,18 +93,10 @@ enum {
|
|||
kParam_I =8,
|
||||
kParam_J =9,
|
||||
kParam_K =10,
|
||||
kParam_L =11,
|
||||
kParam_M =12,
|
||||
kParam_N =13,
|
||||
kParam_O =14,
|
||||
kParam_P =15,
|
||||
kParam_Q =16,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=17
|
||||
kNumberOfParameters=11
|
||||
};
|
||||
|
||||
const int dscBuf = 256;
|
||||
|
||||
#pragma mark ____ConsoleX2Buss
|
||||
class ConsoleX2Buss : public AUEffectBase
|
||||
{
|
||||
|
|
@ -216,32 +194,24 @@ public:
|
|||
double bezCompF[bez_total];
|
||||
double bezMaxF;
|
||||
double bezCompS[bez_total];
|
||||
double bezGate;
|
||||
//Dynamics2
|
||||
|
||||
double iirHPositionL[23];
|
||||
double iirHAngleL[23];
|
||||
double iirHPositionR[23];
|
||||
double iirHAngleR[23];
|
||||
bool hBypass;
|
||||
double iirLPositionL[15];
|
||||
double iirLAngleL[15];
|
||||
double iirLPositionR[15];
|
||||
double iirLAngleR[15];
|
||||
bool lBypass;
|
||||
double lFreqA;
|
||||
double lFreqB; //the lowpass
|
||||
double hFreqA;
|
||||
double hFreqB; //the highpass
|
||||
//Cabs2
|
||||
|
||||
double dBaL[dscBuf+5];
|
||||
double dBaPosL;
|
||||
int dBaXL;
|
||||
double dBaR[dscBuf+5];
|
||||
double dBaPosR;
|
||||
int dBaXR;
|
||||
//Discontapeity
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double panA;
|
||||
double panB;
|
||||
|
|
|
|||
|
|
@ -51,20 +51,19 @@
|
|||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 781899426;
|
||||
PBXWorkspaceStateSaveDate = 781899426;
|
||||
PBXPerProjectTemplateStateSaveDate = 783619597;
|
||||
PBXWorkspaceStateSaveDate = 783619597;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B962AAA2E9AD07A000EAC04 /* PBXTextBookmark */ = 8B962AAA2E9AD07A000EAC04 /* PBXTextBookmark */;
|
||||
8B962ADC2E9AD297000EAC04 /* PBXTextBookmark */ = 8B962ADC2E9AD297000EAC04 /* PBXTextBookmark */;
|
||||
8B962B2D2E9AD3DA000EAC04 /* PBXTextBookmark */ = 8B962B2D2E9AD3DA000EAC04 /* PBXTextBookmark */;
|
||||
8B962BA12E9AD778000EAC04 /* PBXTextBookmark */ = 8B962BA12E9AD778000EAC04 /* PBXTextBookmark */;
|
||||
8B5C9E332EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E332EB51644008B9860 /* PBXTextBookmark */;
|
||||
8B5C9E342EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E342EB51644008B9860 /* PBXTextBookmark */;
|
||||
8B5C9E352EB51644008B9860 /* PBXTextBookmark */ = 8B5C9E352EB51644008B9860 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B962AAA2E9AD07A000EAC04 /* PBXTextBookmark */ = {
|
||||
8B5C9E332EB51644008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A690720730100365D66 /* ConsoleX2BussVersion.h */;
|
||||
name = "ConsoleX2BussVersion.h: 1";
|
||||
|
|
@ -74,42 +73,32 @@
|
|||
vrLen = 258;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8B962ADC2E9AD297000EAC04 /* PBXTextBookmark */ = {
|
||||
8B5C9E342EB51644008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */;
|
||||
name = "ConsoleX2Buss.cpp: 516";
|
||||
rLen = 0;
|
||||
rLoc = 22774;
|
||||
name = "ConsoleX2Buss.cpp: 317";
|
||||
rLen = 20897;
|
||||
rLoc = 14098;
|
||||
rType = 0;
|
||||
vrLen = 148;
|
||||
vrLoc = 22439;
|
||||
vrLen = 285;
|
||||
vrLoc = 14098;
|
||||
};
|
||||
8B962B2D2E9AD3DA000EAC04 /* PBXTextBookmark */ = {
|
||||
8B5C9E352EB51644008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Buss.h */;
|
||||
name = "ConsoleX2Buss.h: 97";
|
||||
rLen = 0;
|
||||
rLoc = 4804;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */;
|
||||
name = "ConsoleX2Buss.cpp: 317";
|
||||
rLen = 20897;
|
||||
rLoc = 14098;
|
||||
rType = 0;
|
||||
vrLen = 112;
|
||||
vrLoc = 4700;
|
||||
};
|
||||
8B962BA12E9AD778000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Buss.h */;
|
||||
name = "ConsoleX2Buss.h: 97";
|
||||
rLen = 0;
|
||||
rLoc = 4804;
|
||||
rType = 0;
|
||||
vrLen = 61;
|
||||
vrLoc = 4751;
|
||||
vrLen = 285;
|
||||
vrLoc = 14098;
|
||||
};
|
||||
8BA05A660720730100365D66 /* ConsoleX2Buss.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1308, 15822}}";
|
||||
sepNavSelRange = "{39367, 15}";
|
||||
sepNavVisRange = "{38789, 1325}";
|
||||
sepNavWindowFrame = "{{-6, 75}, {1066, 786}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1056, 13716}}";
|
||||
sepNavSelRange = "{14098, 20897}";
|
||||
sepNavVisRange = "{14098, 285}";
|
||||
sepNavWindowFrame = "{{5, 38}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* ConsoleX2BussVersion.h */ = {
|
||||
|
|
@ -129,10 +118,10 @@
|
|||
};
|
||||
8BC6025B073B072D006C4272 /* ConsoleX2Buss.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {554, 4608}}";
|
||||
sepNavSelRange = "{4804, 0}";
|
||||
sepNavVisRange = "{4751, 61}";
|
||||
sepNavWindowFrame = "{{374, 68}, {1066, 786}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1146, 4086}}";
|
||||
sepNavSelRange = "{6056, 1375}";
|
||||
sepNavVisRange = "{4948, 1224}";
|
||||
sepNavWindowFrame = "{{10, 38}, {838, 820}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@
|
|||
<real>185</real>
|
||||
</array>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>13 282 810 487 0 0 1440 878 </string>
|
||||
<string>5 284 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXSmartGroupTreeModule</string>
|
||||
|
|
@ -340,7 +340,7 @@
|
|||
<key>PBXProjectModuleGUID</key>
|
||||
<string>8BD95EC52E957B6B00D77499</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ConsoleX2Buss.h</string>
|
||||
<string>ConsoleX2Buss.cpp</string>
|
||||
<key>PBXSplitModuleInNavigatorKey</key>
|
||||
<dict>
|
||||
<key>Split0</key>
|
||||
|
|
@ -348,16 +348,15 @@
|
|||
<key>PBXProjectModuleGUID</key>
|
||||
<string>8BD95EC62E957B6B00D77499</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ConsoleX2Buss.h</string>
|
||||
<string>ConsoleX2Buss.cpp</string>
|
||||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>8B962BA12E9AD778000EAC04</string>
|
||||
<string>8B5C9E352EB51644008B9860</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>8B962AAA2E9AD07A000EAC04</string>
|
||||
<string>8B962ADC2E9AD297000EAC04</string>
|
||||
<string>8B962B2D2E9AD3DA000EAC04</string>
|
||||
<string>8B5C9E332EB51644008B9860</string>
|
||||
<string>8B5C9E342EB51644008B9860</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
|
|
@ -371,18 +370,18 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {603, 86}}</string>
|
||||
<string>{{0, 0}, {603, 132}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>13 282 810 487 0 0 1440 878 </string>
|
||||
<string>5 284 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
<key>Proportion</key>
|
||||
<string>86pt</string>
|
||||
<string>132pt</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Proportion</key>
|
||||
<string>355pt</string>
|
||||
<string>309pt</string>
|
||||
<key>Tabs</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
@ -396,9 +395,9 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {603, 328}}</string>
|
||||
<string>{{10, 27}, {603, 282}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>13 282 810 487 0 0 1440 878 </string>
|
||||
<string>5 284 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>XCDetailModule</string>
|
||||
|
|
@ -452,7 +451,7 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {603, 414}}</string>
|
||||
<string>{{10, 27}, {603, 401}}</string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXBuildResultsModule</string>
|
||||
|
|
@ -480,11 +479,11 @@
|
|||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>8B962B7F2E9AD6A6000EAC04</string>
|
||||
<string>8B5C9E362EB51644008B9860</string>
|
||||
<string>1CA23ED40692098700951B8B</string>
|
||||
<string>8B962B802E9AD6A6000EAC04</string>
|
||||
<string>8B5C9E372EB51644008B9860</string>
|
||||
<string>8BD95EC52E957B6B00D77499</string>
|
||||
<string>8B962B812E9AD6A6000EAC04</string>
|
||||
<string>8B5C9E382EB51644008B9860</string>
|
||||
<string>1CA23EDF0692099D00951B8B</string>
|
||||
<string>1CA23EE00692099D00951B8B</string>
|
||||
<string>1CA23EE10692099D00951B8B</string>
|
||||
|
|
@ -657,7 +656,7 @@
|
|||
<key>StatusbarIsVisible</key>
|
||||
<true/>
|
||||
<key>TimeStamp</key>
|
||||
<real>781899640.115731</real>
|
||||
<real>783619652.93727398</real>
|
||||
<key>ToolbarConfigUserDefaultsMinorVersion</key>
|
||||
<string>2</string>
|
||||
<key>ToolbarDisplayMode</key>
|
||||
|
|
@ -674,10 +673,11 @@
|
|||
<integer>5</integer>
|
||||
<key>WindowOrderList</key>
|
||||
<array>
|
||||
<string>8B5C9E392EB51644008B9860</string>
|
||||
<string>/Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Buss/ConsoleX2Buss.xcodeproj</string>
|
||||
</array>
|
||||
<key>WindowString</key>
|
||||
<string>13 282 810 487 0 0 1440 878 </string>
|
||||
<string>5 284 810 487 0 0 1440 878 </string>
|
||||
<key>WindowToolsV3</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -76,6 +76,7 @@ ConsoleX2Channel::ConsoleX2Channel(AudioUnit component)
|
|||
SetParameter(kParam_O, kDefaultValue_ParamO );
|
||||
SetParameter(kParam_P, kDefaultValue_ParamP );
|
||||
SetParameter(kParam_Q, kDefaultValue_ParamQ );
|
||||
SetParameter(kParam_R, kDefaultValue_ParamR );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
|
|
@ -114,10 +115,9 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
{
|
||||
case kParam_A:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterAName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterAUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Indexed;
|
||||
outParameterInfo.minValue = 0;
|
||||
outParameterInfo.maxValue = 4;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamA;
|
||||
break;
|
||||
case kParam_B:
|
||||
|
|
@ -129,7 +129,8 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_C:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterCName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterCUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamC;
|
||||
|
|
@ -143,8 +144,7 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_E:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterEUnit;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamE;
|
||||
|
|
@ -158,7 +158,8 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_G:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterGName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterGUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamG;
|
||||
|
|
@ -172,8 +173,7 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_I:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterIName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterIUnit;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamI;
|
||||
|
|
@ -187,7 +187,8 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_K:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterKName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterKUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamK;
|
||||
|
|
@ -201,9 +202,8 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_M:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterMName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterMUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamM;
|
||||
break;
|
||||
|
|
@ -236,7 +236,14 @@ ComponentResult ConsoleX2Channel::GetParameterInfo(AudioUnitScope inScope,
|
|||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamQ;
|
||||
break;
|
||||
default:
|
||||
case kParam_R:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterRName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamR;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
|
|
@ -356,7 +363,17 @@ ComponentResult ConsoleX2Channel::Reset(AudioUnitScope inScope, AudioUnitElemen
|
|||
dBaXL = 1;
|
||||
dBaXR = 1;
|
||||
//Discontapeity
|
||||
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
panA = 0.5; panB = 0.5;
|
||||
|
|
@ -383,20 +400,33 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double moreTapeHack = (GetParameter( kParam_B )*2.0)+1.0;
|
||||
switch ((int)GetParameter( kParam_A )){
|
||||
case 0: moreTapeHack *= 0.5; break;
|
||||
case 1: break;
|
||||
case 2: moreTapeHack *= 2.0; break;
|
||||
case 3: moreTapeHack *= 4.0; break;
|
||||
case 4: moreTapeHack *= 8.0; break;
|
||||
}
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_B )*0.42,3.0)*overallscale,0.00001);
|
||||
//Discontapeity
|
||||
|
||||
double trebleGain = (GetParameter( kParam_A )-0.5)*2.0;
|
||||
double trebleGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (GetParameter( kParam_B )-0.5)*2.0;
|
||||
double highmidGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
double lowmidGain = (GetParameter( kParam_E )-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
double bassGain = (GetParameter( kParam_F )-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = GetParameter( kParam_E )-0.5;
|
||||
double highmidRef = GetParameter( kParam_F )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_G )-0.5;
|
||||
double bassRef = GetParameter( kParam_H )-0.5;
|
||||
double trebleRef = GetParameter( kParam_G )-0.5;
|
||||
double highmidRef = GetParameter( kParam_H )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_I )-0.5;
|
||||
double bassRef = GetParameter( kParam_J )-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
|
@ -409,8 +439,8 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/GetSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -419,8 +449,8 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -429,97 +459,93 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_J ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_K ),12.0) / overallscale;
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_K ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_L ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_M ),12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(GetParameter( kParam_L ),4.0),sqrt(bezCThresh+1.0));
|
||||
double gate = pow(pow(GetParameter( kParam_N ),4.0),sqrt(bezCThresh+1.0));
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_M ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_N ),overallscale+2.0); //the highpass
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_O ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_P ),overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_O )*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (GetParameter( kParam_O )*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
panA = panB; panB = GetParameter( kParam_P )*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_Q )*2.0;
|
||||
|
||||
panA = panB; panB = GetParameter( kParam_Q )*1.57079633;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_R )*2.0;
|
||||
//Console
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
|
|
@ -528,6 +554,99 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreTapeHack;
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreTapeHack;
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
|
|
@ -787,62 +906,7 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
} //blank out lowpass if just switched off
|
||||
}
|
||||
//Cabs2
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleR *= moreDiscontinuity;
|
||||
dBaR[dBaXR] = inputSampleR; dBaPosR *= 0.5; dBaPosR += fabs((inputSampleR*((inputSampleR*0.25)-0.5))*0.5);
|
||||
dBaPosR = fmin(dBaPosR,1.0);
|
||||
dBdly = floor(dBaPosR*dscBuf);
|
||||
dBi = (dBaPosR*dscBuf)-dBdly;
|
||||
inputSampleR = dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleR += dBaR[dBaXR-dBdly +((dBaXR-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXR++; if (dBaXR < 0 || dBaXR >= dscBuf) dBaXR = 0;
|
||||
inputSampleR /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
|
||||
double gainR = (panA*temp)+(panB*(1.0-temp));
|
||||
double gainL = 1.57079633-gainR;
|
||||
gainR = sin(gainR); gainL = sin(gainL);
|
||||
|
|
@ -850,19 +914,16 @@ OSStatus ConsoleX2Channel::ProcessBufferLists(AudioUnitRenderActionFlags & ioAc
|
|||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 0.763932022500211;
|
||||
|
||||
inputSampleL = inputSampleL * gainL * gain;
|
||||
inputSampleR = inputSampleR * gainR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
inputSampleL *= 0.618033988749895;
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
else if (inputSampleL > 0.0) inputSampleL = -expm1((log1p(-inputSampleL) * 1.618033988749895));
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
else if (inputSampleL < 0.0) inputSampleL = expm1((log1p(inputSampleL) * 1.618033988749895));
|
||||
|
||||
inputSampleR *= 0.618033988749895;
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
else if (inputSampleR > 0.0) inputSampleR = -expm1((log1p(-inputSampleR) * 1.618033988749895));
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
|
|
|
|||
|
|
@ -54,46 +54,47 @@
|
|||
#pragma mark ____ConsoleX2Channel Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamA = 0.5;
|
||||
static const float kDefaultValue_ParamB = 0.5;
|
||||
static const int kDefaultValue_ParamA = 1;
|
||||
static const float kDefaultValue_ParamB = 0.0;
|
||||
static const float kDefaultValue_ParamC = 0.5;
|
||||
static const float kDefaultValue_ParamD = 0.5;
|
||||
static const float kDefaultValue_ParamE = 0.5;
|
||||
static const float kDefaultValue_ParamF = 0.5;
|
||||
static const float kDefaultValue_ParamG = 0.5;
|
||||
static const float kDefaultValue_ParamH = 0.5;
|
||||
static const float kDefaultValue_ParamI = 1.0;
|
||||
static const float kDefaultValue_ParamI = 0.5;
|
||||
static const float kDefaultValue_ParamJ = 0.5;
|
||||
static const float kDefaultValue_ParamK = 0.5;
|
||||
static const float kDefaultValue_ParamL = 0.0;
|
||||
static const float kDefaultValue_ParamM = 1.0;
|
||||
static const float kDefaultValue_ParamK = 1.0;
|
||||
static const float kDefaultValue_ParamL = 0.5;
|
||||
static const float kDefaultValue_ParamM = 0.5;
|
||||
static const float kDefaultValue_ParamN = 0.0;
|
||||
static const float kDefaultValue_ParamO = 0.0;
|
||||
static const float kDefaultValue_ParamP = 0.5;
|
||||
static const float kDefaultValue_ParamO = 1.0;
|
||||
static const float kDefaultValue_ParamP = 0.0;
|
||||
static const float kDefaultValue_ParamQ = 0.5;
|
||||
static const float kDefaultValue_ParamR = 0.5;
|
||||
|
||||
static CFStringRef kParameterAUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterAName = CFSTR("High");
|
||||
static CFStringRef kParameterBName = CFSTR("HMid");
|
||||
static CFStringRef kParameterCName = CFSTR("LMid");
|
||||
static CFStringRef kParameterDName = CFSTR("Bass");
|
||||
static CFStringRef kParameterEUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterEName = CFSTR("HighF");
|
||||
static CFStringRef kParameterFName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterGName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterHName = CFSTR("BassF");
|
||||
static CFStringRef kParameterIUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterIName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterJName = CFSTR("Attack");
|
||||
static CFStringRef kParameterKName = CFSTR("Release");
|
||||
static CFStringRef kParameterLName = CFSTR("Gate");
|
||||
static CFStringRef kParameterMUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterMName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterNName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterOUnit = CFSTR("+");
|
||||
static CFStringRef kParameterOName = CFSTR("More");
|
||||
static CFStringRef kParameterPName = CFSTR("Pan");
|
||||
static CFStringRef kParameterQName = CFSTR("Fader");
|
||||
static CFStringRef kParameterAName = CFSTR("Trim");
|
||||
static CFStringRef kParameterBName = CFSTR("More");
|
||||
static CFStringRef kParameterCUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterCName = CFSTR("High");
|
||||
static CFStringRef kParameterDName = CFSTR("HMid");
|
||||
static CFStringRef kParameterEName = CFSTR("LMid");
|
||||
static CFStringRef kParameterFName = CFSTR("Bass");
|
||||
static CFStringRef kParameterGUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterGName = CFSTR("HighF");
|
||||
static CFStringRef kParameterHName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterIName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterJName = CFSTR("BassF");
|
||||
static CFStringRef kParameterKUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterKName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterLName = CFSTR("Attack");
|
||||
static CFStringRef kParameterMName = CFSTR("Release");
|
||||
static CFStringRef kParameterNName = CFSTR("Gate");
|
||||
static CFStringRef kParameterOUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterOName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterPName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterQName = CFSTR("Pan");
|
||||
static CFStringRef kParameterRName = CFSTR("Fader");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
|
|
@ -113,8 +114,9 @@ enum {
|
|||
kParam_O =14,
|
||||
kParam_P =15,
|
||||
kParam_Q =16,
|
||||
kParam_R =17,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=17
|
||||
kNumberOfParameters=18
|
||||
};
|
||||
|
||||
const int dscBuf = 256;
|
||||
|
|
@ -243,6 +245,23 @@ public:
|
|||
int dBaXR;
|
||||
//Discontapeity
|
||||
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double panA;
|
||||
double panB;
|
||||
double inTrimA;
|
||||
|
|
|
|||
|
|
@ -51,19 +51,39 @@
|
|||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 781897277;
|
||||
PBXWorkspaceStateSaveDate = 781897277;
|
||||
PBXPerProjectTemplateStateSaveDate = 783603960;
|
||||
PBXWorkspaceStateSaveDate = 783603960;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B692BE12EB4E21700F51381 /* PBXTextBookmark */ = 8B692BE12EB4E21700F51381 /* PBXTextBookmark */;
|
||||
8B692BE22EB4E21700F51381 /* PBXTextBookmark */ = 8B692BE22EB4E21700F51381 /* PBXTextBookmark */;
|
||||
8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */ = 8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */;
|
||||
8B9629DA2E9AC7DA000EAC04 /* PBXTextBookmark */ = 8B9629DA2E9AC7DA000EAC04 /* PBXTextBookmark */;
|
||||
8B962AF92E9AD2D8000EAC04 /* PBXTextBookmark */ = 8B962AF92E9AD2D8000EAC04 /* PBXTextBookmark */;
|
||||
8B962AFA2E9AD2D8000EAC04 /* PBXTextBookmark */ = 8B962AFA2E9AD2D8000EAC04 /* PBXTextBookmark */;
|
||||
8BAA80A32EA691D900A83054 /* PBXTextBookmark */ = 8BAA80A32EA691D900A83054 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B692BE12EB4E21700F51381 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */;
|
||||
name = "ConsoleX2Channel.cpp: 377";
|
||||
rLen = 0;
|
||||
rLoc = 16627;
|
||||
rType = 0;
|
||||
vrLen = 22;
|
||||
vrLoc = 54;
|
||||
};
|
||||
8B692BE22EB4E21700F51381 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */;
|
||||
name = "ConsoleX2Channel.cpp: 377";
|
||||
rLen = 0;
|
||||
rLoc = 16627;
|
||||
rType = 0;
|
||||
vrLen = 22;
|
||||
vrLoc = 54;
|
||||
};
|
||||
8B9629D92E9AC7DA000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A690720730100365D66 /* ConsoleX2ChannelVersion.h */;
|
||||
|
|
@ -74,42 +94,20 @@
|
|||
vrLen = 258;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8B9629DA2E9AC7DA000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */;
|
||||
name = "ConsoleX2Channel.h: 230";
|
||||
rLen = 0;
|
||||
rLoc = 8099;
|
||||
rType = 0;
|
||||
vrLen = 141;
|
||||
vrLoc = 7736;
|
||||
};
|
||||
8B962AF92E9AD2D8000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */;
|
||||
name = "ConsoleX2Channel.cpp: 355";
|
||||
rLen = 0;
|
||||
rLoc = 15850;
|
||||
rType = 0;
|
||||
vrLen = 103;
|
||||
vrLoc = 15621;
|
||||
};
|
||||
8B962AFA2E9AD2D8000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */;
|
||||
name = "ConsoleX2Channel.h: 235";
|
||||
rLen = 0;
|
||||
rLoc = 8099;
|
||||
rType = 0;
|
||||
vrLen = 105;
|
||||
vrLoc = 7686;
|
||||
};
|
||||
8BA05A660720730100365D66 /* ConsoleX2Channel.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1019, 15912}}";
|
||||
sepNavSelRange = "{10994, 0}";
|
||||
sepNavVisRange = "{10196, 2001}";
|
||||
sepNavWindowFrame = "{{22, 92}, {1066, 786}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {696, 17226}}";
|
||||
sepNavSelRange = "{16627, 0}";
|
||||
sepNavVisRange = "{54, 22}";
|
||||
sepNavWindowFrame = "{{6, 88}, {931, 746}}";
|
||||
};
|
||||
};
|
||||
8BA05A670720730100365D66 /* ConsoleX2Channel.exp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {609, 616}}";
|
||||
sepNavSelRange = "{0, 23}";
|
||||
sepNavVisRange = "{0, 23}";
|
||||
sepNavWindowFrame = "{{15, 129}, {656, 744}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* ConsoleX2ChannelVersion.h */ = {
|
||||
|
|
@ -127,12 +125,22 @@
|
|||
sepNavVisRange = "{0, 1336}";
|
||||
};
|
||||
};
|
||||
8BAA80A32EA691D900A83054 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */;
|
||||
name = "ConsoleX2Channel.h: 235";
|
||||
rLen = 0;
|
||||
rLoc = 8160;
|
||||
rType = 0;
|
||||
vrLen = 76;
|
||||
vrLoc = 7715;
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* ConsoleX2Channel.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {705, 4968}}";
|
||||
sepNavSelRange = "{8099, 0}";
|
||||
sepNavVisRange = "{7686, 105}";
|
||||
sepNavWindowFrame = "{{8, 39}, {656, 839}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1146, 5058}}";
|
||||
sepNavSelRange = "{8317, 299}";
|
||||
sepNavVisRange = "{3331, 1640}";
|
||||
sepNavWindowFrame = "{{2, 39}, {656, 839}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
|
|
|
|||
|
|
@ -324,7 +324,7 @@
|
|||
<real>185</real>
|
||||
</array>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>37 201 810 487 0 0 1440 878 </string>
|
||||
<string>9 258 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXSmartGroupTreeModule</string>
|
||||
|
|
@ -340,7 +340,7 @@
|
|||
<key>PBXProjectModuleGUID</key>
|
||||
<string>8BD95EA72E957B1200D77499</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ConsoleX2Channel.h</string>
|
||||
<string>ConsoleX2Channel.cpp</string>
|
||||
<key>PBXSplitModuleInNavigatorKey</key>
|
||||
<dict>
|
||||
<key>Split0</key>
|
||||
|
|
@ -348,16 +348,16 @@
|
|||
<key>PBXProjectModuleGUID</key>
|
||||
<string>8BD95EA82E957B1200D77499</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ConsoleX2Channel.h</string>
|
||||
<string>ConsoleX2Channel.cpp</string>
|
||||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>8B962AFA2E9AD2D8000EAC04</string>
|
||||
<string>8B692BE22EB4E21700F51381</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>8B9629D92E9AC7DA000EAC04</string>
|
||||
<string>8B962AF92E9AD2D8000EAC04</string>
|
||||
<string>8B9629DA2E9AC7DA000EAC04</string>
|
||||
<string>8BAA80A32EA691D900A83054</string>
|
||||
<string>8B692BE12EB4E21700F51381</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
|
|
@ -371,18 +371,18 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {603, 117}}</string>
|
||||
<string>{{0, 0}, {603, 51}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>37 201 810 487 0 0 1440 878 </string>
|
||||
<string>9 258 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
<key>Proportion</key>
|
||||
<string>117pt</string>
|
||||
<string>51pt</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Proportion</key>
|
||||
<string>324pt</string>
|
||||
<string>390pt</string>
|
||||
<key>Tabs</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
@ -396,9 +396,9 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {603, 297}}</string>
|
||||
<string>{{10, 27}, {603, 363}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>37 201 810 487 0 0 1440 878 </string>
|
||||
<string>9 258 810 487 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>XCDetailModule</string>
|
||||
|
|
@ -452,7 +452,7 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {603, 414}}</string>
|
||||
<string>{{10, 27}, {603, 345}}</string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXBuildResultsModule</string>
|
||||
|
|
@ -480,11 +480,11 @@
|
|||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>8B962AFB2E9AD2D8000EAC04</string>
|
||||
<string>8B692BE32EB4E21700F51381</string>
|
||||
<string>1CA23ED40692098700951B8B</string>
|
||||
<string>8B962AFC2E9AD2D8000EAC04</string>
|
||||
<string>8B692BE42EB4E21700F51381</string>
|
||||
<string>8BD95EA72E957B1200D77499</string>
|
||||
<string>8B962AFD2E9AD2D8000EAC04</string>
|
||||
<string>8B692BE52EB4E21700F51381</string>
|
||||
<string>1CA23EDF0692099D00951B8B</string>
|
||||
<string>1CA23EE00692099D00951B8B</string>
|
||||
<string>1CA23EE10692099D00951B8B</string>
|
||||
|
|
@ -657,7 +657,7 @@
|
|||
<key>StatusbarIsVisible</key>
|
||||
<true/>
|
||||
<key>TimeStamp</key>
|
||||
<real>781898456.47562802</real>
|
||||
<real>783606295.64856899</real>
|
||||
<key>ToolbarConfigUserDefaultsMinorVersion</key>
|
||||
<string>2</string>
|
||||
<key>ToolbarDisplayMode</key>
|
||||
|
|
@ -674,11 +674,10 @@
|
|||
<integer>5</integer>
|
||||
<key>WindowOrderList</key>
|
||||
<array>
|
||||
<string>8B962AFE2E9AD2D8000EAC04</string>
|
||||
<string>/Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Channel/ConsoleX2Channel.xcodeproj</string>
|
||||
</array>
|
||||
<key>WindowString</key>
|
||||
<string>37 201 810 487 0 0 1440 878 </string>
|
||||
<string>9 258 810 487 0 0 1440 878 </string>
|
||||
<key>WindowToolsV3</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -75,6 +75,7 @@ ConsoleX2Pre::ConsoleX2Pre(AudioUnit component)
|
|||
SetParameter(kParam_N, kDefaultValue_ParamN );
|
||||
SetParameter(kParam_O, kDefaultValue_ParamO );
|
||||
SetParameter(kParam_P, kDefaultValue_ParamP );
|
||||
SetParameter(kParam_Q, kDefaultValue_ParamQ );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
|
|
@ -113,10 +114,9 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
{
|
||||
case kParam_A:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterAName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterAUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Indexed;
|
||||
outParameterInfo.minValue = 0;
|
||||
outParameterInfo.maxValue = 4;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamA;
|
||||
break;
|
||||
case kParam_B:
|
||||
|
|
@ -128,7 +128,8 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_C:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterCName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterCUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamC;
|
||||
|
|
@ -142,8 +143,7 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_E:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterEUnit;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamE;
|
||||
|
|
@ -157,7 +157,8 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_G:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterGName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterGUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamG;
|
||||
|
|
@ -171,8 +172,7 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_I:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterIName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterIUnit;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamI;
|
||||
|
|
@ -186,7 +186,8 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_K:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterKName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterKUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamK;
|
||||
|
|
@ -200,9 +201,8 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
break;
|
||||
case kParam_M:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterMName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterMUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamM;
|
||||
break;
|
||||
|
|
@ -228,7 +228,14 @@ ComponentResult ConsoleX2Pre::GetParameterInfo(AudioUnitScope inScope,
|
|||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamP;
|
||||
break;
|
||||
default:
|
||||
case kParam_Q:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterQName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamQ;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
|
|
@ -324,9 +331,20 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Reset()
|
|||
dBaXL = 1;
|
||||
//Discontapeity
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0;
|
||||
lastSlewpleL = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
lFreqA = 1.0; lFreqB = 1.0;
|
||||
hFreqA = 0.0; hFreqB = 0.0;
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
fpd = 1.0; while (fpd < 16386) fpd = rand()*UINT32_MAX;
|
||||
}
|
||||
|
||||
|
|
@ -345,20 +363,33 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
|
||||
double trebleGain = (GetParameter( kParam_A )-0.5)*2.0;
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double moreTapeHack = (GetParameter( kParam_B )*2.0)+1.0;
|
||||
switch ((int)GetParameter( kParam_A )){
|
||||
case 0: moreTapeHack *= 0.5; break;
|
||||
case 1: break;
|
||||
case 2: moreTapeHack *= 2.0; break;
|
||||
case 3: moreTapeHack *= 4.0; break;
|
||||
case 4: moreTapeHack *= 8.0; break;
|
||||
}
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_B )*0.42,3.0)*overallscale,0.00001);
|
||||
//Discontapeity
|
||||
|
||||
double trebleGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (GetParameter( kParam_B )-0.5)*2.0;
|
||||
double highmidGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
double lowmidGain = (GetParameter( kParam_E )-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
double bassGain = (GetParameter( kParam_F )-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = GetParameter( kParam_E )-0.5;
|
||||
double highmidRef = GetParameter( kParam_F )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_G )-0.5;
|
||||
double bassRef = GetParameter( kParam_H )-0.5;
|
||||
double trebleRef = GetParameter( kParam_G )-0.5;
|
||||
double highmidRef = GetParameter( kParam_H )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_I )-0.5;
|
||||
double bassRef = GetParameter( kParam_J )-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
|
@ -371,8 +402,8 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/GetSampleRate());
|
||||
double K = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((K*K)-1.0)+K;
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
|
@ -381,8 +412,8 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
|
@ -391,102 +422,158 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/GetSampleRate());
|
||||
K = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((K*K)-1.0)+K;
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
K = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + K / highA[biq_reso] + K * K);
|
||||
highA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - K / highA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highB[biq_reso] + K * K);
|
||||
highB[biq_a0] = K * K * norm;
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - K / highB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / highC[biq_reso] + K * K);
|
||||
highC[biq_a0] = K * K * norm;
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - K / highC[biq_reso] + K * K) * norm;
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midA[biq_reso] + K * K);
|
||||
midA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - K / midA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midB[biq_reso] + K * K);
|
||||
midB[biq_a0] = K * K * norm;
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - K / midB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / midC[biq_reso] + K * K);
|
||||
midC[biq_a0] = K * K * norm;
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - K / midC[biq_reso] + K * K) * norm;
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
K = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowA[biq_reso] + K * K);
|
||||
lowA[biq_a0] = K * K * norm;
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - K / lowA[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowB[biq_reso] + K * K);
|
||||
lowB[biq_a0] = K * K * norm;
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - K / lowB[biq_reso] + K * K) * norm;
|
||||
K = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + K / lowC[biq_reso] + K * K);
|
||||
lowC[biq_a0] = K * K * norm;
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (K * K - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - K / lowC[biq_reso] + K * K) * norm;
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_J ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_K ),12.0) / overallscale;
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_K ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_L ), 8.0) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_M ),12.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez-(bezRez*0.5),0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.0001),1.0);
|
||||
double gate = pow(pow(GetParameter( kParam_L ),4.0),sqrt(bezCThresh+1.0));
|
||||
double gate = pow(pow(GetParameter( kParam_N ),4.0),sqrt(bezCThresh+1.0));
|
||||
//Dynamics2
|
||||
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_M ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_N ),overallscale+2.0); //the highpass
|
||||
lFreqA = lFreqB; lFreqB = pow(fmax(GetParameter( kParam_O ),0.002),overallscale); //the lowpass
|
||||
hFreqA = hFreqB; hFreqB = pow(GetParameter( kParam_P ),overallscale+2.0); //the highpass
|
||||
//Cabs2
|
||||
|
||||
double moreDiscontinuity = fmax(pow(GetParameter( kParam_O )*0.42,3.0)*overallscale,0.00001);
|
||||
double moreTapeHack = (GetParameter( kParam_O )*1.4152481)+1.2;
|
||||
//Discontapeity
|
||||
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_P )*2.0;
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_Q )*2.0;
|
||||
//Console
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
double inputSampleL = *sourceP;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpd * 1.18e-17;
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x];}
|
||||
darkSampleL /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x];}
|
||||
darkSampleL /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x];}
|
||||
darkSampleL /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x];}
|
||||
darkSampleL /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL;
|
||||
darkSampleL = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x];}
|
||||
darkSampleL /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreTapeHack;
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
//end TapeHack section
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
|
|
@ -592,7 +679,6 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
|
||||
double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5;
|
||||
|
||||
if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
if (bezGate < 1.0 && gate > 0.0) inputSampleL *= bezGate;
|
||||
|
|
@ -637,40 +723,12 @@ void ConsoleX2Pre::ConsoleX2PreKernel::Process( const Float32 *inSourceP,
|
|||
}
|
||||
//Cabs2
|
||||
|
||||
//begin Discontinuity section
|
||||
inputSampleL *= moreDiscontinuity;
|
||||
dBaL[dBaXL] = inputSampleL; dBaPosL *= 0.5; dBaPosL += fabs((inputSampleL*((inputSampleL*0.25)-0.5))*0.5);
|
||||
dBaPosL = fmin(dBaPosL,1.0);
|
||||
int dBdly = floor(dBaPosL*dscBuf);
|
||||
double dBi = (dBaPosL*dscBuf)-dBdly;
|
||||
inputSampleL = dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*(1.0-dBi);
|
||||
dBdly++; inputSampleL += dBaL[dBaXL-dBdly +((dBaXL-dBdly < 0)?dscBuf:0)]*dBi;
|
||||
dBaXL++; if (dBaXL < 0 || dBaXL >= dscBuf) dBaXL = 0;
|
||||
inputSampleL /= moreDiscontinuity;
|
||||
//end Discontinuity section, begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL*moreTapeHack,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.9239;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
|
||||
inputSampleL *= gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
//applies smoothed fader gain
|
||||
|
||||
//begin 32 bit floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
|
|
|
|||
|
|
@ -54,44 +54,45 @@
|
|||
#pragma mark ____ConsoleX2Pre Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamA = 0.5;
|
||||
static const float kDefaultValue_ParamB = 0.5;
|
||||
static const int kDefaultValue_ParamA = 1;
|
||||
static const float kDefaultValue_ParamB = 0.0;
|
||||
static const float kDefaultValue_ParamC = 0.5;
|
||||
static const float kDefaultValue_ParamD = 0.5;
|
||||
static const float kDefaultValue_ParamE = 0.5;
|
||||
static const float kDefaultValue_ParamF = 0.5;
|
||||
static const float kDefaultValue_ParamG = 0.5;
|
||||
static const float kDefaultValue_ParamH = 0.5;
|
||||
static const float kDefaultValue_ParamI = 1.0;
|
||||
static const float kDefaultValue_ParamI = 0.5;
|
||||
static const float kDefaultValue_ParamJ = 0.5;
|
||||
static const float kDefaultValue_ParamK = 0.5;
|
||||
static const float kDefaultValue_ParamL = 0.0;
|
||||
static const float kDefaultValue_ParamM = 1.0;
|
||||
static const float kDefaultValue_ParamK = 1.0;
|
||||
static const float kDefaultValue_ParamL = 0.5;
|
||||
static const float kDefaultValue_ParamM = 0.5;
|
||||
static const float kDefaultValue_ParamN = 0.0;
|
||||
static const float kDefaultValue_ParamO = 0.0;
|
||||
static const float kDefaultValue_ParamP = 0.5;
|
||||
static const float kDefaultValue_ParamO = 1.0;
|
||||
static const float kDefaultValue_ParamP = 0.0;
|
||||
static const float kDefaultValue_ParamQ = 0.5;
|
||||
|
||||
static CFStringRef kParameterAUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterAName = CFSTR("High");
|
||||
static CFStringRef kParameterBName = CFSTR("HMid");
|
||||
static CFStringRef kParameterCName = CFSTR("LMid");
|
||||
static CFStringRef kParameterDName = CFSTR("Bass");
|
||||
static CFStringRef kParameterEUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterEName = CFSTR("HighF");
|
||||
static CFStringRef kParameterFName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterGName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterHName = CFSTR("BassF");
|
||||
static CFStringRef kParameterIUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterIName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterJName = CFSTR("Attack");
|
||||
static CFStringRef kParameterKName = CFSTR("Release");
|
||||
static CFStringRef kParameterLName = CFSTR("Gate");
|
||||
static CFStringRef kParameterMUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterMName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterNName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterOUnit = CFSTR("+");
|
||||
static CFStringRef kParameterOName = CFSTR("More");
|
||||
static CFStringRef kParameterPName = CFSTR("Fader");
|
||||
static CFStringRef kParameterAName = CFSTR("Trim");
|
||||
static CFStringRef kParameterBName = CFSTR("More");
|
||||
static CFStringRef kParameterCUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterCName = CFSTR("High");
|
||||
static CFStringRef kParameterDName = CFSTR("HMid");
|
||||
static CFStringRef kParameterEName = CFSTR("LMid");
|
||||
static CFStringRef kParameterFName = CFSTR("Bass");
|
||||
static CFStringRef kParameterGUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterGName = CFSTR("HighF");
|
||||
static CFStringRef kParameterHName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterIName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterJName = CFSTR("BassF");
|
||||
static CFStringRef kParameterKUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterKName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterLName = CFSTR("Attack");
|
||||
static CFStringRef kParameterMName = CFSTR("Release");
|
||||
static CFStringRef kParameterNName = CFSTR("Gate");
|
||||
static CFStringRef kParameterOUnit = CFSTR("fltr");
|
||||
static CFStringRef kParameterOName = CFSTR("Lowpass");
|
||||
static CFStringRef kParameterPName = CFSTR("Hipass");
|
||||
static CFStringRef kParameterQName = CFSTR("Fader");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
|
|
@ -110,8 +111,9 @@ enum {
|
|||
kParam_N =13,
|
||||
kParam_O =14,
|
||||
kParam_P =15,
|
||||
kParam_Q =16,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=16
|
||||
kNumberOfParameters=17
|
||||
};
|
||||
|
||||
const int dscBuf = 256;
|
||||
|
|
@ -238,6 +240,16 @@ public:
|
|||
int dBaXL;
|
||||
//Discontapeity
|
||||
|
||||
double avg32L[33];
|
||||
double avg16L[17];
|
||||
double avg8L[9];
|
||||
double avg4L[5];
|
||||
double avg2L[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewpleL;
|
||||
//preTapeHack
|
||||
|
||||
double inTrimA;
|
||||
double inTrimB;
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@
|
|||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
292,
|
||||
167,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
|
|
@ -51,82 +51,71 @@
|
|||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 781916083;
|
||||
PBXWorkspaceStateSaveDate = 781916083;
|
||||
PBXPerProjectTemplateStateSaveDate = 783603927;
|
||||
PBXWorkspaceStateSaveDate = 783603927;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B962AF02E9AD2C4000EAC04 /* PBXTextBookmark */ = 8B962AF02E9AD2C4000EAC04 /* PBXTextBookmark */;
|
||||
8B962B712E9AD519000EAC04 /* PBXTextBookmark */ = 8B962B712E9AD519000EAC04 /* PBXTextBookmark */;
|
||||
8B962B722E9AD519000EAC04 /* PBXTextBookmark */ = 8B962B722E9AD519000EAC04 /* PBXTextBookmark */;
|
||||
8B962BEF2E9B17D7000EAC04 /* PBXTextBookmark */ = 8B962BEF2E9B17D7000EAC04 /* PBXTextBookmark */;
|
||||
8B692B762EB4D66E00F51381 /* PBXTextBookmark */ = 8B692B762EB4D66E00F51381 /* PBXTextBookmark */;
|
||||
8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */ = 8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */;
|
||||
8BC5BE482EB1697700031C01 /* PBXTextBookmark */ = 8BC5BE482EB1697700031C01 /* PBXTextBookmark */;
|
||||
8BD964C72E95AA0700D77499 /* PlistBookmark */ = 8BD964C72E95AA0700D77499 /* PlistBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B962AF02E9AD2C4000EAC04 /* PBXTextBookmark */ = {
|
||||
8B692B762EB4D66E00F51381 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */;
|
||||
name = "ConsoleX2Pre.cpp: 698";
|
||||
rLen = 0;
|
||||
rLoc = 31458;
|
||||
rType = 0;
|
||||
vrLen = 66;
|
||||
vrLoc = 3;
|
||||
};
|
||||
8B692BBF2EB4DCD400F51381 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */;
|
||||
name = "ConsoleX2Pre.cpp: 698";
|
||||
rLen = 0;
|
||||
rLoc = 31458;
|
||||
rType = 0;
|
||||
vrLen = 40;
|
||||
vrLoc = 29;
|
||||
};
|
||||
8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1065, 13572}}";
|
||||
sepNavSelRange = "{31458, 0}";
|
||||
sepNavVisRange = "{29, 40}";
|
||||
sepNavWindowFrame = "{{19, 92}, {1066, 786}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* ConsoleX2PreVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {426, 1116}}";
|
||||
sepNavSelRange = "{2927, 0}";
|
||||
sepNavVisRange = "{3, 306}";
|
||||
sepNavWindowFrame = "{{61, 45}, {1066, 786}}";
|
||||
};
|
||||
};
|
||||
8BC5BE482EB1697700031C01 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A690720730100365D66 /* ConsoleX2PreVersion.h */;
|
||||
name = "ConsoleX2PreVersion.h: 54";
|
||||
rLen = 0;
|
||||
rLoc = 2927;
|
||||
rType = 0;
|
||||
vrLen = 134;
|
||||
vrLoc = 2847;
|
||||
};
|
||||
8B962B712E9AD519000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* ConsoleX2Pre.h */;
|
||||
name = "ConsoleX2Pre.h: 94";
|
||||
rLen = 0;
|
||||
rLoc = 4648;
|
||||
rType = 0;
|
||||
vrLen = 54;
|
||||
vrLoc = 4648;
|
||||
};
|
||||
8B962B722E9AD519000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */;
|
||||
name = "ConsoleX2Pre.cpp: 612";
|
||||
rLen = 0;
|
||||
rLoc = 27730;
|
||||
rType = 0;
|
||||
vrLen = 66;
|
||||
vrLoc = 27634;
|
||||
};
|
||||
8B962BEF2E9B17D7000EAC04 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */;
|
||||
name = "ConsoleX2Pre.cpp: 612";
|
||||
rLen = 0;
|
||||
rLoc = 27730;
|
||||
rType = 0;
|
||||
vrLen = 20;
|
||||
vrLoc = 27680;
|
||||
};
|
||||
8BA05A660720730100365D66 /* ConsoleX2Pre.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1065, 12510}}";
|
||||
sepNavSelRange = "{27730, 0}";
|
||||
sepNavVisRange = "{27680, 20}";
|
||||
sepNavWindowFrame = "{{374, 88}, {1066, 786}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* ConsoleX2PreVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {696, 1296}}";
|
||||
sepNavSelRange = "{2927, 0}";
|
||||
sepNavVisRange = "{2847, 134}";
|
||||
sepNavWindowFrame = "{{61, 45}, {1066, 786}}";
|
||||
};
|
||||
vrLen = 306;
|
||||
vrLoc = 3;
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* ConsoleX2Pre.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {498, 4572}}";
|
||||
sepNavSelRange = "{4648, 0}";
|
||||
sepNavVisRange = "{4648, 54}";
|
||||
sepNavWindowFrame = "{{374, 63}, {1066, 786}}";
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1146, 4734}}";
|
||||
sepNavSelRange = "{8318, 0}";
|
||||
sepNavVisRange = "{3264, 1603}";
|
||||
sepNavWindowFrame = "{{7, 38}, {657, 832}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
|
|
|
|||
|
|
@ -225,8 +225,8 @@
|
|||
<array/>
|
||||
<key>PerspectiveWidths</key>
|
||||
<array>
|
||||
<integer>841</integer>
|
||||
<integer>841</integer>
|
||||
<integer>716</integer>
|
||||
<integer>716</integer>
|
||||
</array>
|
||||
<key>Perspectives</key>
|
||||
<array>
|
||||
|
|
@ -302,14 +302,14 @@
|
|||
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
|
||||
<array>
|
||||
<array>
|
||||
<integer>4</integer>
|
||||
<integer>3</integer>
|
||||
<integer>2</integer>
|
||||
<integer>1</integer>
|
||||
<integer>0</integer>
|
||||
</array>
|
||||
</array>
|
||||
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
|
||||
<string>{{0, 0}, {288, 595}}</string>
|
||||
<string>{{0, 0}, {288, 452}}</string>
|
||||
</dict>
|
||||
<key>PBXTopSmartGroupGIDs</key>
|
||||
<array/>
|
||||
|
|
@ -319,14 +319,14 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {305, 613}}</string>
|
||||
<string>{{0, 0}, {305, 470}}</string>
|
||||
<key>GroupTreeTableConfiguration</key>
|
||||
<array>
|
||||
<string>MainColumn</string>
|
||||
<real>288</real>
|
||||
</array>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>599 187 841 654 0 0 1440 878 </string>
|
||||
<string>25 209 716 511 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXSmartGroupTreeModule</string>
|
||||
|
|
@ -354,13 +354,12 @@
|
|||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>8B962BEF2E9B17D7000EAC04</string>
|
||||
<string>8B692BBF2EB4DCD400F51381</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>8BD964C72E95AA0700D77499</string>
|
||||
<string>8B962AF02E9AD2C4000EAC04</string>
|
||||
<string>8B962B712E9AD519000EAC04</string>
|
||||
<string>8B962B722E9AD519000EAC04</string>
|
||||
<string>8BC5BE482EB1697700031C01</string>
|
||||
<string>8B692B762EB4D66E00F51381</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
|
|
@ -374,18 +373,18 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {531, 49}}</string>
|
||||
<string>{{0, 0}, {406, 94}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>599 187 841 654 0 0 1440 878 </string>
|
||||
<string>25 209 716 511 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
<key>Proportion</key>
|
||||
<string>49pt</string>
|
||||
<string>94pt</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Proportion</key>
|
||||
<string>559pt</string>
|
||||
<string>371pt</string>
|
||||
<key>Tabs</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
@ -399,9 +398,9 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {531, 532}}</string>
|
||||
<string>{{10, 27}, {406, 344}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>599 187 841 654 0 0 1440 878 </string>
|
||||
<string>25 209 716 511 0 0 1440 878 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>XCDetailModule</string>
|
||||
|
|
@ -455,7 +454,7 @@
|
|||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {531, 445}}</string>
|
||||
<string>{{10, 27}, {406, 438}}</string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXBuildResultsModule</string>
|
||||
|
|
@ -464,7 +463,7 @@
|
|||
</dict>
|
||||
</array>
|
||||
<key>Proportion</key>
|
||||
<string>531pt</string>
|
||||
<string>406pt</string>
|
||||
</dict>
|
||||
</array>
|
||||
<key>Name</key>
|
||||
|
|
@ -483,11 +482,11 @@
|
|||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>8B962BF02E9B17D7000EAC04</string>
|
||||
<string>8B692B8A2EB4D8DA00F51381</string>
|
||||
<string>1CA23ED40692098700951B8B</string>
|
||||
<string>8B962BF12E9B17D7000EAC04</string>
|
||||
<string>8B692B8B2EB4D8DA00F51381</string>
|
||||
<string>8BD7274A1D46E5A5000176F0</string>
|
||||
<string>8B962BF22E9B17D7000EAC04</string>
|
||||
<string>8B692B8C2EB4D8DA00F51381</string>
|
||||
<string>1CA23EDF0692099D00951B8B</string>
|
||||
<string>1CA23EE00692099D00951B8B</string>
|
||||
<string>1CA23EE10692099D00951B8B</string>
|
||||
|
|
@ -660,7 +659,7 @@
|
|||
<key>StatusbarIsVisible</key>
|
||||
<true/>
|
||||
<key>TimeStamp</key>
|
||||
<real>781916119.01407897</real>
|
||||
<real>783604948.76098895</real>
|
||||
<key>ToolbarConfigUserDefaultsMinorVersion</key>
|
||||
<string>2</string>
|
||||
<key>ToolbarDisplayMode</key>
|
||||
|
|
@ -677,11 +676,10 @@
|
|||
<integer>5</integer>
|
||||
<key>WindowOrderList</key>
|
||||
<array>
|
||||
<string>8B962BF32E9B17D7000EAC04</string>
|
||||
<string>/Users/christopherjohnson/Desktop/airwindows/plugins/MacAU/ConsoleX2Pre/ConsoleX2Pre.xcodeproj</string>
|
||||
</array>
|
||||
<key>WindowString</key>
|
||||
<string>599 187 841 654 0 0 1440 878 </string>
|
||||
<string>25 209 716 511 0 0 1440 878 </string>
|
||||
<key>WindowToolsV3</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
Binary file not shown.
47
plugins/MacSignedAU/X2Buss/Info.plist
Executable file
47
plugins/MacSignedAU/X2Buss/Info.plist
Executable file
|
|
@ -0,0 +1,47 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>AudioComponents</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>description</key>
|
||||
<string>${PRODUCT_NAME:identifier} AU</string>
|
||||
<key>factoryFunction</key>
|
||||
<string>${PRODUCT_NAME:identifier}Factory</string>
|
||||
<key>manufacturer</key>
|
||||
<string>Dthr</string>
|
||||
<key>name</key>
|
||||
<string>Airwindows: ${PRODUCT_NAME:identifier}</string>
|
||||
<key>subtype</key>
|
||||
<string>x2bs</string>
|
||||
<key>type</key>
|
||||
<string>aufx</string>
|
||||
<key>version</key>
|
||||
<integer>65536</integer>
|
||||
</dict>
|
||||
</array>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PROJECTNAMEASIDENTIFIER}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Dthr</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
5
plugins/MacSignedAU/X2Buss/StarterAU_Prefix.pch
Executable file
5
plugins/MacSignedAU/X2Buss/StarterAU_Prefix.pch
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Prefix header for all source files of the '«PROJECTNAMEASIDENTIFIER»' target in the '«PROJECTNAMEASIDENTIFIER»' project.
|
||||
//
|
||||
|
||||
#include <CoreServices/CoreServices.h>
|
||||
751
plugins/MacSignedAU/X2Buss/X2Buss.cpp
Executable file
751
plugins/MacSignedAU/X2Buss/X2Buss.cpp
Executable file
|
|
@ -0,0 +1,751 @@
|
|||
/*
|
||||
* File: X2Buss.cpp
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 10/31/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/*=============================================================================
|
||||
X2Buss.cpp
|
||||
|
||||
=============================================================================*/
|
||||
#include "X2Buss.h"
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
AUDIOCOMPONENT_ENTRY(AUBaseFactory, X2Buss)
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::X2Buss
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
X2Buss::X2Buss(AudioUnit component)
|
||||
: AUEffectBase(component)
|
||||
{
|
||||
CreateElements();
|
||||
Globals()->UseIndexedParameters(kNumberOfParameters);
|
||||
SetParameter(kParam_A, kDefaultValue_ParamA );
|
||||
SetParameter(kParam_B, kDefaultValue_ParamB );
|
||||
SetParameter(kParam_C, kDefaultValue_ParamC );
|
||||
SetParameter(kParam_D, kDefaultValue_ParamD );
|
||||
SetParameter(kParam_E, kDefaultValue_ParamE );
|
||||
SetParameter(kParam_F, kDefaultValue_ParamF );
|
||||
SetParameter(kParam_G, kDefaultValue_ParamG );
|
||||
SetParameter(kParam_H, kDefaultValue_ParamH );
|
||||
SetParameter(kParam_I, kDefaultValue_ParamI );
|
||||
SetParameter(kParam_J, kDefaultValue_ParamJ );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::GetParameterValueStrings
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings)
|
||||
{
|
||||
|
||||
return kAudioUnitErr_InvalidProperty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::GetParameterInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo )
|
||||
{
|
||||
ComponentResult result = noErr;
|
||||
|
||||
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
|
||||
| kAudioUnitParameterFlag_IsReadable;
|
||||
|
||||
if (inScope == kAudioUnitScope_Global) {
|
||||
switch(inParameterID)
|
||||
{
|
||||
case kParam_A:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterAName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterAUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamA;
|
||||
break;
|
||||
case kParam_B:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterBName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamB;
|
||||
break;
|
||||
case kParam_C:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterCName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamC;
|
||||
break;
|
||||
case kParam_D:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterDName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamD;
|
||||
break;
|
||||
case kParam_E:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterEUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamE;
|
||||
break;
|
||||
case kParam_F:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterFName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamF;
|
||||
break;
|
||||
case kParam_G:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterGName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamG;
|
||||
break;
|
||||
case kParam_H:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterHName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamH;
|
||||
break;
|
||||
case kParam_I:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterIName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_CustomUnit;
|
||||
outParameterInfo.unitName = kParameterIUnit;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamI;
|
||||
break;
|
||||
case kParam_J:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterJName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamJ;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::GetPropertyInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::GetPropertyInfo (AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable)
|
||||
{
|
||||
return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// state that plugin supports only stereo-in/stereo-out processing
|
||||
UInt32 X2Buss::SupportedNumChannels(const AUChannelInfo ** outInfo)
|
||||
{
|
||||
if (outInfo != NULL)
|
||||
{
|
||||
static AUChannelInfo info;
|
||||
info.inChannels = 2;
|
||||
info.outChannels = 2;
|
||||
*outInfo = &info;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::GetProperty
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::GetProperty( AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData )
|
||||
{
|
||||
return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
|
||||
}
|
||||
|
||||
// X2Buss::Initialize
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::Initialize()
|
||||
{
|
||||
ComponentResult result = AUEffectBase::Initialize();
|
||||
if (result == noErr)
|
||||
Reset(kAudioUnitScope_Global, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark ____X2BussEffectKernel
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::X2BussKernel::Reset()
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult X2Buss::Reset(AudioUnitScope inScope, AudioUnitElement inElement)
|
||||
{
|
||||
for (int x = 0; x < biq_total; x++) {
|
||||
highA[x] = 0.0;
|
||||
highB[x] = 0.0;
|
||||
highC[x] = 0.0;
|
||||
midA[x] = 0.0;
|
||||
midB[x] = 0.0;
|
||||
midC[x] = 0.0;
|
||||
lowA[x] = 0.0;
|
||||
lowB[x] = 0.0;
|
||||
lowC[x] = 0.0;
|
||||
}
|
||||
highLIIR = 0.0;
|
||||
highRIIR = 0.0;
|
||||
midLIIR = 0.0;
|
||||
midRIIR = 0.0;
|
||||
lowLIIR = 0.0;
|
||||
lowRIIR = 0.0;
|
||||
//SmoothEQ2
|
||||
|
||||
for (int x = 0; x < bez_total; x++) {bezCompF[x] = 0.0;bezCompS[x] = 0.0;}
|
||||
bezCompF[bez_cycle] = 1.0; bezMaxF = 0.0;
|
||||
bezCompS[bez_cycle] = 1.0;
|
||||
//Dynamics2
|
||||
|
||||
for (int x = 0; x < 33; x++) {avg32L[x] = 0.0; avg32R[x] = 0.0;}
|
||||
for (int x = 0; x < 17; x++) {avg16L[x] = 0.0; avg16R[x] = 0.0;}
|
||||
for (int x = 0; x < 9; x++) {avg8L[x] = 0.0; avg8R[x] = 0.0;}
|
||||
for (int x = 0; x < 5; x++) {avg4L[x] = 0.0; avg4R[x] = 0.0;}
|
||||
for (int x = 0; x < 3; x++) {avg2L[x] = 0.0; avg2R[x] = 0.0;}
|
||||
avgPos = 0;
|
||||
lastSlewL = 0.0; lastSlewR = 0.0;
|
||||
lastSlewpleL = 0.0; lastSlewpleR = 0.0;
|
||||
//preTapeHack
|
||||
|
||||
inTrimA = 0.5; inTrimB = 0.5;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// X2Buss::ProcessBufferLists
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
OSStatus X2Buss::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
|
||||
const AudioBufferList & inBuffer,
|
||||
AudioBufferList & outBuffer,
|
||||
UInt32 inFramesToProcess)
|
||||
{
|
||||
Float32 * inputL = (Float32*)(inBuffer.mBuffers[0].mData);
|
||||
Float32 * inputR = (Float32*)(inBuffer.mBuffers[1].mData);
|
||||
Float32 * outputL = (Float32*)(outBuffer.mBuffers[0].mData);
|
||||
Float32 * outputR = (Float32*)(outBuffer.mBuffers[1].mData);
|
||||
UInt32 nSampleFrames = inFramesToProcess;
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
int spacing = floor(overallscale*2.0);
|
||||
if (spacing < 2) spacing = 2; if (spacing > 32) spacing = 32;
|
||||
|
||||
double trebleGain = (GetParameter( kParam_A )-0.5)*2.0;
|
||||
trebleGain = 1.0+(trebleGain*fabs(trebleGain)*fabs(trebleGain));
|
||||
double highmidGain = (GetParameter( kParam_B )-0.5)*2.0;
|
||||
highmidGain = 1.0+(highmidGain*fabs(highmidGain)*fabs(highmidGain));
|
||||
double lowmidGain = (GetParameter( kParam_C )-0.5)*2.0;
|
||||
lowmidGain = 1.0+(lowmidGain*fabs(lowmidGain)*fabs(lowmidGain));
|
||||
double bassGain = (GetParameter( kParam_D )-0.5)*2.0;
|
||||
bassGain = 1.0+(bassGain*fabs(bassGain)*fabs(bassGain));
|
||||
|
||||
double trebleRef = GetParameter( kParam_E )-0.5;
|
||||
double highmidRef = GetParameter( kParam_F )-0.5;
|
||||
double lowmidRef = GetParameter( kParam_G )-0.5;
|
||||
double bassRef = GetParameter( kParam_H )-0.5;
|
||||
double highF = 0.75 + ((trebleRef+trebleRef+trebleRef+highmidRef)*0.125);
|
||||
double bassF = 0.25 + ((lowmidRef+bassRef+bassRef+bassRef)*0.125);
|
||||
double midF = (highF*0.5) + (bassF*0.5) + ((highmidRef+lowmidRef)*0.125);
|
||||
|
||||
double highQ = fmax(fmin(1.0+(highmidRef-trebleRef),4.0),0.125);
|
||||
double midQ = fmax(fmin(1.0+(lowmidRef-highmidRef),4.0),0.125);
|
||||
double lowQ = fmax(fmin(1.0+(bassRef-lowmidRef),4.0),0.125);
|
||||
|
||||
highA[biq_freq] = ((pow(highF,3)*20000.0)/GetSampleRate());
|
||||
highC[biq_freq] = highB[biq_freq] = highA[biq_freq] = fmax(fmin(highA[biq_freq],0.4999),0.00025);
|
||||
double highFreq = pow(highF,3)*20000.0;
|
||||
double omega = 2.0*M_PI*(highFreq/GetSampleRate());
|
||||
double biqK = 2.0-cos(omega);
|
||||
double highCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
highA[biq_reso] = 2.24697960 * highQ;
|
||||
highB[biq_reso] = 0.80193774 * highQ;
|
||||
highC[biq_reso] = 0.55495813 * highQ;
|
||||
|
||||
midA[biq_freq] = ((pow(midF,3)*20000.0)/GetSampleRate());
|
||||
midC[biq_freq] = midB[biq_freq] = midA[biq_freq] = fmax(fmin(midA[biq_freq],0.4999),0.00025);
|
||||
double midFreq = pow(midF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(midFreq/GetSampleRate());
|
||||
biqK = 2.0-cos(omega);
|
||||
double midCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
midA[biq_reso] = 2.24697960 * midQ;
|
||||
midB[biq_reso] = 0.80193774 * midQ;
|
||||
midC[biq_reso] = 0.55495813 * midQ;
|
||||
|
||||
lowA[biq_freq] = ((pow(bassF,3)*20000.0)/GetSampleRate());
|
||||
lowC[biq_freq] = lowB[biq_freq] = lowA[biq_freq] = fmax(fmin(lowA[biq_freq],0.4999),0.00025);
|
||||
double lowFreq = pow(bassF,3)*20000.0;
|
||||
omega = 2.0*M_PI*(lowFreq/GetSampleRate());
|
||||
biqK = 2.0-cos(omega);
|
||||
double lowCoef = -sqrt((biqK*biqK)-1.0)+biqK;
|
||||
lowA[biq_reso] = 2.24697960 * lowQ;
|
||||
lowB[biq_reso] = 0.80193774 * lowQ;
|
||||
lowC[biq_reso] = 0.55495813 * lowQ;
|
||||
|
||||
biqK = tan(M_PI * highA[biq_freq]);
|
||||
double norm = 1.0 / (1.0 + biqK / highA[biq_reso] + biqK * biqK);
|
||||
highA[biq_a0] = biqK * biqK * norm;
|
||||
highA[biq_a1] = 2.0 * highA[biq_a0];
|
||||
highA[biq_a2] = highA[biq_a0];
|
||||
highA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highA[biq_b2] = (1.0 - biqK / highA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highB[biq_reso] + biqK * biqK);
|
||||
highB[biq_a0] = biqK * biqK * norm;
|
||||
highB[biq_a1] = 2.0 * highB[biq_a0];
|
||||
highB[biq_a2] = highB[biq_a0];
|
||||
highB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highB[biq_b2] = (1.0 - biqK / highB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * highC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / highC[biq_reso] + biqK * biqK);
|
||||
highC[biq_a0] = biqK * biqK * norm;
|
||||
highC[biq_a1] = 2.0 * highC[biq_a0];
|
||||
highC[biq_a2] = highC[biq_a0];
|
||||
highC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
highC[biq_b2] = (1.0 - biqK / highC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
biqK = tan(M_PI * midA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midA[biq_reso] + biqK * biqK);
|
||||
midA[biq_a0] = biqK * biqK * norm;
|
||||
midA[biq_a1] = 2.0 * midA[biq_a0];
|
||||
midA[biq_a2] = midA[biq_a0];
|
||||
midA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midA[biq_b2] = (1.0 - biqK / midA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midB[biq_reso] + biqK * biqK);
|
||||
midB[biq_a0] = biqK * biqK * norm;
|
||||
midB[biq_a1] = 2.0 * midB[biq_a0];
|
||||
midB[biq_a2] = midB[biq_a0];
|
||||
midB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midB[biq_b2] = (1.0 - biqK / midB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * midC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / midC[biq_reso] + biqK * biqK);
|
||||
midC[biq_a0] = biqK * biqK * norm;
|
||||
midC[biq_a1] = 2.0 * midC[biq_a0];
|
||||
midC[biq_a2] = midC[biq_a0];
|
||||
midC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
midC[biq_b2] = (1.0 - biqK / midC[biq_reso] + biqK * biqK) * norm;
|
||||
|
||||
biqK = tan(M_PI * lowA[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowA[biq_reso] + biqK * biqK);
|
||||
lowA[biq_a0] = biqK * biqK * norm;
|
||||
lowA[biq_a1] = 2.0 * lowA[biq_a0];
|
||||
lowA[biq_a2] = lowA[biq_a0];
|
||||
lowA[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowA[biq_b2] = (1.0 - biqK / lowA[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowB[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowB[biq_reso] + biqK * biqK);
|
||||
lowB[biq_a0] = biqK * biqK * norm;
|
||||
lowB[biq_a1] = 2.0 * lowB[biq_a0];
|
||||
lowB[biq_a2] = lowB[biq_a0];
|
||||
lowB[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowB[biq_b2] = (1.0 - biqK / lowB[biq_reso] + biqK * biqK) * norm;
|
||||
biqK = tan(M_PI * lowC[biq_freq]);
|
||||
norm = 1.0 / (1.0 + biqK / lowC[biq_reso] + biqK * biqK);
|
||||
lowC[biq_a0] = biqK * biqK * norm;
|
||||
lowC[biq_a1] = 2.0 * lowC[biq_a0];
|
||||
lowC[biq_a2] = lowC[biq_a0];
|
||||
lowC[biq_b1] = 2.0 * (biqK * biqK - 1.0) * norm;
|
||||
lowC[biq_b2] = (1.0 - biqK / lowC[biq_reso] + biqK * biqK) * norm;
|
||||
//SmoothEQ2
|
||||
|
||||
double bezCThresh = pow(1.0-GetParameter( kParam_I ), 6.0) * 8.0;
|
||||
double bezRez = pow(1.0-GetParameter( kParam_I ), 12.360679774997898) / overallscale;
|
||||
double sloRez = pow(1.0-GetParameter( kParam_I ),10.0) / overallscale;
|
||||
sloRez = fmin(fmax(sloRez,0.00001),1.0);
|
||||
bezRez = fmin(fmax(bezRez,0.00001),1.0);
|
||||
//Dynamics2
|
||||
|
||||
inTrimA = inTrimB; inTrimB = GetParameter( kParam_J )*2.0;
|
||||
//Console
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
double inputSampleL = *inputL;
|
||||
double inputSampleR = *inputR;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
|
||||
if (inputSampleL > 1.0) inputSampleL = 1.0;
|
||||
else if (inputSampleL > 0.0) inputSampleL = -expm1((log1p(-inputSampleL) * 0.6180339887498949));
|
||||
if (inputSampleL < -1.0) inputSampleL = -1.0;
|
||||
else if (inputSampleL < 0.0) inputSampleL = expm1((log1p(inputSampleL) * 0.6180339887498949));
|
||||
|
||||
if (inputSampleR > 1.0) inputSampleR = 1.0;
|
||||
else if (inputSampleR > 0.0) inputSampleR = -expm1((log1p(-inputSampleR) * 0.6180339887498949));
|
||||
if (inputSampleR < -1.0) inputSampleR = -1.0;
|
||||
else if (inputSampleR < 0.0) inputSampleR = expm1((log1p(inputSampleR) * 0.6180339887498949));
|
||||
|
||||
double trebleL = inputSampleL;
|
||||
double outSample = (trebleL * highA[biq_a0]) + highA[biq_sL1];
|
||||
highA[biq_sL1] = (trebleL * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sL2];
|
||||
highA[biq_sL2] = (trebleL * highA[biq_a2]) - (outSample * highA[biq_b2]);
|
||||
double highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midA[biq_a0]) + midA[biq_sL1];
|
||||
midA[biq_sL1] = (highmidL * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sL2];
|
||||
midA[biq_sL2] = (highmidL * midA[biq_a2]) - (outSample * midA[biq_b2]);
|
||||
double lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowA[biq_a0]) + lowA[biq_sL1];
|
||||
lowA[biq_sL1] = (lowmidL * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sL2];
|
||||
lowA[biq_sL2] = (lowmidL * lowA[biq_a2]) - (outSample * lowA[biq_b2]);
|
||||
double bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//first stage of three crossovers
|
||||
|
||||
outSample = (trebleL * highB[biq_a0]) + highB[biq_sL1];
|
||||
highB[biq_sL1] = (trebleL * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sL2];
|
||||
highB[biq_sL2] = (trebleL * highB[biq_a2]) - (outSample * highB[biq_b2]);
|
||||
highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midB[biq_a0]) + midB[biq_sL1];
|
||||
midB[biq_sL1] = (highmidL * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sL2];
|
||||
midB[biq_sL2] = (highmidL * midB[biq_a2]) - (outSample * midB[biq_b2]);
|
||||
lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowB[biq_a0]) + lowB[biq_sL1];
|
||||
lowB[biq_sL1] = (lowmidL * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sL2];
|
||||
lowB[biq_sL2] = (lowmidL * lowB[biq_a2]) - (outSample * lowB[biq_b2]);
|
||||
bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//second stage of three crossovers
|
||||
|
||||
outSample = (trebleL * highC[biq_a0]) + highC[biq_sL1];
|
||||
highC[biq_sL1] = (trebleL * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sL2];
|
||||
highC[biq_sL2] = (trebleL * highC[biq_a2]) - (outSample * highC[biq_b2]);
|
||||
highmidL = outSample; trebleL -= highmidL;
|
||||
|
||||
outSample = (highmidL * midC[biq_a0]) + midC[biq_sL1];
|
||||
midC[biq_sL1] = (highmidL * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sL2];
|
||||
midC[biq_sL2] = (highmidL * midC[biq_a2]) - (outSample * midC[biq_b2]);
|
||||
lowmidL = outSample; highmidL -= lowmidL;
|
||||
|
||||
outSample = (lowmidL * lowC[biq_a0]) + lowC[biq_sL1];
|
||||
lowC[biq_sL1] = (lowmidL * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sL2];
|
||||
lowC[biq_sL2] = (lowmidL * lowC[biq_a2]) - (outSample * lowC[biq_b2]);
|
||||
bassL = outSample; lowmidL -= bassL;
|
||||
|
||||
trebleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//third stage of three crossovers
|
||||
|
||||
highLIIR = (highLIIR*highCoef) + (trebleL*(1.0-highCoef));
|
||||
highmidL = highLIIR; trebleL -= highmidL;
|
||||
|
||||
midLIIR = (midLIIR*midCoef) + (highmidL*(1.0-midCoef));
|
||||
lowmidL = midLIIR; highmidL -= lowmidL;
|
||||
|
||||
lowLIIR = (lowLIIR*lowCoef) + (lowmidL*(1.0-lowCoef));
|
||||
bassL = lowLIIR; lowmidL -= bassL;
|
||||
|
||||
inputSampleL = (bassL*bassGain) + (lowmidL*lowmidGain) + (highmidL*highmidGain) + (trebleL*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
|
||||
|
||||
double trebleR = inputSampleR;
|
||||
outSample = (trebleR * highA[biq_a0]) + highA[biq_sR1];
|
||||
highA[biq_sR1] = (trebleR * highA[biq_a1]) - (outSample * highA[biq_b1]) + highA[biq_sR2];
|
||||
highA[biq_sR2] = (trebleR * highA[biq_a2]) - (outSample * highA[biq_b2]);
|
||||
double highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midA[biq_a0]) + midA[biq_sR1];
|
||||
midA[biq_sR1] = (highmidR * midA[biq_a1]) - (outSample * midA[biq_b1]) + midA[biq_sR2];
|
||||
midA[biq_sR2] = (highmidR * midA[biq_a2]) - (outSample * midA[biq_b2]);
|
||||
double lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowA[biq_a0]) + lowA[biq_sR1];
|
||||
lowA[biq_sR1] = (lowmidR * lowA[biq_a1]) - (outSample * lowA[biq_b1]) + lowA[biq_sR2];
|
||||
lowA[biq_sR2] = (lowmidR * lowA[biq_a2]) - (outSample * lowA[biq_b2]);
|
||||
double bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//first stage of three crossovers
|
||||
|
||||
outSample = (trebleR * highB[biq_a0]) + highB[biq_sR1];
|
||||
highB[biq_sR1] = (trebleR * highB[biq_a1]) - (outSample * highB[biq_b1]) + highB[biq_sR2];
|
||||
highB[biq_sR2] = (trebleR * highB[biq_a2]) - (outSample * highB[biq_b2]);
|
||||
highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midB[biq_a0]) + midB[biq_sR1];
|
||||
midB[biq_sR1] = (highmidR * midB[biq_a1]) - (outSample * midB[biq_b1]) + midB[biq_sR2];
|
||||
midB[biq_sR2] = (highmidR * midB[biq_a2]) - (outSample * midB[biq_b2]);
|
||||
lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowB[biq_a0]) + lowB[biq_sR1];
|
||||
lowB[biq_sR1] = (lowmidR * lowB[biq_a1]) - (outSample * lowB[biq_b1]) + lowB[biq_sR2];
|
||||
lowB[biq_sR2] = (lowmidR * lowB[biq_a2]) - (outSample * lowB[biq_b2]);
|
||||
bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//second stage of three crossovers
|
||||
|
||||
outSample = (trebleR * highC[biq_a0]) + highC[biq_sR1];
|
||||
highC[biq_sR1] = (trebleR * highC[biq_a1]) - (outSample * highC[biq_b1]) + highC[biq_sR2];
|
||||
highC[biq_sR2] = (trebleR * highC[biq_a2]) - (outSample * highC[biq_b2]);
|
||||
highmidR = outSample; trebleR -= highmidR;
|
||||
|
||||
outSample = (highmidR * midC[biq_a0]) + midC[biq_sR1];
|
||||
midC[biq_sR1] = (highmidR * midC[biq_a1]) - (outSample * midC[biq_b1]) + midC[biq_sR2];
|
||||
midC[biq_sR2] = (highmidR * midC[biq_a2]) - (outSample * midC[biq_b2]);
|
||||
lowmidR = outSample; highmidR -= lowmidR;
|
||||
|
||||
outSample = (lowmidR * lowC[biq_a0]) + lowC[biq_sR1];
|
||||
lowC[biq_sR1] = (lowmidR * lowC[biq_a1]) - (outSample * lowC[biq_b1]) + lowC[biq_sR2];
|
||||
lowC[biq_sR2] = (lowmidR * lowC[biq_a2]) - (outSample * lowC[biq_b2]);
|
||||
bassR = outSample; lowmidR -= bassR;
|
||||
|
||||
trebleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//third stage of three crossovers
|
||||
|
||||
highRIIR = (highRIIR*highCoef) + (trebleR*(1.0-highCoef));
|
||||
highmidR = highRIIR; trebleR -= highmidR;
|
||||
|
||||
midRIIR = (midRIIR*midCoef) + (highmidR*(1.0-midCoef));
|
||||
lowmidR = midRIIR; highmidR -= lowmidR;
|
||||
|
||||
lowRIIR = (lowRIIR*lowCoef) + (lowmidR*(1.0-lowCoef));
|
||||
bassR = lowRIIR; lowmidR -= bassR;
|
||||
|
||||
inputSampleR = (bassR*bassGain) + (lowmidR*lowmidGain) + (highmidR*highmidGain) + (trebleR*trebleGain);
|
||||
//fourth stage of three crossovers is the exponential filters
|
||||
//SmoothEQ2
|
||||
|
||||
if (bezCThresh > 0.0) {
|
||||
inputSampleL *= ((bezCThresh*0.5)+1.0);
|
||||
inputSampleR *= ((bezCThresh*0.5)+1.0);
|
||||
}
|
||||
|
||||
bezCompF[bez_cycle] += bezRez;
|
||||
bezCompF[bez_SampL] += (fabs(inputSampleL) * bezRez);
|
||||
bezCompF[bez_SampR] += (fabs(inputSampleR) * bezRez);
|
||||
bezMaxF = fmax(bezMaxF,fmax(fabs(inputSampleL),fabs(inputSampleR)));
|
||||
|
||||
if (bezCompF[bez_cycle] > 1.0) {
|
||||
bezCompF[bez_cycle] -= 1.0;
|
||||
bezCompF[bez_CL] = bezCompF[bez_BL];
|
||||
bezCompF[bez_BL] = bezCompF[bez_AL];
|
||||
bezCompF[bez_AL] = bezCompF[bez_SampL];
|
||||
bezCompF[bez_SampL] = 0.0;
|
||||
bezCompF[bez_CR] = bezCompF[bez_BR];
|
||||
bezCompF[bez_BR] = bezCompF[bez_AR];
|
||||
bezCompF[bez_AR] = bezCompF[bez_SampR];
|
||||
bezCompF[bez_SampR] = 0.0;
|
||||
bezMaxF = 0.0;
|
||||
}
|
||||
bezCompS[bez_cycle] += sloRez;
|
||||
bezCompS[bez_SampL] += (fabs(inputSampleL) * sloRez); //note: SampL is a control voltage
|
||||
bezCompS[bez_SampR] += (fabs(inputSampleR) * sloRez); //note: SampR is a control voltage
|
||||
if (bezCompS[bez_cycle] > 1.0) {
|
||||
bezCompS[bez_cycle] -= 1.0;
|
||||
bezCompS[bez_CL] = bezCompS[bez_BL];
|
||||
bezCompS[bez_BL] = bezCompS[bez_AL];
|
||||
bezCompS[bez_AL] = bezCompS[bez_SampL];
|
||||
bezCompS[bez_SampL] = 0.0;
|
||||
bezCompS[bez_CR] = bezCompS[bez_BR];
|
||||
bezCompS[bez_BR] = bezCompS[bez_AR];
|
||||
bezCompS[bez_AR] = bezCompS[bez_SampR];
|
||||
bezCompS[bez_SampR] = 0.0;
|
||||
}
|
||||
double CBFL = (bezCompF[bez_CL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BL]*bezCompF[bez_cycle]);
|
||||
double BAFL = (bezCompF[bez_BL]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AL]*bezCompF[bez_cycle]);
|
||||
double CBAFL = (bezCompF[bez_BL]+(CBFL*(1.0-bezCompF[bez_cycle]))+(BAFL*bezCompF[bez_cycle]))*0.5;
|
||||
double CBSL = (bezCompS[bez_CL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BL]*bezCompS[bez_cycle]);
|
||||
double BASL = (bezCompS[bez_BL]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AL]*bezCompS[bez_cycle]);
|
||||
double CBASL = (bezCompS[bez_BL]+(CBSL*(1.0-bezCompS[bez_cycle]))+(BASL*bezCompS[bez_cycle]))*0.5;
|
||||
double CBAMax = fmax(CBASL,CBAFL); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
double CBAFade = ((CBASL*-CBAMax)+(CBAFL*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleL *= 1.0-(fmin(((CBASL*(1.0-CBAFade))+(CBAFL*CBAFade))*bezCThresh,1.0));
|
||||
|
||||
double CBFR = (bezCompF[bez_CR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_BR]*bezCompF[bez_cycle]);
|
||||
double BAFR = (bezCompF[bez_BR]*(1.0-bezCompF[bez_cycle]))+(bezCompF[bez_AR]*bezCompF[bez_cycle]);
|
||||
double CBAFR = (bezCompF[bez_BR]+(CBFR*(1.0-bezCompF[bez_cycle]))+(BAFR*bezCompF[bez_cycle]))*0.5;
|
||||
double CBSR = (bezCompS[bez_CR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_BR]*bezCompS[bez_cycle]);
|
||||
double BASR = (bezCompS[bez_BR]*(1.0-bezCompS[bez_cycle]))+(bezCompS[bez_AR]*bezCompS[bez_cycle]);
|
||||
double CBASR = (bezCompS[bez_BR]+(CBSR*(1.0-bezCompS[bez_cycle]))+(BASR*bezCompS[bez_cycle]))*0.5;
|
||||
CBAMax = fmax(CBASR,CBAFR); if (CBAMax > 0.0) CBAMax = 1.0/CBAMax;
|
||||
CBAFade = ((CBASR*-CBAMax)+(CBAFR*CBAMax)+1.0)*0.5;
|
||||
if (bezCThresh > 0.0) inputSampleR *= 1.0-(fmin(((CBASR*(1.0-CBAFade))+(CBAFR*CBAFade))*bezCThresh,1.0));
|
||||
//Dynamics2
|
||||
|
||||
const double temp = (double)nSampleFrames/inFramesToProcess;
|
||||
double gain = (inTrimA*temp)+(inTrimB*(1.0-temp));
|
||||
if (gain > 1.0) gain *= gain;
|
||||
if (gain < 1.0) gain = 1.0-pow(1.0-gain,2);
|
||||
gain *= 2.0;
|
||||
|
||||
inputSampleL = inputSampleL * gain;
|
||||
inputSampleR = inputSampleR * gain;
|
||||
//applies pan section, and smoothed fader gain
|
||||
|
||||
double darkSampleL = inputSampleL;
|
||||
double darkSampleR = inputSampleR;
|
||||
if (avgPos > 31) avgPos = 0;
|
||||
if (spacing > 31) {
|
||||
avg32L[avgPos] = darkSampleL; avg32R[avgPos] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 32; x++) {darkSampleL += avg32L[x]; darkSampleR += avg32R[x];}
|
||||
darkSampleL /= 32.0; darkSampleR /= 32.0;
|
||||
} if (spacing > 15) {
|
||||
avg16L[avgPos%16] = darkSampleL; avg16R[avgPos%16] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 16; x++) {darkSampleL += avg16L[x]; darkSampleR += avg16R[x];}
|
||||
darkSampleL /= 16.0; darkSampleR /= 16.0;
|
||||
} if (spacing > 7) {
|
||||
avg8L[avgPos%8] = darkSampleL; avg8R[avgPos%8] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 8; x++) {darkSampleL += avg8L[x]; darkSampleR += avg8R[x];}
|
||||
darkSampleL /= 8.0; darkSampleR /= 8.0;
|
||||
} if (spacing > 3) {
|
||||
avg4L[avgPos%4] = darkSampleL; avg4R[avgPos%4] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 4; x++) {darkSampleL += avg4L[x]; darkSampleR += avg4R[x];}
|
||||
darkSampleL /= 4.0; darkSampleR /= 4.0;
|
||||
} if (spacing > 1) {
|
||||
avg2L[avgPos%2] = darkSampleL; avg2R[avgPos%2] = darkSampleR;
|
||||
darkSampleL = 0.0; darkSampleR = 0.0;
|
||||
for (int x = 0; x < 2; x++) {darkSampleL += avg2L[x]; darkSampleR += avg2R[x];}
|
||||
darkSampleL /= 2.0; darkSampleR /= 2.0;
|
||||
} avgPos++;
|
||||
lastSlewL += fabs(lastSlewpleL-inputSampleL); lastSlewpleL = inputSampleL;
|
||||
double avgSlewL = fmin(lastSlewL,1.0);
|
||||
lastSlewL = fmax(lastSlewL*0.78,2.39996322972865332223);
|
||||
lastSlewR += fabs(lastSlewpleR-inputSampleR); lastSlewpleR = inputSampleR;
|
||||
double avgSlewR = fmin(lastSlewR,1.0);
|
||||
lastSlewR = fmax(lastSlewR*0.78,2.39996322972865332223); //look up Golden Angle, it's cool
|
||||
inputSampleL = (inputSampleL*(1.0-avgSlewL)) + (darkSampleL*avgSlewL);
|
||||
inputSampleR = (inputSampleR*(1.0-avgSlewR)) + (darkSampleR*avgSlewR);
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleL = fmax(fmin(inputSampleL,2.305929007734908),-2.305929007734908);
|
||||
double addtwo = inputSampleL * inputSampleL;
|
||||
double empower = inputSampleL * addtwo; // inputSampleL to the third power
|
||||
inputSampleL -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleL += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleL -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleL += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleL -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleL *= 0.92;
|
||||
//end TapeHack section
|
||||
|
||||
//begin TapeHack section
|
||||
inputSampleR = fmax(fmin(inputSampleR,2.305929007734908),-2.305929007734908);
|
||||
addtwo = inputSampleR * inputSampleR;
|
||||
empower = inputSampleR * addtwo; // inputSampleR to the third power
|
||||
inputSampleR -= (empower / 6.0);
|
||||
empower *= addtwo; // to the fifth power
|
||||
inputSampleR += (empower / 69.0);
|
||||
empower *= addtwo; //seventh
|
||||
inputSampleR -= (empower / 2530.08);
|
||||
empower *= addtwo; //ninth
|
||||
inputSampleR += (empower / 224985.6);
|
||||
empower *= addtwo; //eleventh
|
||||
inputSampleR -= (empower / 9979200.0f);
|
||||
//this is a degenerate form of a Taylor Series to approximate sin()
|
||||
inputSampleR *= 0.92;
|
||||
//end TapeHack section
|
||||
//Discontapeity
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
frexpf((float)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*outputL = inputSampleL;
|
||||
*outputR = inputSampleR;
|
||||
//direct stereo out
|
||||
|
||||
inputL += 1;
|
||||
inputR += 1;
|
||||
outputL += 1;
|
||||
outputR += 1;
|
||||
}
|
||||
return noErr;
|
||||
}
|
||||
|
||||
2
plugins/MacSignedAU/X2Buss/X2Buss.exp
Executable file
2
plugins/MacSignedAU/X2Buss/X2Buss.exp
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
_X2BussEntry
|
||||
_X2BussFactory
|
||||
222
plugins/MacSignedAU/X2Buss/X2Buss.h
Executable file
222
plugins/MacSignedAU/X2Buss/X2Buss.h
Executable file
|
|
@ -0,0 +1,222 @@
|
|||
/*
|
||||
* File: X2Buss.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 10/31/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include "AUEffectBase.h"
|
||||
#include "X2BussVersion.h"
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
#include "AUDebugDispatcher.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __X2Buss_h__
|
||||
#define __X2Buss_h__
|
||||
|
||||
|
||||
#pragma mark ____X2Buss Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamA = 0.5;
|
||||
static const float kDefaultValue_ParamB = 0.5;
|
||||
static const float kDefaultValue_ParamC = 0.5;
|
||||
static const float kDefaultValue_ParamD = 0.5;
|
||||
static const float kDefaultValue_ParamE = 0.5;
|
||||
static const float kDefaultValue_ParamF = 0.5;
|
||||
static const float kDefaultValue_ParamG = 0.5;
|
||||
static const float kDefaultValue_ParamH = 0.5;
|
||||
static const float kDefaultValue_ParamI = 1.0;
|
||||
static const float kDefaultValue_ParamJ = 0.5;
|
||||
|
||||
static CFStringRef kParameterAUnit = CFSTR("eq");
|
||||
static CFStringRef kParameterAName = CFSTR("High");
|
||||
static CFStringRef kParameterBName = CFSTR("HMid");
|
||||
static CFStringRef kParameterCName = CFSTR("LMid");
|
||||
static CFStringRef kParameterDName = CFSTR("Bass");
|
||||
static CFStringRef kParameterEUnit = CFSTR("freq");
|
||||
static CFStringRef kParameterEName = CFSTR("HighF");
|
||||
static CFStringRef kParameterFName = CFSTR("HMidF");
|
||||
static CFStringRef kParameterGName = CFSTR("LMidF");
|
||||
static CFStringRef kParameterHName = CFSTR("BassF");
|
||||
static CFStringRef kParameterIUnit = CFSTR("dyn");
|
||||
static CFStringRef kParameterIName = CFSTR("Thresh");
|
||||
static CFStringRef kParameterJName = CFSTR("Fader");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
kParam_B =1,
|
||||
kParam_C =2,
|
||||
kParam_D =3,
|
||||
kParam_E =4,
|
||||
kParam_F =5,
|
||||
kParam_G =6,
|
||||
kParam_H =7,
|
||||
kParam_I =8,
|
||||
kParam_J =9,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=10
|
||||
};
|
||||
|
||||
#pragma mark ____X2Buss
|
||||
class X2Buss : public AUEffectBase
|
||||
{
|
||||
public:
|
||||
X2Buss(AudioUnit component);
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
virtual ~X2Buss () { delete mDebugDispatcher; }
|
||||
#endif
|
||||
|
||||
virtual ComponentResult Reset(AudioUnitScope inScope, AudioUnitElement inElement);
|
||||
|
||||
virtual OSStatus ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
|
||||
const AudioBufferList & inBuffer, AudioBufferList & outBuffer,
|
||||
UInt32 inFramesToProcess);
|
||||
virtual UInt32 SupportedNumChannels(const AUChannelInfo ** outInfo);
|
||||
|
||||
virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings);
|
||||
|
||||
virtual ComponentResult GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo);
|
||||
|
||||
virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable );
|
||||
|
||||
virtual ComponentResult GetProperty(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData);
|
||||
|
||||
virtual ComponentResult Initialize();
|
||||
virtual bool SupportsTail () { return true; }
|
||||
virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples
|
||||
virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples
|
||||
|
||||
/*! @method Version */
|
||||
virtual ComponentResult Version() { return kX2BussVersion; }
|
||||
|
||||
private:
|
||||
|
||||
enum {
|
||||
biq_freq,
|
||||
biq_reso,
|
||||
biq_a0,
|
||||
biq_a1,
|
||||
biq_a2,
|
||||
biq_b1,
|
||||
biq_b2,
|
||||
biq_sL1,
|
||||
biq_sL2,
|
||||
biq_sR1,
|
||||
biq_sR2,
|
||||
biq_total
|
||||
}; //coefficient interpolating bessel filter, stereo
|
||||
double highA[biq_total];
|
||||
double highB[biq_total];
|
||||
double highC[biq_total];
|
||||
double highLIIR;
|
||||
double highRIIR;
|
||||
|
||||
double midA[biq_total];
|
||||
double midB[biq_total];
|
||||
double midC[biq_total];
|
||||
double midLIIR;
|
||||
double midRIIR;
|
||||
|
||||
double lowA[biq_total];
|
||||
double lowB[biq_total];
|
||||
double lowC[biq_total];
|
||||
double lowLIIR;
|
||||
double lowRIIR;
|
||||
//SmoothEQ2
|
||||
|
||||
enum {
|
||||
bez_AL,
|
||||
bez_BL,
|
||||
bez_CL,
|
||||
bez_InL,
|
||||
bez_UnInL,
|
||||
bez_SampL,
|
||||
bez_AR,
|
||||
bez_BR,
|
||||
bez_CR,
|
||||
bez_InR,
|
||||
bez_UnInR,
|
||||
bez_SampR,
|
||||
bez_cycle,
|
||||
bez_total
|
||||
}; //the new undersampling. bez signifies the bezier curve reconstruction
|
||||
double bezCompF[bez_total];
|
||||
double bezMaxF;
|
||||
double bezCompS[bez_total];
|
||||
//Dynamics2
|
||||
|
||||
double avg32L[33];
|
||||
double avg32R[33];
|
||||
double avg16L[17];
|
||||
double avg16R[17];
|
||||
double avg8L[9];
|
||||
double avg8R[9];
|
||||
double avg4L[5];
|
||||
double avg4R[5];
|
||||
double avg2L[3];
|
||||
double avg2R[3];
|
||||
int avgPos;
|
||||
double lastSlewL;
|
||||
double lastSlewR;
|
||||
double lastSlewpleL;
|
||||
double lastSlewpleR;
|
||||
//preTapeHack
|
||||
|
||||
double inTrimA;
|
||||
double inTrimB;
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#endif
|
||||
61
plugins/MacSignedAU/X2Buss/X2Buss.r
Executable file
61
plugins/MacSignedAU/X2Buss/X2Buss.r
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* File: X2Buss.r
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 10/31/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include <AudioUnit/AudioUnit.r>
|
||||
|
||||
#include "X2BussVersion.h"
|
||||
|
||||
// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description
|
||||
#define kAudioUnitResID_X2Buss 1000
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ X2Buss~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#define RES_ID kAudioUnitResID_X2Buss
|
||||
#define COMP_TYPE kAudioUnitType_Effect
|
||||
#define COMP_SUBTYPE X2Buss_COMP_SUBTYPE
|
||||
#define COMP_MANUF X2Buss_COMP_MANF
|
||||
|
||||
#define VERSION kX2BussVersion
|
||||
#define NAME "Airwindows: X2Buss"
|
||||
#define DESCRIPTION "X2Buss AU"
|
||||
#define ENTRY_POINT "X2BussEntry"
|
||||
|
||||
#include "AUResources.r"
|
||||
1359
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.mode1v3
Executable file
1359
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.mode1v3
Executable file
File diff suppressed because it is too large
Load diff
131
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.pbxuser
Executable file
131
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.pbxuser
Executable file
|
|
@ -0,0 +1,131 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
activeBuildConfigurationName = Release;
|
||||
activeTarget = 8D01CCC60486CAD60068D4B7 /* X2Buss */;
|
||||
codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */;
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
364,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
188,
|
||||
60,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXTargetDataSource_PrimaryAttribute,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 783619103;
|
||||
PBXWorkspaceStateSaveDate = 783619103;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B5C9E262EB515ED008B9860 /* PBXTextBookmark */ = 8B5C9E262EB515ED008B9860 /* PBXTextBookmark */;
|
||||
8B5C9E3E2EB516CF008B9860 /* PBXTextBookmark */ = 8B5C9E3E2EB516CF008B9860 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B5C9E262EB515ED008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* X2Buss.h */;
|
||||
name = "X2Buss.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 62;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8B5C9E3E2EB516CF008B9860 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* X2Buss.h */;
|
||||
name = "X2Buss.h: 1";
|
||||
rLen = 0;
|
||||
rLoc = 0;
|
||||
rType = 0;
|
||||
vrLen = 62;
|
||||
vrLoc = 0;
|
||||
};
|
||||
8BA05A660720730100365D66 /* X2Buss.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {903, 13608}}";
|
||||
sepNavSelRange = "{9006, 0}";
|
||||
sepNavVisRange = "{7185, 1986}";
|
||||
sepNavWindowFrame = "{{506, 48}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* X2BussVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}";
|
||||
sepNavSelRange = "{2887, 0}";
|
||||
sepNavVisRange = "{965, 1985}";
|
||||
sepNavWindowFrame = "{{15, 47}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {516, 23430}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 1336}";
|
||||
};
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* X2Buss.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {948, 3402}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 62}";
|
||||
sepNavWindowFrame = "{{528, 52}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
repositoryNamesForRoots = {
|
||||
"" = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
8BD3CCB9148830B20062E48C /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
8D01CCC60486CAD60068D4B7 /* X2Buss */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
}
|
||||
1481
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.perspectivev3
Executable file
1481
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/christopherjohnson.perspectivev3
Executable file
File diff suppressed because it is too large
Load diff
965
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/project.pbxproj
Executable file
965
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/project.pbxproj
Executable file
|
|
@ -0,0 +1,965 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 45;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
8B7A4A592EB56A3300B07840 /* CAExtAudioFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49D12EB56A3300B07840 /* CAExtAudioFile.h */; };
|
||||
8B7A4A5A2EB56A3300B07840 /* CACFMachPort.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49D22EB56A3300B07840 /* CACFMachPort.h */; };
|
||||
8B7A4A5B2EB56A3300B07840 /* CABool.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49D32EB56A3300B07840 /* CABool.h */; };
|
||||
8B7A4A5C2EB56A3300B07840 /* CAComponent.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49D42EB56A3300B07840 /* CAComponent.cpp */; };
|
||||
8B7A4A5D2EB56A3300B07840 /* CADebugger.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49D52EB56A3300B07840 /* CADebugger.h */; };
|
||||
8B7A4A5E2EB56A3300B07840 /* CACFNumber.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49D62EB56A3300B07840 /* CACFNumber.cpp */; };
|
||||
8B7A4A5F2EB56A3300B07840 /* CAGuard.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49D72EB56A3300B07840 /* CAGuard.h */; };
|
||||
8B7A4A602EB56A3300B07840 /* CAAtomic.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49D82EB56A3300B07840 /* CAAtomic.h */; };
|
||||
8B7A4A612EB56A3300B07840 /* CAStreamBasicDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49D92EB56A3300B07840 /* CAStreamBasicDescription.h */; };
|
||||
8B7A4A622EB56A3300B07840 /* CACFObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49DA2EB56A3300B07840 /* CACFObject.h */; };
|
||||
8B7A4A632EB56A3300B07840 /* CAStreamRangedDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49DB2EB56A3300B07840 /* CAStreamRangedDescription.h */; };
|
||||
8B7A4A642EB56A3300B07840 /* CATokenMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49DC2EB56A3300B07840 /* CATokenMap.h */; };
|
||||
8B7A4A652EB56A3300B07840 /* CAComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49DD2EB56A3300B07840 /* CAComponent.h */; };
|
||||
8B7A4A662EB56A3300B07840 /* CAAudioBufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49DE2EB56A3300B07840 /* CAAudioBufferList.h */; };
|
||||
8B7A4A672EB56A3300B07840 /* CAAudioUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49DF2EB56A3300B07840 /* CAAudioUnit.h */; };
|
||||
8B7A4A682EB56A3300B07840 /* CAAUParameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49E02EB56A3300B07840 /* CAAUParameter.h */; };
|
||||
8B7A4A692EB56A3300B07840 /* CAException.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49E12EB56A3300B07840 /* CAException.h */; };
|
||||
8B7A4A6A2EB56A3300B07840 /* CAAUProcessor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49E22EB56A3300B07840 /* CAAUProcessor.cpp */; };
|
||||
8B7A4A6B2EB56A3300B07840 /* CAAUProcessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49E32EB56A3300B07840 /* CAAUProcessor.h */; };
|
||||
8B7A4A6C2EB56A3300B07840 /* CAProcess.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49E42EB56A3300B07840 /* CAProcess.h */; };
|
||||
8B7A4A6D2EB56A3300B07840 /* CACFDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49E52EB56A3300B07840 /* CACFDictionary.h */; };
|
||||
8B7A4A6E2EB56A3300B07840 /* CAPThread.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49E62EB56A3300B07840 /* CAPThread.h */; };
|
||||
8B7A4A6F2EB56A3300B07840 /* CAAUParameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49E72EB56A3300B07840 /* CAAUParameter.cpp */; };
|
||||
8B7A4A702EB56A3300B07840 /* CAAudioTimeStamp.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49E82EB56A3300B07840 /* CAAudioTimeStamp.h */; };
|
||||
8B7A4A712EB56A3300B07840 /* CAFilePathUtils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49E92EB56A3300B07840 /* CAFilePathUtils.cpp */; };
|
||||
8B7A4A722EB56A3300B07840 /* CAAudioValueRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49EA2EB56A3300B07840 /* CAAudioValueRange.h */; };
|
||||
8B7A4A732EB56A3300B07840 /* CAVectorUnitTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49EB2EB56A3300B07840 /* CAVectorUnitTypes.h */; };
|
||||
8B7A4A742EB56A3300B07840 /* CAAudioChannelLayoutObject.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49EC2EB56A3300B07840 /* CAAudioChannelLayoutObject.cpp */; };
|
||||
8B7A4A752EB56A3300B07840 /* CAGuard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49ED2EB56A3300B07840 /* CAGuard.cpp */; };
|
||||
8B7A4A762EB56A3300B07840 /* CACFNumber.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49EE2EB56A3300B07840 /* CACFNumber.h */; };
|
||||
8B7A4A772EB56A3300B07840 /* CACFDistributedNotification.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49EF2EB56A3300B07840 /* CACFDistributedNotification.cpp */; };
|
||||
8B7A4A782EB56A3300B07840 /* CACFString.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49F02EB56A3300B07840 /* CACFString.h */; };
|
||||
8B7A4A792EB56A3300B07840 /* CAAUMIDIMapManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49F12EB56A3300B07840 /* CAAUMIDIMapManager.cpp */; };
|
||||
8B7A4A7A2EB56A3300B07840 /* CAComponentDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49F22EB56A3300B07840 /* CAComponentDescription.cpp */; };
|
||||
8B7A4A7B2EB56A3300B07840 /* CAHostTimeBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49F32EB56A3300B07840 /* CAHostTimeBase.h */; };
|
||||
8B7A4A7C2EB56A3300B07840 /* CADebugMacros.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49F42EB56A3300B07840 /* CADebugMacros.cpp */; };
|
||||
8B7A4A7D2EB56A3300B07840 /* CAAudioFileFormats.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49F52EB56A3300B07840 /* CAAudioFileFormats.h */; };
|
||||
8B7A4A7E2EB56A3300B07840 /* CAAUMIDIMapManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49F62EB56A3300B07840 /* CAAUMIDIMapManager.h */; };
|
||||
8B7A4A7F2EB56A3300B07840 /* CACFDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49F72EB56A3300B07840 /* CACFDictionary.cpp */; };
|
||||
8B7A4A802EB56A3300B07840 /* CAMutex.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49F82EB56A3300B07840 /* CAMutex.h */; };
|
||||
8B7A4A812EB56A3300B07840 /* CACFString.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49F92EB56A3300B07840 /* CACFString.cpp */; };
|
||||
8B7A4A822EB56A3300B07840 /* CASettingsStorage.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49FA2EB56A3300B07840 /* CASettingsStorage.h */; };
|
||||
8B7A4A832EB56A3300B07840 /* CADebugPrintf.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49FB2EB56A3300B07840 /* CADebugPrintf.h */; };
|
||||
8B7A4A842EB56A3300B07840 /* CAXException.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A49FC2EB56A3300B07840 /* CAXException.cpp */; };
|
||||
8B7A4A852EB56A3300B07840 /* CAAUMIDIMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49FD2EB56A3300B07840 /* CAAUMIDIMap.h */; };
|
||||
8B7A4A862EB56A3300B07840 /* AUParamInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49FE2EB56A3300B07840 /* AUParamInfo.h */; };
|
||||
8B7A4A872EB56A3300B07840 /* CABitOperations.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A49FF2EB56A3300B07840 /* CABitOperations.h */; };
|
||||
8B7A4A882EB56A3300B07840 /* CACFPreferences.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A002EB56A3300B07840 /* CACFPreferences.cpp */; };
|
||||
8B7A4A892EB56A3300B07840 /* CABundleLocker.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A012EB56A3300B07840 /* CABundleLocker.h */; };
|
||||
8B7A4A8A2EB56A3300B07840 /* CAPropertyAddress.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A022EB56A3300B07840 /* CAPropertyAddress.h */; };
|
||||
8B7A4A8B2EB56A3300B07840 /* CAXException.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A032EB56A3300B07840 /* CAXException.h */; };
|
||||
8B7A4A8C2EB56A3300B07840 /* CAAudioChannelLayout.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A042EB56A3300B07840 /* CAAudioChannelLayout.cpp */; };
|
||||
8B7A4A8D2EB56A3300B07840 /* CAThreadSafeList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A052EB56A3300B07840 /* CAThreadSafeList.h */; };
|
||||
8B7A4A8E2EB56A3300B07840 /* CAAudioUnitOutputCapturer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A062EB56A3300B07840 /* CAAudioUnitOutputCapturer.h */; };
|
||||
8B7A4A8F2EB56A3300B07840 /* AUParamInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A072EB56A3300B07840 /* AUParamInfo.cpp */; };
|
||||
8B7A4A902EB56A3300B07840 /* CASharedLibrary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A082EB56A3300B07840 /* CASharedLibrary.cpp */; };
|
||||
8B7A4A912EB56A3300B07840 /* CAAUMIDIMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A092EB56A3300B07840 /* CAAUMIDIMap.cpp */; };
|
||||
8B7A4A922EB56A3300B07840 /* CALogMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A0A2EB56A3300B07840 /* CALogMacros.h */; };
|
||||
8B7A4A932EB56A3300B07840 /* CACFMessagePort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A0B2EB56A3300B07840 /* CACFMessagePort.cpp */; };
|
||||
8B7A4A942EB56A3300B07840 /* CARingBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A0C2EB56A3300B07840 /* CARingBuffer.h */; };
|
||||
8B7A4A952EB56A3300B07840 /* AUOutputBL.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A0D2EB56A3300B07840 /* AUOutputBL.cpp */; };
|
||||
8B7A4A962EB56A3300B07840 /* CABufferList.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A0E2EB56A3300B07840 /* CABufferList.h */; };
|
||||
8B7A4A972EB56A3300B07840 /* CASharedLibrary.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A0F2EB56A3300B07840 /* CASharedLibrary.h */; };
|
||||
8B7A4A982EB56A3300B07840 /* CACFData.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A102EB56A3300B07840 /* CACFData.h */; };
|
||||
8B7A4A992EB56A3300B07840 /* CAStreamRangedDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A112EB56A3300B07840 /* CAStreamRangedDescription.cpp */; };
|
||||
8B7A4A9A2EB56A3300B07840 /* CAPThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A122EB56A3300B07840 /* CAPThread.cpp */; };
|
||||
8B7A4A9B2EB56A3300B07840 /* CAAutoDisposer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A132EB56A3300B07840 /* CAAutoDisposer.h */; };
|
||||
8B7A4A9C2EB56A3300B07840 /* CACFPreferences.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A142EB56A3300B07840 /* CACFPreferences.h */; };
|
||||
8B7A4A9D2EB56A3300B07840 /* CAVectorUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A152EB56A3300B07840 /* CAVectorUnit.cpp */; };
|
||||
8B7A4A9E2EB56A3300B07840 /* CAComponentDescription.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A162EB56A3300B07840 /* CAComponentDescription.h */; };
|
||||
8B7A4A9F2EB56A3300B07840 /* CADebugMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A172EB56A3300B07840 /* CADebugMacros.h */; };
|
||||
8B7A4AA02EB56A3300B07840 /* AUOutputBL.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A182EB56A3300B07840 /* AUOutputBL.h */; };
|
||||
8B7A4AA12EB56A3300B07840 /* CADebugPrintf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A192EB56A3300B07840 /* CADebugPrintf.cpp */; };
|
||||
8B7A4AA22EB56A3300B07840 /* CARingBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A1A2EB56A3300B07840 /* CARingBuffer.cpp */; };
|
||||
8B7A4AA32EB56A3300B07840 /* CACFPlugIn.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A1B2EB56A3300B07840 /* CACFPlugIn.h */; };
|
||||
8B7A4AA42EB56A3300B07840 /* CASettingsStorage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A1C2EB56A3300B07840 /* CASettingsStorage.cpp */; };
|
||||
8B7A4AA52EB56A3300B07840 /* CAMixMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A1D2EB56A3300B07840 /* CAMixMap.h */; };
|
||||
8B7A4AA62EB56A3300B07840 /* CACFDistributedNotification.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A1E2EB56A3300B07840 /* CACFDistributedNotification.h */; };
|
||||
8B7A4AA72EB56A3300B07840 /* CAFilePathUtils.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A1F2EB56A3300B07840 /* CAFilePathUtils.h */; };
|
||||
8B7A4AA82EB56A3300B07840 /* CATink.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A202EB56A3300B07840 /* CATink.h */; };
|
||||
8B7A4AA92EB56A3300B07840 /* CAStreamBasicDescription.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A212EB56A3300B07840 /* CAStreamBasicDescription.cpp */; };
|
||||
8B7A4AAA2EB56A3300B07840 /* CAAudioChannelLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A222EB56A3300B07840 /* CAAudioChannelLayout.h */; };
|
||||
8B7A4AAB2EB56A3300B07840 /* CAProcess.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A232EB56A3300B07840 /* CAProcess.cpp */; };
|
||||
8B7A4AAC2EB56A3300B07840 /* CAHostTimeBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A242EB56A3300B07840 /* CAHostTimeBase.cpp */; };
|
||||
8B7A4AAD2EB56A3300B07840 /* CAPersistence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A252EB56A3300B07840 /* CAPersistence.cpp */; };
|
||||
8B7A4AAE2EB56A3300B07840 /* CAAudioBufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A262EB56A3300B07840 /* CAAudioBufferList.cpp */; };
|
||||
8B7A4AAF2EB56A3300B07840 /* CAAudioTimeStamp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A272EB56A3300B07840 /* CAAudioTimeStamp.cpp */; };
|
||||
8B7A4AB02EB56A3300B07840 /* CAVectorUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A282EB56A3300B07840 /* CAVectorUnit.h */; };
|
||||
8B7A4AB12EB56A3300B07840 /* CAByteOrder.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A292EB56A3300B07840 /* CAByteOrder.h */; };
|
||||
8B7A4AB22EB56A3300B07840 /* CACFArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A2A2EB56A3300B07840 /* CACFArray.h */; };
|
||||
8B7A4AB32EB56A3300B07840 /* CAAtomicStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A2B2EB56A3300B07840 /* CAAtomicStack.h */; };
|
||||
8B7A4AB42EB56A3300B07840 /* CAReferenceCounted.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A2C2EB56A3300B07840 /* CAReferenceCounted.h */; };
|
||||
8B7A4AB52EB56A3300B07840 /* CACFMachPort.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A2D2EB56A3300B07840 /* CACFMachPort.cpp */; };
|
||||
8B7A4AB62EB56A3300B07840 /* CABufferList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A2E2EB56A3300B07840 /* CABufferList.cpp */; };
|
||||
8B7A4AB72EB56A3300B07840 /* CAMutex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A2F2EB56A3300B07840 /* CAMutex.cpp */; };
|
||||
8B7A4AB82EB56A3300B07840 /* CADebugger.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A302EB56A3300B07840 /* CADebugger.cpp */; };
|
||||
8B7A4AB92EB56A3300B07840 /* CABundleLocker.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A312EB56A3300B07840 /* CABundleLocker.cpp */; };
|
||||
8B7A4ABA2EB56A3300B07840 /* CAAudioFileFormats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A322EB56A3300B07840 /* CAAudioFileFormats.cpp */; };
|
||||
8B7A4ABB2EB56A3300B07840 /* CAMath.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A332EB56A3300B07840 /* CAMath.h */; };
|
||||
8B7A4ABC2EB56A3300B07840 /* CACFArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A342EB56A3300B07840 /* CACFArray.cpp */; };
|
||||
8B7A4ABD2EB56A3300B07840 /* CACFMessagePort.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A352EB56A3300B07840 /* CACFMessagePort.h */; };
|
||||
8B7A4ABE2EB56A3300B07840 /* CAAudioValueRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A362EB56A3300B07840 /* CAAudioValueRange.cpp */; };
|
||||
8B7A4ABF2EB56A3300B07840 /* CAAudioUnit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A372EB56A3300B07840 /* CAAudioUnit.cpp */; };
|
||||
8B7A4AC02EB56A3300B07840 /* AUViewLocalizedStringKeys.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A3B2EB56A3300B07840 /* AUViewLocalizedStringKeys.h */; };
|
||||
8B7A4AC12EB56A3300B07840 /* ComponentBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A3D2EB56A3300B07840 /* ComponentBase.cpp */; };
|
||||
8B7A4AC22EB56A3300B07840 /* AUScopeElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A3E2EB56A3300B07840 /* AUScopeElement.cpp */; };
|
||||
8B7A4AC32EB56A3300B07840 /* ComponentBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A3F2EB56A3300B07840 /* ComponentBase.h */; };
|
||||
8B7A4AC42EB56A3300B07840 /* AUBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A402EB56A3300B07840 /* AUBase.cpp */; };
|
||||
8B7A4AC52EB56A3300B07840 /* AUInputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A412EB56A3300B07840 /* AUInputElement.h */; };
|
||||
8B7A4AC62EB56A3300B07840 /* AUBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A422EB56A3300B07840 /* AUBase.h */; };
|
||||
8B7A4AC72EB56A3300B07840 /* AUPlugInDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A432EB56A3300B07840 /* AUPlugInDispatch.h */; };
|
||||
8B7A4AC82EB56A3300B07840 /* AUDispatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A442EB56A3300B07840 /* AUDispatch.h */; };
|
||||
8B7A4AC92EB56A3300B07840 /* AUOutputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A452EB56A3300B07840 /* AUOutputElement.cpp */; };
|
||||
8B7A4ACB2EB56A3300B07840 /* AUPlugInDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A472EB56A3300B07840 /* AUPlugInDispatch.cpp */; };
|
||||
8B7A4ACC2EB56A3400B07840 /* AUOutputElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A482EB56A3300B07840 /* AUOutputElement.h */; };
|
||||
8B7A4ACD2EB56A3400B07840 /* AUDispatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A492EB56A3300B07840 /* AUDispatch.cpp */; };
|
||||
8B7A4ACE2EB56A3400B07840 /* AUScopeElement.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A4A2EB56A3300B07840 /* AUScopeElement.h */; };
|
||||
8B7A4ACF2EB56A3400B07840 /* AUInputElement.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A4B2EB56A3300B07840 /* AUInputElement.cpp */; };
|
||||
8B7A4AD02EB56A3400B07840 /* AUEffectBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A4D2EB56A3300B07840 /* AUEffectBase.cpp */; };
|
||||
8B7A4AD12EB56A3400B07840 /* AUEffectBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A4E2EB56A3300B07840 /* AUEffectBase.h */; };
|
||||
8B7A4AD22EB56A3400B07840 /* AUTimestampGenerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A502EB56A3300B07840 /* AUTimestampGenerator.h */; };
|
||||
8B7A4AD32EB56A3400B07840 /* AUBaseHelper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A512EB56A3300B07840 /* AUBaseHelper.cpp */; };
|
||||
8B7A4AD42EB56A3400B07840 /* AUSilentTimeout.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A522EB56A3300B07840 /* AUSilentTimeout.h */; };
|
||||
8B7A4AD52EB56A3400B07840 /* AUInputFormatConverter.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A532EB56A3300B07840 /* AUInputFormatConverter.h */; };
|
||||
8B7A4AD62EB56A3400B07840 /* AUTimestampGenerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A542EB56A3300B07840 /* AUTimestampGenerator.cpp */; };
|
||||
8B7A4AD72EB56A3400B07840 /* AUBuffer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8B7A4A552EB56A3300B07840 /* AUBuffer.cpp */; };
|
||||
8B7A4AD82EB56A3400B07840 /* AUMIDIDefs.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A562EB56A3300B07840 /* AUMIDIDefs.h */; };
|
||||
8B7A4AD92EB56A3400B07840 /* AUBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A572EB56A3300B07840 /* AUBuffer.h */; };
|
||||
8B7A4ADA2EB56A3400B07840 /* AUBaseHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = 8B7A4A582EB56A3300B07840 /* AUBaseHelper.h */; };
|
||||
8BA05A6B0720730100365D66 /* X2Buss.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 8BA05A660720730100365D66 /* X2Buss.cpp */; };
|
||||
8BA05A6E0720730100365D66 /* X2BussVersion.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BA05A690720730100365D66 /* X2BussVersion.h */; };
|
||||
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AF9072074E100365D66 /* AudioToolbox.framework */; };
|
||||
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05AFA072074E100365D66 /* AudioUnit.framework */; };
|
||||
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8BA05B01072074F900365D66 /* CoreServices.framework */; };
|
||||
8BC6025C073B072D006C4272 /* X2Buss.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC6025B073B072D006C4272 /* X2Buss.h */; };
|
||||
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C167DFE841241C02AAC07 /* InfoPlist.strings */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = /System/Library/Frameworks/CoreAudio.framework; sourceTree = "<absolute>"; };
|
||||
8B7A49D12EB56A3300B07840 /* CAExtAudioFile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAExtAudioFile.h; sourceTree = "<group>"; };
|
||||
8B7A49D22EB56A3300B07840 /* CACFMachPort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFMachPort.h; sourceTree = "<group>"; };
|
||||
8B7A49D32EB56A3300B07840 /* CABool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABool.h; sourceTree = "<group>"; };
|
||||
8B7A49D42EB56A3300B07840 /* CAComponent.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAComponent.cpp; sourceTree = "<group>"; };
|
||||
8B7A49D52EB56A3300B07840 /* CADebugger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugger.h; sourceTree = "<group>"; };
|
||||
8B7A49D62EB56A3300B07840 /* CACFNumber.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFNumber.cpp; sourceTree = "<group>"; };
|
||||
8B7A49D72EB56A3300B07840 /* CAGuard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAGuard.h; sourceTree = "<group>"; };
|
||||
8B7A49D82EB56A3300B07840 /* CAAtomic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAtomic.h; sourceTree = "<group>"; };
|
||||
8B7A49D92EB56A3300B07840 /* CAStreamBasicDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAStreamBasicDescription.h; sourceTree = "<group>"; };
|
||||
8B7A49DA2EB56A3300B07840 /* CACFObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFObject.h; sourceTree = "<group>"; };
|
||||
8B7A49DB2EB56A3300B07840 /* CAStreamRangedDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAStreamRangedDescription.h; sourceTree = "<group>"; };
|
||||
8B7A49DC2EB56A3300B07840 /* CATokenMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CATokenMap.h; sourceTree = "<group>"; };
|
||||
8B7A49DD2EB56A3300B07840 /* CAComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAComponent.h; sourceTree = "<group>"; };
|
||||
8B7A49DE2EB56A3300B07840 /* CAAudioBufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioBufferList.h; sourceTree = "<group>"; };
|
||||
8B7A49DF2EB56A3300B07840 /* CAAudioUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioUnit.h; sourceTree = "<group>"; };
|
||||
8B7A49E02EB56A3300B07840 /* CAAUParameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUParameter.h; sourceTree = "<group>"; };
|
||||
8B7A49E12EB56A3300B07840 /* CAException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAException.h; sourceTree = "<group>"; };
|
||||
8B7A49E22EB56A3300B07840 /* CAAUProcessor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUProcessor.cpp; sourceTree = "<group>"; };
|
||||
8B7A49E32EB56A3300B07840 /* CAAUProcessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUProcessor.h; sourceTree = "<group>"; };
|
||||
8B7A49E42EB56A3300B07840 /* CAProcess.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAProcess.h; sourceTree = "<group>"; };
|
||||
8B7A49E52EB56A3300B07840 /* CACFDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFDictionary.h; sourceTree = "<group>"; };
|
||||
8B7A49E62EB56A3300B07840 /* CAPThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPThread.h; sourceTree = "<group>"; };
|
||||
8B7A49E72EB56A3300B07840 /* CAAUParameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUParameter.cpp; sourceTree = "<group>"; };
|
||||
8B7A49E82EB56A3300B07840 /* CAAudioTimeStamp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioTimeStamp.h; sourceTree = "<group>"; };
|
||||
8B7A49E92EB56A3300B07840 /* CAFilePathUtils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAFilePathUtils.cpp; sourceTree = "<group>"; };
|
||||
8B7A49EA2EB56A3300B07840 /* CAAudioValueRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioValueRange.h; sourceTree = "<group>"; };
|
||||
8B7A49EB2EB56A3300B07840 /* CAVectorUnitTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAVectorUnitTypes.h; sourceTree = "<group>"; };
|
||||
8B7A49EC2EB56A3300B07840 /* CAAudioChannelLayoutObject.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayoutObject.cpp; sourceTree = "<group>"; };
|
||||
8B7A49ED2EB56A3300B07840 /* CAGuard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAGuard.cpp; sourceTree = "<group>"; };
|
||||
8B7A49EE2EB56A3300B07840 /* CACFNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFNumber.h; sourceTree = "<group>"; };
|
||||
8B7A49EF2EB56A3300B07840 /* CACFDistributedNotification.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFDistributedNotification.cpp; sourceTree = "<group>"; };
|
||||
8B7A49F02EB56A3300B07840 /* CACFString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFString.h; sourceTree = "<group>"; };
|
||||
8B7A49F12EB56A3300B07840 /* CAAUMIDIMapManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUMIDIMapManager.cpp; sourceTree = "<group>"; };
|
||||
8B7A49F22EB56A3300B07840 /* CAComponentDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAComponentDescription.cpp; sourceTree = "<group>"; };
|
||||
8B7A49F32EB56A3300B07840 /* CAHostTimeBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAHostTimeBase.h; sourceTree = "<group>"; };
|
||||
8B7A49F42EB56A3300B07840 /* CADebugMacros.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugMacros.cpp; sourceTree = "<group>"; };
|
||||
8B7A49F52EB56A3300B07840 /* CAAudioFileFormats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioFileFormats.h; sourceTree = "<group>"; };
|
||||
8B7A49F62EB56A3300B07840 /* CAAUMIDIMapManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUMIDIMapManager.h; sourceTree = "<group>"; };
|
||||
8B7A49F72EB56A3300B07840 /* CACFDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFDictionary.cpp; sourceTree = "<group>"; };
|
||||
8B7A49F82EB56A3300B07840 /* CAMutex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMutex.h; sourceTree = "<group>"; };
|
||||
8B7A49F92EB56A3300B07840 /* CACFString.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFString.cpp; sourceTree = "<group>"; };
|
||||
8B7A49FA2EB56A3300B07840 /* CASettingsStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASettingsStorage.h; sourceTree = "<group>"; };
|
||||
8B7A49FB2EB56A3300B07840 /* CADebugPrintf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugPrintf.h; sourceTree = "<group>"; };
|
||||
8B7A49FC2EB56A3300B07840 /* CAXException.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAXException.cpp; sourceTree = "<group>"; };
|
||||
8B7A49FD2EB56A3300B07840 /* CAAUMIDIMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAUMIDIMap.h; sourceTree = "<group>"; };
|
||||
8B7A49FE2EB56A3300B07840 /* AUParamInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUParamInfo.h; sourceTree = "<group>"; };
|
||||
8B7A49FF2EB56A3300B07840 /* CABitOperations.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABitOperations.h; sourceTree = "<group>"; };
|
||||
8B7A4A002EB56A3300B07840 /* CACFPreferences.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFPreferences.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A012EB56A3300B07840 /* CABundleLocker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABundleLocker.h; sourceTree = "<group>"; };
|
||||
8B7A4A022EB56A3300B07840 /* CAPropertyAddress.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAPropertyAddress.h; sourceTree = "<group>"; };
|
||||
8B7A4A032EB56A3300B07840 /* CAXException.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAXException.h; sourceTree = "<group>"; };
|
||||
8B7A4A042EB56A3300B07840 /* CAAudioChannelLayout.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioChannelLayout.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A052EB56A3300B07840 /* CAThreadSafeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAThreadSafeList.h; sourceTree = "<group>"; };
|
||||
8B7A4A062EB56A3300B07840 /* CAAudioUnitOutputCapturer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioUnitOutputCapturer.h; sourceTree = "<group>"; };
|
||||
8B7A4A072EB56A3300B07840 /* AUParamInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUParamInfo.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A082EB56A3300B07840 /* CASharedLibrary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CASharedLibrary.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A092EB56A3300B07840 /* CAAUMIDIMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAUMIDIMap.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A0A2EB56A3300B07840 /* CALogMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CALogMacros.h; sourceTree = "<group>"; };
|
||||
8B7A4A0B2EB56A3300B07840 /* CACFMessagePort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFMessagePort.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A0C2EB56A3300B07840 /* CARingBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CARingBuffer.h; sourceTree = "<group>"; };
|
||||
8B7A4A0D2EB56A3300B07840 /* AUOutputBL.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputBL.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A0E2EB56A3300B07840 /* CABufferList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CABufferList.h; sourceTree = "<group>"; };
|
||||
8B7A4A0F2EB56A3300B07840 /* CASharedLibrary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CASharedLibrary.h; sourceTree = "<group>"; };
|
||||
8B7A4A102EB56A3300B07840 /* CACFData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFData.h; sourceTree = "<group>"; };
|
||||
8B7A4A112EB56A3300B07840 /* CAStreamRangedDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamRangedDescription.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A122EB56A3300B07840 /* CAPThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPThread.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A132EB56A3300B07840 /* CAAutoDisposer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAutoDisposer.h; sourceTree = "<group>"; };
|
||||
8B7A4A142EB56A3300B07840 /* CACFPreferences.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFPreferences.h; sourceTree = "<group>"; };
|
||||
8B7A4A152EB56A3300B07840 /* CAVectorUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAVectorUnit.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A162EB56A3300B07840 /* CAComponentDescription.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAComponentDescription.h; sourceTree = "<group>"; };
|
||||
8B7A4A172EB56A3300B07840 /* CADebugMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CADebugMacros.h; sourceTree = "<group>"; };
|
||||
8B7A4A182EB56A3300B07840 /* AUOutputBL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUOutputBL.h; sourceTree = "<group>"; };
|
||||
8B7A4A192EB56A3300B07840 /* CADebugPrintf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugPrintf.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A1A2EB56A3300B07840 /* CARingBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CARingBuffer.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A1B2EB56A3300B07840 /* CACFPlugIn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFPlugIn.h; sourceTree = "<group>"; };
|
||||
8B7A4A1C2EB56A3300B07840 /* CASettingsStorage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CASettingsStorage.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A1D2EB56A3300B07840 /* CAMixMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMixMap.h; sourceTree = "<group>"; };
|
||||
8B7A4A1E2EB56A3300B07840 /* CACFDistributedNotification.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFDistributedNotification.h; sourceTree = "<group>"; };
|
||||
8B7A4A1F2EB56A3300B07840 /* CAFilePathUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAFilePathUtils.h; sourceTree = "<group>"; };
|
||||
8B7A4A202EB56A3300B07840 /* CATink.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CATink.h; sourceTree = "<group>"; };
|
||||
8B7A4A212EB56A3300B07840 /* CAStreamBasicDescription.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAStreamBasicDescription.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A222EB56A3300B07840 /* CAAudioChannelLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAudioChannelLayout.h; sourceTree = "<group>"; };
|
||||
8B7A4A232EB56A3300B07840 /* CAProcess.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAProcess.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A242EB56A3300B07840 /* CAHostTimeBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAHostTimeBase.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A252EB56A3300B07840 /* CAPersistence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAPersistence.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A262EB56A3300B07840 /* CAAudioBufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioBufferList.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A272EB56A3300B07840 /* CAAudioTimeStamp.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioTimeStamp.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A282EB56A3300B07840 /* CAVectorUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAVectorUnit.h; sourceTree = "<group>"; };
|
||||
8B7A4A292EB56A3300B07840 /* CAByteOrder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAByteOrder.h; sourceTree = "<group>"; };
|
||||
8B7A4A2A2EB56A3300B07840 /* CACFArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFArray.h; sourceTree = "<group>"; };
|
||||
8B7A4A2B2EB56A3300B07840 /* CAAtomicStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAAtomicStack.h; sourceTree = "<group>"; };
|
||||
8B7A4A2C2EB56A3300B07840 /* CAReferenceCounted.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAReferenceCounted.h; sourceTree = "<group>"; };
|
||||
8B7A4A2D2EB56A3300B07840 /* CACFMachPort.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFMachPort.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A2E2EB56A3300B07840 /* CABufferList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CABufferList.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A2F2EB56A3300B07840 /* CAMutex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAMutex.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A302EB56A3300B07840 /* CADebugger.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CADebugger.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A312EB56A3300B07840 /* CABundleLocker.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CABundleLocker.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A322EB56A3300B07840 /* CAAudioFileFormats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioFileFormats.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A332EB56A3300B07840 /* CAMath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CAMath.h; sourceTree = "<group>"; };
|
||||
8B7A4A342EB56A3300B07840 /* CACFArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CACFArray.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A352EB56A3300B07840 /* CACFMessagePort.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CACFMessagePort.h; sourceTree = "<group>"; };
|
||||
8B7A4A362EB56A3300B07840 /* CAAudioValueRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioValueRange.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A372EB56A3300B07840 /* CAAudioUnit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = CAAudioUnit.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A3B2EB56A3300B07840 /* AUViewLocalizedStringKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUViewLocalizedStringKeys.h; sourceTree = "<group>"; };
|
||||
8B7A4A3D2EB56A3300B07840 /* ComponentBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ComponentBase.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A3E2EB56A3300B07840 /* AUScopeElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUScopeElement.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A3F2EB56A3300B07840 /* ComponentBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ComponentBase.h; sourceTree = "<group>"; };
|
||||
8B7A4A402EB56A3300B07840 /* AUBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBase.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A412EB56A3300B07840 /* AUInputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUInputElement.h; sourceTree = "<group>"; };
|
||||
8B7A4A422EB56A3300B07840 /* AUBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBase.h; sourceTree = "<group>"; };
|
||||
8B7A4A432EB56A3300B07840 /* AUPlugInDispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUPlugInDispatch.h; sourceTree = "<group>"; };
|
||||
8B7A4A442EB56A3300B07840 /* AUDispatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUDispatch.h; sourceTree = "<group>"; };
|
||||
8B7A4A452EB56A3300B07840 /* AUOutputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUOutputElement.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A462EB56A3300B07840 /* AUResources.r */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.rez; path = AUResources.r; sourceTree = "<group>"; };
|
||||
8B7A4A472EB56A3300B07840 /* AUPlugInDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUPlugInDispatch.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A482EB56A3300B07840 /* AUOutputElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUOutputElement.h; sourceTree = "<group>"; };
|
||||
8B7A4A492EB56A3300B07840 /* AUDispatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUDispatch.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A4A2EB56A3300B07840 /* AUScopeElement.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUScopeElement.h; sourceTree = "<group>"; };
|
||||
8B7A4A4B2EB56A3300B07840 /* AUInputElement.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUInputElement.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A4D2EB56A3300B07840 /* AUEffectBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUEffectBase.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A4E2EB56A3300B07840 /* AUEffectBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUEffectBase.h; sourceTree = "<group>"; };
|
||||
8B7A4A502EB56A3300B07840 /* AUTimestampGenerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUTimestampGenerator.h; sourceTree = "<group>"; };
|
||||
8B7A4A512EB56A3300B07840 /* AUBaseHelper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBaseHelper.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A522EB56A3300B07840 /* AUSilentTimeout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUSilentTimeout.h; sourceTree = "<group>"; };
|
||||
8B7A4A532EB56A3300B07840 /* AUInputFormatConverter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUInputFormatConverter.h; sourceTree = "<group>"; };
|
||||
8B7A4A542EB56A3300B07840 /* AUTimestampGenerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUTimestampGenerator.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A552EB56A3300B07840 /* AUBuffer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AUBuffer.cpp; sourceTree = "<group>"; };
|
||||
8B7A4A562EB56A3300B07840 /* AUMIDIDefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUMIDIDefs.h; sourceTree = "<group>"; };
|
||||
8B7A4A572EB56A3300B07840 /* AUBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBuffer.h; sourceTree = "<group>"; };
|
||||
8B7A4A582EB56A3300B07840 /* AUBaseHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AUBaseHelper.h; sourceTree = "<group>"; };
|
||||
8B7A4ADB2EB56CAF00B07840 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||
8BA05A660720730100365D66 /* X2Buss.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = X2Buss.cpp; sourceTree = "<group>"; };
|
||||
8BA05A670720730100365D66 /* X2Buss.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; path = X2Buss.exp; sourceTree = "<group>"; };
|
||||
8BA05A680720730100365D66 /* X2Buss.r */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.rez; path = X2Buss.r; sourceTree = "<group>"; };
|
||||
8BA05A690720730100365D66 /* X2BussVersion.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X2BussVersion.h; sourceTree = "<group>"; };
|
||||
8BA05AF9072074E100365D66 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = /System/Library/Frameworks/AudioToolbox.framework; sourceTree = "<absolute>"; };
|
||||
8BA05AFA072074E100365D66 /* AudioUnit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioUnit.framework; path = /System/Library/Frameworks/AudioUnit.framework; sourceTree = "<absolute>"; };
|
||||
8BA05B01072074F900365D66 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
|
||||
8BC6025B073B072D006C4272 /* X2Buss.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = X2Buss.h; sourceTree = "<group>"; };
|
||||
8D01CCD10486CAD60068D4B7 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
|
||||
8D01CCD20486CAD60068D4B7 /* X2Buss.component */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = X2Buss.component; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
8D01CCCD0486CAD60068D4B7 /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8BA05AFC072074E100365D66 /* AudioToolbox.framework in Frameworks */,
|
||||
8BA05AFD072074E100365D66 /* AudioUnit.framework in Frameworks */,
|
||||
8BA05B02072074F900365D66 /* CoreServices.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
089C166AFE841209C02AAC07 /* X2Buss */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
08FB77ADFE841716C02AAC07 /* Source */,
|
||||
089C167CFE841241C02AAC07 /* Resources */,
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */,
|
||||
19C28FB4FE9D528D11CA2CBB /* Products */,
|
||||
);
|
||||
name = X2Buss;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C1671FE841209C02AAC07 /* External Frameworks and Libraries */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B5C7FBF076FB2C200A15F61 /* CoreAudio.framework */,
|
||||
8BA05B01072074F900365D66 /* CoreServices.framework */,
|
||||
8BA05AF9072074E100365D66 /* AudioToolbox.framework */,
|
||||
8BA05AFA072074E100365D66 /* AudioUnit.framework */,
|
||||
);
|
||||
name = "External Frameworks and Libraries";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
089C167CFE841241C02AAC07 /* Resources */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D01CCD10486CAD60068D4B7 /* Info.plist */,
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */,
|
||||
);
|
||||
name = Resources;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
08FB77ADFE841716C02AAC07 /* Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A49CF2EB56A3300B07840 /* CA_SDK */,
|
||||
8BA05A56072072A900365D66 /* AU Source */,
|
||||
);
|
||||
name = Source;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
19C28FB4FE9D528D11CA2CBB /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8D01CCD20486CAD60068D4B7 /* X2Buss.component */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8B7A49CF2EB56A3300B07840 /* CA_SDK */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A49D02EB56A3300B07840 /* PublicUtility */,
|
||||
8B7A4A382EB56A3300B07840 /* AudioUnits */,
|
||||
);
|
||||
name = CA_SDK;
|
||||
path = ../../../../CA_SDK;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8B7A49D02EB56A3300B07840 /* PublicUtility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A49D12EB56A3300B07840 /* CAExtAudioFile.h */,
|
||||
8B7A49D22EB56A3300B07840 /* CACFMachPort.h */,
|
||||
8B7A49D32EB56A3300B07840 /* CABool.h */,
|
||||
8B7A49D42EB56A3300B07840 /* CAComponent.cpp */,
|
||||
8B7A49D52EB56A3300B07840 /* CADebugger.h */,
|
||||
8B7A49D62EB56A3300B07840 /* CACFNumber.cpp */,
|
||||
8B7A49D72EB56A3300B07840 /* CAGuard.h */,
|
||||
8B7A49D82EB56A3300B07840 /* CAAtomic.h */,
|
||||
8B7A49D92EB56A3300B07840 /* CAStreamBasicDescription.h */,
|
||||
8B7A49DA2EB56A3300B07840 /* CACFObject.h */,
|
||||
8B7A49DB2EB56A3300B07840 /* CAStreamRangedDescription.h */,
|
||||
8B7A49DC2EB56A3300B07840 /* CATokenMap.h */,
|
||||
8B7A49DD2EB56A3300B07840 /* CAComponent.h */,
|
||||
8B7A49DE2EB56A3300B07840 /* CAAudioBufferList.h */,
|
||||
8B7A49DF2EB56A3300B07840 /* CAAudioUnit.h */,
|
||||
8B7A49E02EB56A3300B07840 /* CAAUParameter.h */,
|
||||
8B7A49E12EB56A3300B07840 /* CAException.h */,
|
||||
8B7A49E22EB56A3300B07840 /* CAAUProcessor.cpp */,
|
||||
8B7A49E32EB56A3300B07840 /* CAAUProcessor.h */,
|
||||
8B7A49E42EB56A3300B07840 /* CAProcess.h */,
|
||||
8B7A49E52EB56A3300B07840 /* CACFDictionary.h */,
|
||||
8B7A49E62EB56A3300B07840 /* CAPThread.h */,
|
||||
8B7A49E72EB56A3300B07840 /* CAAUParameter.cpp */,
|
||||
8B7A49E82EB56A3300B07840 /* CAAudioTimeStamp.h */,
|
||||
8B7A49E92EB56A3300B07840 /* CAFilePathUtils.cpp */,
|
||||
8B7A49EA2EB56A3300B07840 /* CAAudioValueRange.h */,
|
||||
8B7A49EB2EB56A3300B07840 /* CAVectorUnitTypes.h */,
|
||||
8B7A49EC2EB56A3300B07840 /* CAAudioChannelLayoutObject.cpp */,
|
||||
8B7A49ED2EB56A3300B07840 /* CAGuard.cpp */,
|
||||
8B7A49EE2EB56A3300B07840 /* CACFNumber.h */,
|
||||
8B7A49EF2EB56A3300B07840 /* CACFDistributedNotification.cpp */,
|
||||
8B7A49F02EB56A3300B07840 /* CACFString.h */,
|
||||
8B7A49F12EB56A3300B07840 /* CAAUMIDIMapManager.cpp */,
|
||||
8B7A49F22EB56A3300B07840 /* CAComponentDescription.cpp */,
|
||||
8B7A49F32EB56A3300B07840 /* CAHostTimeBase.h */,
|
||||
8B7A49F42EB56A3300B07840 /* CADebugMacros.cpp */,
|
||||
8B7A49F52EB56A3300B07840 /* CAAudioFileFormats.h */,
|
||||
8B7A49F62EB56A3300B07840 /* CAAUMIDIMapManager.h */,
|
||||
8B7A49F72EB56A3300B07840 /* CACFDictionary.cpp */,
|
||||
8B7A49F82EB56A3300B07840 /* CAMutex.h */,
|
||||
8B7A49F92EB56A3300B07840 /* CACFString.cpp */,
|
||||
8B7A49FA2EB56A3300B07840 /* CASettingsStorage.h */,
|
||||
8B7A49FB2EB56A3300B07840 /* CADebugPrintf.h */,
|
||||
8B7A49FC2EB56A3300B07840 /* CAXException.cpp */,
|
||||
8B7A49FD2EB56A3300B07840 /* CAAUMIDIMap.h */,
|
||||
8B7A49FE2EB56A3300B07840 /* AUParamInfo.h */,
|
||||
8B7A49FF2EB56A3300B07840 /* CABitOperations.h */,
|
||||
8B7A4A002EB56A3300B07840 /* CACFPreferences.cpp */,
|
||||
8B7A4A012EB56A3300B07840 /* CABundleLocker.h */,
|
||||
8B7A4A022EB56A3300B07840 /* CAPropertyAddress.h */,
|
||||
8B7A4A032EB56A3300B07840 /* CAXException.h */,
|
||||
8B7A4A042EB56A3300B07840 /* CAAudioChannelLayout.cpp */,
|
||||
8B7A4A052EB56A3300B07840 /* CAThreadSafeList.h */,
|
||||
8B7A4A062EB56A3300B07840 /* CAAudioUnitOutputCapturer.h */,
|
||||
8B7A4A072EB56A3300B07840 /* AUParamInfo.cpp */,
|
||||
8B7A4A082EB56A3300B07840 /* CASharedLibrary.cpp */,
|
||||
8B7A4A092EB56A3300B07840 /* CAAUMIDIMap.cpp */,
|
||||
8B7A4A0A2EB56A3300B07840 /* CALogMacros.h */,
|
||||
8B7A4A0B2EB56A3300B07840 /* CACFMessagePort.cpp */,
|
||||
8B7A4A0C2EB56A3300B07840 /* CARingBuffer.h */,
|
||||
8B7A4A0D2EB56A3300B07840 /* AUOutputBL.cpp */,
|
||||
8B7A4A0E2EB56A3300B07840 /* CABufferList.h */,
|
||||
8B7A4A0F2EB56A3300B07840 /* CASharedLibrary.h */,
|
||||
8B7A4A102EB56A3300B07840 /* CACFData.h */,
|
||||
8B7A4A112EB56A3300B07840 /* CAStreamRangedDescription.cpp */,
|
||||
8B7A4A122EB56A3300B07840 /* CAPThread.cpp */,
|
||||
8B7A4A132EB56A3300B07840 /* CAAutoDisposer.h */,
|
||||
8B7A4A142EB56A3300B07840 /* CACFPreferences.h */,
|
||||
8B7A4A152EB56A3300B07840 /* CAVectorUnit.cpp */,
|
||||
8B7A4A162EB56A3300B07840 /* CAComponentDescription.h */,
|
||||
8B7A4A172EB56A3300B07840 /* CADebugMacros.h */,
|
||||
8B7A4A182EB56A3300B07840 /* AUOutputBL.h */,
|
||||
8B7A4A192EB56A3300B07840 /* CADebugPrintf.cpp */,
|
||||
8B7A4A1A2EB56A3300B07840 /* CARingBuffer.cpp */,
|
||||
8B7A4A1B2EB56A3300B07840 /* CACFPlugIn.h */,
|
||||
8B7A4A1C2EB56A3300B07840 /* CASettingsStorage.cpp */,
|
||||
8B7A4A1D2EB56A3300B07840 /* CAMixMap.h */,
|
||||
8B7A4A1E2EB56A3300B07840 /* CACFDistributedNotification.h */,
|
||||
8B7A4A1F2EB56A3300B07840 /* CAFilePathUtils.h */,
|
||||
8B7A4A202EB56A3300B07840 /* CATink.h */,
|
||||
8B7A4A212EB56A3300B07840 /* CAStreamBasicDescription.cpp */,
|
||||
8B7A4A222EB56A3300B07840 /* CAAudioChannelLayout.h */,
|
||||
8B7A4A232EB56A3300B07840 /* CAProcess.cpp */,
|
||||
8B7A4A242EB56A3300B07840 /* CAHostTimeBase.cpp */,
|
||||
8B7A4A252EB56A3300B07840 /* CAPersistence.cpp */,
|
||||
8B7A4A262EB56A3300B07840 /* CAAudioBufferList.cpp */,
|
||||
8B7A4A272EB56A3300B07840 /* CAAudioTimeStamp.cpp */,
|
||||
8B7A4A282EB56A3300B07840 /* CAVectorUnit.h */,
|
||||
8B7A4A292EB56A3300B07840 /* CAByteOrder.h */,
|
||||
8B7A4A2A2EB56A3300B07840 /* CACFArray.h */,
|
||||
8B7A4A2B2EB56A3300B07840 /* CAAtomicStack.h */,
|
||||
8B7A4A2C2EB56A3300B07840 /* CAReferenceCounted.h */,
|
||||
8B7A4A2D2EB56A3300B07840 /* CACFMachPort.cpp */,
|
||||
8B7A4A2E2EB56A3300B07840 /* CABufferList.cpp */,
|
||||
8B7A4A2F2EB56A3300B07840 /* CAMutex.cpp */,
|
||||
8B7A4A302EB56A3300B07840 /* CADebugger.cpp */,
|
||||
8B7A4A312EB56A3300B07840 /* CABundleLocker.cpp */,
|
||||
8B7A4A322EB56A3300B07840 /* CAAudioFileFormats.cpp */,
|
||||
8B7A4A332EB56A3300B07840 /* CAMath.h */,
|
||||
8B7A4A342EB56A3300B07840 /* CACFArray.cpp */,
|
||||
8B7A4A352EB56A3300B07840 /* CACFMessagePort.h */,
|
||||
8B7A4A362EB56A3300B07840 /* CAAudioValueRange.cpp */,
|
||||
8B7A4A372EB56A3300B07840 /* CAAudioUnit.cpp */,
|
||||
);
|
||||
path = PublicUtility;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8B7A4A382EB56A3300B07840 /* AudioUnits */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A4A392EB56A3300B07840 /* AUPublic */,
|
||||
);
|
||||
path = AudioUnits;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8B7A4A392EB56A3300B07840 /* AUPublic */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A4A3A2EB56A3300B07840 /* AUViewBase */,
|
||||
8B7A4A3C2EB56A3300B07840 /* AUBase */,
|
||||
8B7A4A4C2EB56A3300B07840 /* OtherBases */,
|
||||
8B7A4A4F2EB56A3300B07840 /* Utility */,
|
||||
);
|
||||
path = AUPublic;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8B7A4A3A2EB56A3300B07840 /* AUViewBase */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A4A3B2EB56A3300B07840 /* AUViewLocalizedStringKeys.h */,
|
||||
);
|
||||
path = AUViewBase;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8B7A4A3C2EB56A3300B07840 /* AUBase */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A4A3D2EB56A3300B07840 /* ComponentBase.cpp */,
|
||||
8B7A4A3E2EB56A3300B07840 /* AUScopeElement.cpp */,
|
||||
8B7A4A3F2EB56A3300B07840 /* ComponentBase.h */,
|
||||
8B7A4A402EB56A3300B07840 /* AUBase.cpp */,
|
||||
8B7A4A412EB56A3300B07840 /* AUInputElement.h */,
|
||||
8B7A4A422EB56A3300B07840 /* AUBase.h */,
|
||||
8B7A4A432EB56A3300B07840 /* AUPlugInDispatch.h */,
|
||||
8B7A4A442EB56A3300B07840 /* AUDispatch.h */,
|
||||
8B7A4A452EB56A3300B07840 /* AUOutputElement.cpp */,
|
||||
8B7A4A462EB56A3300B07840 /* AUResources.r */,
|
||||
8B7A4A472EB56A3300B07840 /* AUPlugInDispatch.cpp */,
|
||||
8B7A4A482EB56A3300B07840 /* AUOutputElement.h */,
|
||||
8B7A4A492EB56A3300B07840 /* AUDispatch.cpp */,
|
||||
8B7A4A4A2EB56A3300B07840 /* AUScopeElement.h */,
|
||||
8B7A4A4B2EB56A3300B07840 /* AUInputElement.cpp */,
|
||||
);
|
||||
path = AUBase;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8B7A4A4C2EB56A3300B07840 /* OtherBases */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A4A4D2EB56A3300B07840 /* AUEffectBase.cpp */,
|
||||
8B7A4A4E2EB56A3300B07840 /* AUEffectBase.h */,
|
||||
);
|
||||
path = OtherBases;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8B7A4A4F2EB56A3300B07840 /* Utility */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8B7A4A502EB56A3300B07840 /* AUTimestampGenerator.h */,
|
||||
8B7A4A512EB56A3300B07840 /* AUBaseHelper.cpp */,
|
||||
8B7A4A522EB56A3300B07840 /* AUSilentTimeout.h */,
|
||||
8B7A4A532EB56A3300B07840 /* AUInputFormatConverter.h */,
|
||||
8B7A4A542EB56A3300B07840 /* AUTimestampGenerator.cpp */,
|
||||
8B7A4A552EB56A3300B07840 /* AUBuffer.cpp */,
|
||||
8B7A4A562EB56A3300B07840 /* AUMIDIDefs.h */,
|
||||
8B7A4A572EB56A3300B07840 /* AUBuffer.h */,
|
||||
8B7A4A582EB56A3300B07840 /* AUBaseHelper.h */,
|
||||
);
|
||||
path = Utility;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
8BA05A56072072A900365D66 /* AU Source */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
8BC6025B073B072D006C4272 /* X2Buss.h */,
|
||||
8BA05A660720730100365D66 /* X2Buss.cpp */,
|
||||
8BA05A670720730100365D66 /* X2Buss.exp */,
|
||||
8BA05A680720730100365D66 /* X2Buss.r */,
|
||||
8BA05A690720730100365D66 /* X2BussVersion.h */,
|
||||
);
|
||||
name = "AU Source";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXHeadersBuildPhase section */
|
||||
8D01CCC70486CAD60068D4B7 /* Headers */ = {
|
||||
isa = PBXHeadersBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8B7A4A892EB56A3300B07840 /* CABundleLocker.h in Headers */,
|
||||
8B7A4AAA2EB56A3300B07840 /* CAAudioChannelLayout.h in Headers */,
|
||||
8B7A4AA02EB56A3300B07840 /* AUOutputBL.h in Headers */,
|
||||
8B7A4A7B2EB56A3300B07840 /* CAHostTimeBase.h in Headers */,
|
||||
8B7A4AC32EB56A3300B07840 /* ComponentBase.h in Headers */,
|
||||
8B7A4AB32EB56A3300B07840 /* CAAtomicStack.h in Headers */,
|
||||
8B7A4A702EB56A3300B07840 /* CAAudioTimeStamp.h in Headers */,
|
||||
8B7A4A8D2EB56A3300B07840 /* CAThreadSafeList.h in Headers */,
|
||||
8B7A4A682EB56A3300B07840 /* CAAUParameter.h in Headers */,
|
||||
8B7A4ADA2EB56A3400B07840 /* AUBaseHelper.h in Headers */,
|
||||
8B7A4AD22EB56A3400B07840 /* AUTimestampGenerator.h in Headers */,
|
||||
8B7A4A832EB56A3300B07840 /* CADebugPrintf.h in Headers */,
|
||||
8B7A4ABD2EB56A3300B07840 /* CACFMessagePort.h in Headers */,
|
||||
8B7A4A6B2EB56A3300B07840 /* CAAUProcessor.h in Headers */,
|
||||
8B7A4A672EB56A3300B07840 /* CAAudioUnit.h in Headers */,
|
||||
8B7A4AC02EB56A3300B07840 /* AUViewLocalizedStringKeys.h in Headers */,
|
||||
8B7A4AA62EB56A3300B07840 /* CACFDistributedNotification.h in Headers */,
|
||||
8B7A4A652EB56A3300B07840 /* CAComponent.h in Headers */,
|
||||
8B7A4A732EB56A3300B07840 /* CAVectorUnitTypes.h in Headers */,
|
||||
8BA05A6E0720730100365D66 /* X2BussVersion.h in Headers */,
|
||||
8B7A4AA72EB56A3300B07840 /* CAFilePathUtils.h in Headers */,
|
||||
8B7A4A692EB56A3300B07840 /* CAException.h in Headers */,
|
||||
8B7A4A602EB56A3300B07840 /* CAAtomic.h in Headers */,
|
||||
8B7A4A5F2EB56A3300B07840 /* CAGuard.h in Headers */,
|
||||
8B7A4AC52EB56A3300B07840 /* AUInputElement.h in Headers */,
|
||||
8B7A4A9C2EB56A3300B07840 /* CACFPreferences.h in Headers */,
|
||||
8B7A4AB12EB56A3300B07840 /* CAByteOrder.h in Headers */,
|
||||
8B7A4A942EB56A3300B07840 /* CARingBuffer.h in Headers */,
|
||||
8B7A4A5B2EB56A3300B07840 /* CABool.h in Headers */,
|
||||
8B7A4A802EB56A3300B07840 /* CAMutex.h in Headers */,
|
||||
8B7A4AC62EB56A3300B07840 /* AUBase.h in Headers */,
|
||||
8BC6025C073B072D006C4272 /* X2Buss.h in Headers */,
|
||||
8B7A4A782EB56A3300B07840 /* CACFString.h in Headers */,
|
||||
8B7A4A972EB56A3300B07840 /* CASharedLibrary.h in Headers */,
|
||||
8B7A4A642EB56A3300B07840 /* CATokenMap.h in Headers */,
|
||||
8B7A4A592EB56A3300B07840 /* CAExtAudioFile.h in Headers */,
|
||||
8B7A4A6E2EB56A3300B07840 /* CAPThread.h in Headers */,
|
||||
8B7A4A8A2EB56A3300B07840 /* CAPropertyAddress.h in Headers */,
|
||||
8B7A4AB42EB56A3300B07840 /* CAReferenceCounted.h in Headers */,
|
||||
8B7A4AD92EB56A3400B07840 /* AUBuffer.h in Headers */,
|
||||
8B7A4ABB2EB56A3300B07840 /* CAMath.h in Headers */,
|
||||
8B7A4A9B2EB56A3300B07840 /* CAAutoDisposer.h in Headers */,
|
||||
8B7A4A622EB56A3300B07840 /* CACFObject.h in Headers */,
|
||||
8B7A4A822EB56A3300B07840 /* CASettingsStorage.h in Headers */,
|
||||
8B7A4A8B2EB56A3300B07840 /* CAXException.h in Headers */,
|
||||
8B7A4AA82EB56A3300B07840 /* CATink.h in Headers */,
|
||||
8B7A4AD52EB56A3400B07840 /* AUInputFormatConverter.h in Headers */,
|
||||
8B7A4AB02EB56A3300B07840 /* CAVectorUnit.h in Headers */,
|
||||
8B7A4A6C2EB56A3300B07840 /* CAProcess.h in Headers */,
|
||||
8B7A4A722EB56A3300B07840 /* CAAudioValueRange.h in Headers */,
|
||||
8B7A4A872EB56A3300B07840 /* CABitOperations.h in Headers */,
|
||||
8B7A4A7D2EB56A3300B07840 /* CAAudioFileFormats.h in Headers */,
|
||||
8B7A4A762EB56A3300B07840 /* CACFNumber.h in Headers */,
|
||||
8B7A4A8E2EB56A3300B07840 /* CAAudioUnitOutputCapturer.h in Headers */,
|
||||
8B7A4A9F2EB56A3300B07840 /* CADebugMacros.h in Headers */,
|
||||
8B7A4AD82EB56A3400B07840 /* AUMIDIDefs.h in Headers */,
|
||||
8B7A4A982EB56A3300B07840 /* CACFData.h in Headers */,
|
||||
8B7A4A612EB56A3300B07840 /* CAStreamBasicDescription.h in Headers */,
|
||||
8B7A4AC72EB56A3300B07840 /* AUPlugInDispatch.h in Headers */,
|
||||
8B7A4A632EB56A3300B07840 /* CAStreamRangedDescription.h in Headers */,
|
||||
8B7A4AA32EB56A3300B07840 /* CACFPlugIn.h in Headers */,
|
||||
8B7A4A662EB56A3300B07840 /* CAAudioBufferList.h in Headers */,
|
||||
8B7A4A7E2EB56A3300B07840 /* CAAUMIDIMapManager.h in Headers */,
|
||||
8B7A4AD12EB56A3400B07840 /* AUEffectBase.h in Headers */,
|
||||
8B7A4A6D2EB56A3300B07840 /* CACFDictionary.h in Headers */,
|
||||
8B7A4ACE2EB56A3400B07840 /* AUScopeElement.h in Headers */,
|
||||
8B7A4A9E2EB56A3300B07840 /* CAComponentDescription.h in Headers */,
|
||||
8B7A4AD42EB56A3400B07840 /* AUSilentTimeout.h in Headers */,
|
||||
8B7A4A962EB56A3300B07840 /* CABufferList.h in Headers */,
|
||||
8B7A4AC82EB56A3300B07840 /* AUDispatch.h in Headers */,
|
||||
8B7A4ACC2EB56A3400B07840 /* AUOutputElement.h in Headers */,
|
||||
8B7A4A922EB56A3300B07840 /* CALogMacros.h in Headers */,
|
||||
8B7A4A862EB56A3300B07840 /* AUParamInfo.h in Headers */,
|
||||
8B7A4AA52EB56A3300B07840 /* CAMixMap.h in Headers */,
|
||||
8B7A4AB22EB56A3300B07840 /* CACFArray.h in Headers */,
|
||||
8B7A4A5A2EB56A3300B07840 /* CACFMachPort.h in Headers */,
|
||||
8B7A4A852EB56A3300B07840 /* CAAUMIDIMap.h in Headers */,
|
||||
8B7A4A5D2EB56A3300B07840 /* CADebugger.h in Headers */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXHeadersBuildPhase section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
8D01CCC60486CAD60068D4B7 /* X2Buss */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "X2Buss" */;
|
||||
buildPhases = (
|
||||
8D01CCC70486CAD60068D4B7 /* Headers */,
|
||||
8D01CCC90486CAD60068D4B7 /* Resources */,
|
||||
8D01CCCB0486CAD60068D4B7 /* Sources */,
|
||||
8D01CCCD0486CAD60068D4B7 /* Frameworks */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = X2Buss;
|
||||
productInstallPath = "$(HOME)/Library/Bundles";
|
||||
productName = X2Buss;
|
||||
productReference = 8D01CCD20486CAD60068D4B7 /* X2Buss.component */;
|
||||
productType = "com.apple.product-type.bundle";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 1420;
|
||||
};
|
||||
buildConfigurationList = 3E4BA247089833B7007656EC /* Build configuration list for PBXProject "X2Buss" */;
|
||||
compatibilityVersion = "Xcode 3.1";
|
||||
developmentRegion = en;
|
||||
hasScannedForEncodings = 1;
|
||||
knownRegions = (
|
||||
de,
|
||||
Base,
|
||||
fr,
|
||||
en,
|
||||
ja,
|
||||
);
|
||||
mainGroup = 089C166AFE841209C02AAC07 /* X2Buss */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
8D01CCC60486CAD60068D4B7 /* X2Buss */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
8D01CCC90486CAD60068D4B7 /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8D01CCCA0486CAD60068D4B7 /* InfoPlist.strings in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
8D01CCCB0486CAD60068D4B7 /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
8B7A4A952EB56A3300B07840 /* AUOutputBL.cpp in Sources */,
|
||||
8B7A4ABA2EB56A3300B07840 /* CAAudioFileFormats.cpp in Sources */,
|
||||
8B7A4AAC2EB56A3300B07840 /* CAHostTimeBase.cpp in Sources */,
|
||||
8B7A4A842EB56A3300B07840 /* CAXException.cpp in Sources */,
|
||||
8B7A4AAE2EB56A3300B07840 /* CAAudioBufferList.cpp in Sources */,
|
||||
8B7A4A712EB56A3300B07840 /* CAFilePathUtils.cpp in Sources */,
|
||||
8B7A4A6F2EB56A3300B07840 /* CAAUParameter.cpp in Sources */,
|
||||
8B7A4A912EB56A3300B07840 /* CAAUMIDIMap.cpp in Sources */,
|
||||
8B7A4ABE2EB56A3300B07840 /* CAAudioValueRange.cpp in Sources */,
|
||||
8B7A4ACD2EB56A3400B07840 /* AUDispatch.cpp in Sources */,
|
||||
8B7A4A882EB56A3300B07840 /* CACFPreferences.cpp in Sources */,
|
||||
8B7A4ACB2EB56A3300B07840 /* AUPlugInDispatch.cpp in Sources */,
|
||||
8B7A4A6A2EB56A3300B07840 /* CAAUProcessor.cpp in Sources */,
|
||||
8B7A4A7F2EB56A3300B07840 /* CACFDictionary.cpp in Sources */,
|
||||
8B7A4AD32EB56A3400B07840 /* AUBaseHelper.cpp in Sources */,
|
||||
8B7A4AB82EB56A3300B07840 /* CADebugger.cpp in Sources */,
|
||||
8B7A4A8C2EB56A3300B07840 /* CAAudioChannelLayout.cpp in Sources */,
|
||||
8B7A4A8F2EB56A3300B07840 /* AUParamInfo.cpp in Sources */,
|
||||
8B7A4AAD2EB56A3300B07840 /* CAPersistence.cpp in Sources */,
|
||||
8B7A4AA12EB56A3300B07840 /* CADebugPrintf.cpp in Sources */,
|
||||
8B7A4AD62EB56A3400B07840 /* AUTimestampGenerator.cpp in Sources */,
|
||||
8B7A4AA92EB56A3300B07840 /* CAStreamBasicDescription.cpp in Sources */,
|
||||
8B7A4A792EB56A3300B07840 /* CAAUMIDIMapManager.cpp in Sources */,
|
||||
8B7A4AA42EB56A3300B07840 /* CASettingsStorage.cpp in Sources */,
|
||||
8B7A4AC92EB56A3300B07840 /* AUOutputElement.cpp in Sources */,
|
||||
8B7A4A752EB56A3300B07840 /* CAGuard.cpp in Sources */,
|
||||
8BA05A6B0720730100365D66 /* X2Buss.cpp in Sources */,
|
||||
8B7A4AB72EB56A3300B07840 /* CAMutex.cpp in Sources */,
|
||||
8B7A4AD02EB56A3400B07840 /* AUEffectBase.cpp in Sources */,
|
||||
8B7A4AB52EB56A3300B07840 /* CACFMachPort.cpp in Sources */,
|
||||
8B7A4AC42EB56A3300B07840 /* AUBase.cpp in Sources */,
|
||||
8B7A4A902EB56A3300B07840 /* CASharedLibrary.cpp in Sources */,
|
||||
8B7A4A772EB56A3300B07840 /* CACFDistributedNotification.cpp in Sources */,
|
||||
8B7A4A7A2EB56A3300B07840 /* CAComponentDescription.cpp in Sources */,
|
||||
8B7A4A812EB56A3300B07840 /* CACFString.cpp in Sources */,
|
||||
8B7A4AC12EB56A3300B07840 /* ComponentBase.cpp in Sources */,
|
||||
8B7A4AA22EB56A3300B07840 /* CARingBuffer.cpp in Sources */,
|
||||
8B7A4AC22EB56A3300B07840 /* AUScopeElement.cpp in Sources */,
|
||||
8B7A4ABF2EB56A3300B07840 /* CAAudioUnit.cpp in Sources */,
|
||||
8B7A4ABC2EB56A3300B07840 /* CACFArray.cpp in Sources */,
|
||||
8B7A4AB92EB56A3300B07840 /* CABundleLocker.cpp in Sources */,
|
||||
8B7A4AAB2EB56A3300B07840 /* CAProcess.cpp in Sources */,
|
||||
8B7A4A992EB56A3300B07840 /* CAStreamRangedDescription.cpp in Sources */,
|
||||
8B7A4A9A2EB56A3300B07840 /* CAPThread.cpp in Sources */,
|
||||
8B7A4A5C2EB56A3300B07840 /* CAComponent.cpp in Sources */,
|
||||
8B7A4A742EB56A3300B07840 /* CAAudioChannelLayoutObject.cpp in Sources */,
|
||||
8B7A4AAF2EB56A3300B07840 /* CAAudioTimeStamp.cpp in Sources */,
|
||||
8B7A4AB62EB56A3300B07840 /* CABufferList.cpp in Sources */,
|
||||
8B7A4A932EB56A3300B07840 /* CACFMessagePort.cpp in Sources */,
|
||||
8B7A4A9D2EB56A3300B07840 /* CAVectorUnit.cpp in Sources */,
|
||||
8B7A4ACF2EB56A3400B07840 /* AUInputElement.cpp in Sources */,
|
||||
8B7A4AD72EB56A3400B07840 /* AUBuffer.cpp in Sources */,
|
||||
8B7A4A7C2EB56A3300B07840 /* CADebugMacros.cpp in Sources */,
|
||||
8B7A4A5E2EB56A3300B07840 /* CACFNumber.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
089C167DFE841241C02AAC07 /* InfoPlist.strings */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
8B7A4ADB2EB56CAF00B07840 /* en */,
|
||||
);
|
||||
name = InfoPlist.strings;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
3E4BA244089833B7007656EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=macosx*]" = 9BMAKYA76W;
|
||||
EXPORTED_SYMBOLS_FILE = X2Buss.exp;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.1;
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.airwindows.audiounit.${PRODUCT_NAME:identifier}";
|
||||
PRODUCT_NAME = X2Buss;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SDKROOT = macosx;
|
||||
STRIP_STYLE = debugging;
|
||||
WRAPPER_EXTENSION = component;
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3E4BA245089833B7007656EC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CLANG_ENABLE_OBJC_WEAK = YES;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
"CODE_SIGN_IDENTITY[sdk=macosx*]" = "Developer ID Application";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEVELOPMENT_TEAM = "";
|
||||
"DEVELOPMENT_TEAM[sdk=macosx*]" = 9BMAKYA76W;
|
||||
EXPORTED_SYMBOLS_FILE = X2Buss.exp;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
|
||||
GENERATE_PKGINFO_FILE = YES;
|
||||
INFOPLIST_FILE = Info.plist;
|
||||
INSTALL_PATH = "$(HOME)/Library/Audio/Plug-Ins/Components/";
|
||||
LIBRARY_STYLE = Bundle;
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.1;
|
||||
OTHER_LDFLAGS = "-bundle";
|
||||
OTHER_REZFLAGS = "";
|
||||
PRODUCT_BUNDLE_IDENTIFIER = "com.airwindows.audiounit.${PRODUCT_NAME:identifier}";
|
||||
PRODUCT_NAME = X2Buss;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
SDKROOT = macosx;
|
||||
STRIP_INSTALLED_PRODUCT = YES;
|
||||
STRIP_STYLE = debugging;
|
||||
WRAPPER_EXTENSION = component;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
3E4BA248089833B7007656EC /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "/Users/christopherjohnson/Desktop/CA_SDK/**";
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.1;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
3E4BA249089833B7007656EC /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
ARCHS = "$(ARCHS_STANDARD)";
|
||||
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
DEAD_CODE_STRIPPING = YES;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = c99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
HEADER_SEARCH_PATHS = "/Users/christopherjohnson/Desktop/CA_SDK/**";
|
||||
MACOSX_DEPLOYMENT_TARGET = 11.1;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = macosx;
|
||||
WARNING_CFLAGS = (
|
||||
"-Wmost",
|
||||
"-Wno-four-char-constants",
|
||||
"-Wno-unknown-pragmas",
|
||||
);
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
3E4BA243089833B7007656EC /* Build configuration list for PBXNativeTarget "X2Buss" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3E4BA244089833B7007656EC /* Debug */,
|
||||
3E4BA245089833B7007656EC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
3E4BA247089833B7007656EC /* Build configuration list for PBXProject "X2Buss" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
3E4BA248089833B7007656EC /* Debug */,
|
||||
3E4BA249089833B7007656EC /* Release */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Debug;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
};
|
||||
rootObject = 089C1669FE841209C02AAC07 /* Project object */;
|
||||
}
|
||||
7
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
7
plugins/MacSignedAU/X2Buss/X2Buss.xcodeproj/project.xcworkspace/contents.xcworkspacedata
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "self:">
|
||||
</FileRef>
|
||||
</Workspace>
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>IDEDidComputeMac32BitWarning</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
Binary file not shown.
|
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "1420"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
|
||||
BuildableName = "X2Buss.component"
|
||||
BlueprintName = "X2Buss"
|
||||
ReferencedContainer = "container:X2Buss.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Release"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Release"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "8D01CCC60486CAD60068D4B7"
|
||||
BuildableName = "X2Buss.component"
|
||||
BlueprintName = "X2Buss"
|
||||
ReferencedContainer = "container:X2Buss.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>SchemeUserState</key>
|
||||
<dict>
|
||||
<key>X2Buss.xcscheme_^#shared#^_</key>
|
||||
<dict>
|
||||
<key>orderHint</key>
|
||||
<integer>0</integer>
|
||||
</dict>
|
||||
</dict>
|
||||
<key>SuppressBuildableAutocreation</key>
|
||||
<dict>
|
||||
<key>8D01CCC60486CAD60068D4B7</key>
|
||||
<dict>
|
||||
<key>primary</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</dict>
|
||||
</dict>
|
||||
</plist>
|
||||
58
plugins/MacSignedAU/X2Buss/X2BussVersion.h
Executable file
58
plugins/MacSignedAU/X2Buss/X2BussVersion.h
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* File: X2BussVersion.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 10/31/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#ifndef __X2BussVersion_h__
|
||||
#define __X2BussVersion_h__
|
||||
|
||||
|
||||
#ifdef DEBUG
|
||||
#define kX2BussVersion 0xFFFFFFFF
|
||||
#else
|
||||
#define kX2BussVersion 0x00010000
|
||||
#endif
|
||||
|
||||
//~~~~~~~~~~~~~~ Change!!! ~~~~~~~~~~~~~~~~~~~~~//
|
||||
#define X2Buss_COMP_MANF 'Dthr'
|
||||
#define X2Buss_COMP_SUBTYPE 'x2bs'
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
||||
#endif
|
||||
|
||||
BIN
plugins/MacSignedAU/X2Buss/en.lproj/InfoPlist.strings
Executable file
BIN
plugins/MacSignedAU/X2Buss/en.lproj/InfoPlist.strings
Executable file
Binary file not shown.
16
plugins/MacSignedAU/X2Buss/version.plist
Executable file
16
plugins/MacSignedAU/X2Buss/version.plist
Executable file
|
|
@ -0,0 +1,16 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildVersion</key>
|
||||
<string>3</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>ProjectName</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>SourceVersion</key>
|
||||
<string>590000</string>
|
||||
</dict>
|
||||
</plist>
|
||||
BIN
plugins/MacSignedAU/kWoodRoom/English.lproj/InfoPlist.strings
Executable file
BIN
plugins/MacSignedAU/kWoodRoom/English.lproj/InfoPlist.strings
Executable file
Binary file not shown.
28
plugins/MacSignedAU/kWoodRoom/Info.plist
Executable file
28
plugins/MacSignedAU/kWoodRoom/Info.plist
Executable file
|
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string></string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>com.airwindows.audiounit.${PRODUCT_NAME:identifier}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${PROJECTNAMEASIDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>BNDL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>Dthr</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>CSResourcesFileMapped</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
||||
5
plugins/MacSignedAU/kWoodRoom/StarterAU_Prefix.pch
Executable file
5
plugins/MacSignedAU/kWoodRoom/StarterAU_Prefix.pch
Executable file
|
|
@ -0,0 +1,5 @@
|
|||
//
|
||||
// Prefix header for all source files of the '«PROJECTNAMEASIDENTIFIER»' target in the '«PROJECTNAMEASIDENTIFIER»' project.
|
||||
//
|
||||
|
||||
#include <CoreServices/CoreServices.h>
|
||||
804
plugins/MacSignedAU/kWoodRoom/kWoodRoom.cpp
Executable file
804
plugins/MacSignedAU/kWoodRoom/kWoodRoom.cpp
Executable file
|
|
@ -0,0 +1,804 @@
|
|||
/*
|
||||
* File: kWoodRoom.cpp
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 11/1/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
/*=============================================================================
|
||||
kWoodRoom.cpp
|
||||
|
||||
=============================================================================*/
|
||||
#include "kWoodRoom.h"
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
COMPONENT_ENTRY(kWoodRoom)
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::kWoodRoom
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
kWoodRoom::kWoodRoom(AudioUnit component)
|
||||
: AUEffectBase(component)
|
||||
{
|
||||
CreateElements();
|
||||
Globals()->UseIndexedParameters(kNumberOfParameters);
|
||||
SetParameter(kParam_A, kDefaultValue_ParamA );
|
||||
SetParameter(kParam_B, kDefaultValue_ParamB );
|
||||
SetParameter(kParam_C, kDefaultValue_ParamC );
|
||||
SetParameter(kParam_D, kDefaultValue_ParamD );
|
||||
SetParameter(kParam_E, kDefaultValue_ParamE );
|
||||
SetParameter(kParam_F, kDefaultValue_ParamF );
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
mDebugDispatcher = new AUDebugDispatcher (this);
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::GetParameterValueStrings
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings)
|
||||
{
|
||||
|
||||
return kAudioUnitErr_InvalidProperty;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::GetParameterInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo )
|
||||
{
|
||||
ComponentResult result = noErr;
|
||||
|
||||
outParameterInfo.flags = kAudioUnitParameterFlag_IsWritable
|
||||
| kAudioUnitParameterFlag_IsReadable;
|
||||
|
||||
if (inScope == kAudioUnitScope_Global) {
|
||||
switch(inParameterID)
|
||||
{
|
||||
case kParam_A:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterAName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamA;
|
||||
break;
|
||||
case kParam_B:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterBName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamB;
|
||||
break;
|
||||
case kParam_C:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterCName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamC;
|
||||
break;
|
||||
case kParam_D:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterDName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamD;
|
||||
break;
|
||||
case kParam_E:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterEName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamE;
|
||||
break;
|
||||
case kParam_F:
|
||||
AUBase::FillInParameterName (outParameterInfo, kParameterFName, false);
|
||||
outParameterInfo.unit = kAudioUnitParameterUnit_Generic;
|
||||
outParameterInfo.minValue = 0.0;
|
||||
outParameterInfo.maxValue = 1.0;
|
||||
outParameterInfo.defaultValue = kDefaultValue_ParamF;
|
||||
break;
|
||||
default:
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
result = kAudioUnitErr_InvalidParameter;
|
||||
}
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::GetPropertyInfo
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::GetPropertyInfo (AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable)
|
||||
{
|
||||
return AUEffectBase::GetPropertyInfo (inID, inScope, inElement, outDataSize, outWritable);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// state that plugin supports only stereo-in/stereo-out processing
|
||||
UInt32 kWoodRoom::SupportedNumChannels(const AUChannelInfo ** outInfo)
|
||||
{
|
||||
if (outInfo != NULL)
|
||||
{
|
||||
static AUChannelInfo info;
|
||||
info.inChannels = 2;
|
||||
info.outChannels = 2;
|
||||
*outInfo = &info;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::GetProperty
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::GetProperty( AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData )
|
||||
{
|
||||
return AUEffectBase::GetProperty (inID, inScope, inElement, outData);
|
||||
}
|
||||
|
||||
// kWoodRoom::Initialize
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::Initialize()
|
||||
{
|
||||
ComponentResult result = AUEffectBase::Initialize();
|
||||
if (result == noErr)
|
||||
Reset(kAudioUnitScope_Global, 0);
|
||||
return result;
|
||||
}
|
||||
|
||||
#pragma mark ____kWoodRoomEffectKernel
|
||||
|
||||
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::kWoodRoomKernel::Reset()
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
ComponentResult kWoodRoom::Reset(AudioUnitScope inScope, AudioUnitElement inElement)
|
||||
{
|
||||
for(int x = 0; x < d3A+2; x++) {a3AL[x] = 0.0; a3AR[x] = 0.0;}
|
||||
for(int x = 0; x < d3B+2; x++) {a3BL[x] = 0.0; a3BR[x] = 0.0;}
|
||||
for(int x = 0; x < d3C+2; x++) {a3CL[x] = 0.0; a3CR[x] = 0.0;}
|
||||
for(int x = 0; x < d3D+2; x++) {a3DL[x] = 0.0; a3DR[x] = 0.0;}
|
||||
for(int x = 0; x < d3E+2; x++) {a3EL[x] = 0.0; a3ER[x] = 0.0;}
|
||||
for(int x = 0; x < d3F+2; x++) {a3FL[x] = 0.0; a3FR[x] = 0.0;}
|
||||
for(int x = 0; x < d3G+2; x++) {a3GL[x] = 0.0; a3GR[x] = 0.0;}
|
||||
for(int x = 0; x < d3H+2; x++) {a3HL[x] = 0.0; a3HR[x] = 0.0;}
|
||||
for(int x = 0; x < d3I+2; x++) {a3IL[x] = 0.0; a3IR[x] = 0.0;}
|
||||
c3AL = c3BL = c3CL = c3DL = c3EL = c3FL = c3GL = c3HL = c3IL = 1;
|
||||
c3AR = c3BR = c3CR = c3DR = c3ER = c3FR = c3GR = c3HR = c3IR = 1;
|
||||
|
||||
for(int x = 0; x < d6A+2; x++) {a6AL[x] = 0.0; a6AR[x] = 0.0;}
|
||||
for(int x = 0; x < d6B+2; x++) {a6BL[x] = 0.0; a6BR[x] = 0.0;}
|
||||
for(int x = 0; x < d6C+2; x++) {a6CL[x] = 0.0; a6CR[x] = 0.0;}
|
||||
for(int x = 0; x < d6D+2; x++) {a6DL[x] = 0.0; a6DR[x] = 0.0;}
|
||||
for(int x = 0; x < d6E+2; x++) {a6EL[x] = 0.0; a6ER[x] = 0.0;}
|
||||
for(int x = 0; x < d6F+2; x++) {a6FL[x] = 0.0; a6FR[x] = 0.0;}
|
||||
for(int x = 0; x < d6G+2; x++) {a6GL[x] = 0.0; a6GR[x] = 0.0;}
|
||||
for(int x = 0; x < d6H+2; x++) {a6HL[x] = 0.0; a6HR[x] = 0.0;}
|
||||
for(int x = 0; x < d6I+2; x++) {a6IL[x] = 0.0; a6IR[x] = 0.0;}
|
||||
for(int x = 0; x < d6J+2; x++) {a6JL[x] = 0.0; a6JR[x] = 0.0;}
|
||||
for(int x = 0; x < d6K+2; x++) {a6KL[x] = 0.0; a6KR[x] = 0.0;}
|
||||
for(int x = 0; x < d6L+2; x++) {a6LL[x] = 0.0; a6LR[x] = 0.0;}
|
||||
for(int x = 0; x < d6M+2; x++) {a6ML[x] = 0.0; a6MR[x] = 0.0;}
|
||||
for(int x = 0; x < d6N+2; x++) {a6NL[x] = 0.0; a6NR[x] = 0.0;}
|
||||
for(int x = 0; x < d6O+2; x++) {a6OL[x] = 0.0; a6OR[x] = 0.0;}
|
||||
for(int x = 0; x < d6P+2; x++) {a6PL[x] = 0.0; a6PR[x] = 0.0;}
|
||||
for(int x = 0; x < d6Q+2; x++) {a6QL[x] = 0.0; a6QR[x] = 0.0;}
|
||||
for(int x = 0; x < d6R+2; x++) {a6RL[x] = 0.0; a6RR[x] = 0.0;}
|
||||
for(int x = 0; x < d6S+2; x++) {a6SL[x] = 0.0; a6SR[x] = 0.0;}
|
||||
for(int x = 0; x < d6T+2; x++) {a6TL[x] = 0.0; a6TR[x] = 0.0;}
|
||||
for(int x = 0; x < d6U+2; x++) {a6UL[x] = 0.0; a6UR[x] = 0.0;}
|
||||
for(int x = 0; x < d6V+2; x++) {a6VL[x] = 0.0; a6VR[x] = 0.0;}
|
||||
for(int x = 0; x < d6W+2; x++) {a6WL[x] = 0.0; a6WR[x] = 0.0;}
|
||||
for(int x = 0; x < d6X+2; x++) {a6XL[x] = 0.0; a6XR[x] = 0.0;}
|
||||
for(int x = 0; x < d6Y+2; x++) {a6YL[x] = 0.0; a6YR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZA+2; x++) {a6ZAL[x] = 0.0; a6ZAR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZB+2; x++) {a6ZBL[x] = 0.0; a6ZBR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZC+2; x++) {a6ZCL[x] = 0.0; a6ZCR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZD+2; x++) {a6ZDL[x] = 0.0; a6ZDR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZE+2; x++) {a6ZEL[x] = 0.0; a6ZER[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZF+2; x++) {a6ZFL[x] = 0.0; a6ZFR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZG+2; x++) {a6ZGL[x] = 0.0; a6ZGR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZH+2; x++) {a6ZHL[x] = 0.0; a6ZHR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZI+2; x++) {a6ZIL[x] = 0.0; a6ZIR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZJ+2; x++) {a6ZJL[x] = 0.0; a6ZJR[x] = 0.0;}
|
||||
for(int x = 0; x < d6ZK+2; x++) {a6ZKL[x] = 0.0; a6ZKR[x] = 0.0;}
|
||||
c6AL = c6BL = c6CL = c6DL = c6EL = c6FL = c6GL = c6HL = c6IL = 1;
|
||||
c6JL = c6KL = c6LL = c6ML = c6NL = c6OL = c6PL = c6QL = c6RL = 1;
|
||||
c6SL = c6TL = c6UL = c6VL = c6WL = c6XL = c6YL = c6ZAL = c6ZBL = 1;
|
||||
c6ZCL = c6ZDL = c6ZEL = c6ZFL = c6ZGL = c6ZHL = c6ZIL = c6ZJL = c6ZKL = 1;
|
||||
c6AR = c6BR = c6CR = c6DR = c6ER = c6FR = c6GR = c6HR = c6IR = 1;
|
||||
c6JR = c6KR = c6LR = c6MR = c6NR = c6OR = c6PR = c6QR = c6RR = 1;
|
||||
c6SR = c6TR = c6UR = c6VR = c6WR = c6XR = c6YR = c6ZAR = c6ZBR = 1;
|
||||
c6ZCR = c6ZDR = c6ZER = c6ZFR = c6ZGR = c6ZHR = c6ZIR = c6ZJR = c6ZKR = 1;
|
||||
f6AL = f6BL = f6CL = f6DL = f6EL = f6FL = 0.0;
|
||||
f6FR = f6LR = f6RR = f6XR = f6ZER = f6ZKR = 0.0;
|
||||
avg6L = avg6R = 0.0;
|
||||
|
||||
for (int x = 0; x < bez_total; x++) {
|
||||
bez[x] = 0.0;
|
||||
bezF[x] = 0.0;
|
||||
}
|
||||
bez[bez_cycle] = 1.0;
|
||||
bezF[bez_cycle] = 1.0;
|
||||
|
||||
fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX;
|
||||
fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX;
|
||||
return noErr;
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
// kWoodRoom::ProcessBufferLists
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
OSStatus kWoodRoom::ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
|
||||
const AudioBufferList & inBuffer,
|
||||
AudioBufferList & outBuffer,
|
||||
UInt32 inFramesToProcess)
|
||||
{
|
||||
Float32 * inputL = (Float32*)(inBuffer.mBuffers[0].mData);
|
||||
Float32 * inputR = (Float32*)(inBuffer.mBuffers[1].mData);
|
||||
Float32 * outputL = (Float32*)(outBuffer.mBuffers[0].mData);
|
||||
Float32 * outputR = (Float32*)(outBuffer.mBuffers[1].mData);
|
||||
UInt32 nSampleFrames = inFramesToProcess;
|
||||
double overallscale = 1.0;
|
||||
overallscale /= 44100.0;
|
||||
overallscale *= GetSampleRate();
|
||||
|
||||
double fdb6ck = (0.0009765625+0.0009765625+0.001953125)*0.3333333;
|
||||
double reg6n = (1.0-pow(1.0-GetParameter( kParam_A ),1.618033988749894))*fdb6ck;
|
||||
//start this but pad it in the loop by volume of output?
|
||||
|
||||
double derez = GetParameter( kParam_B )*2.0;
|
||||
bool stepped = true; // Revised Bezier Undersampling
|
||||
if (derez > 1.0) { // has full rez at center, stepped
|
||||
stepped = false; // to left, continuous to right
|
||||
derez = 1.0-(derez-1.0);
|
||||
} //if it's set up like that it's the revised algorithm
|
||||
derez = fmin(fmax(derez/overallscale,0.0005),1.0);
|
||||
int bezFraction = (int)(1.0/derez);
|
||||
double bezTrim = (double)bezFraction/(bezFraction+1.0);
|
||||
if (stepped) { //this hard-locks derez to exact subdivisions of 1.0
|
||||
derez = 1.0 / bezFraction;
|
||||
bezTrim = 1.0-(derez*bezTrim);
|
||||
} else { //this makes it match the 1.0 case using stepped
|
||||
derez /= (2.0/pow(overallscale,0.5-((overallscale-1.0)*0.0375)));
|
||||
bezTrim = 1.0-pow(derez*0.5,1.0/(derez*0.5));
|
||||
} //the revision more accurately connects the bezier curves
|
||||
|
||||
double derezFreq = GetParameter( kParam_C )*2.0;
|
||||
bool steppedFreq = true; // Revised Bezier Undersampling
|
||||
if (derezFreq > 1.0) { // has full rez at center, stepped
|
||||
steppedFreq = false; // to left, continuous to right
|
||||
derezFreq = 1.0-(derezFreq-1.0);
|
||||
} //if it's set up like that it's the revised algorithm
|
||||
derezFreq = fmin(fmax(derezFreq,0.0005),1.0); //note: no overallscale, already inside undersampling
|
||||
int bezFreqFraction = (int)(1.0/derezFreq);
|
||||
double bezFreqTrim = (double)bezFreqFraction/(bezFreqFraction+1.0);
|
||||
if (steppedFreq) { //this hard-locks derez to exact subdivisions of 1.0
|
||||
derezFreq = 1.0 / bezFreqFraction;
|
||||
bezFreqTrim = 1.0-(derezFreq*bezFreqTrim);
|
||||
} else { //this makes it match the 1.0 case using stepped
|
||||
bezFreqTrim = 1.0-pow(derezFreq*0.5,1.0/(derezFreq*0.5));
|
||||
} //the revision more accurately connects the bezier curves
|
||||
|
||||
double earlyLoudness = GetParameter( kParam_D )*2.0;
|
||||
int start = (int)(GetParameter( kParam_E ) * 27.0);
|
||||
int ld3G = early[start];
|
||||
int ld3H = early[start+1];
|
||||
int ld3D = early[start+2];
|
||||
int ld3A = early[start+3];
|
||||
int ld3E = early[start+4];
|
||||
int ld3I = early[start+5];
|
||||
int ld3F = early[start+6];
|
||||
int ld3B = early[start+7];
|
||||
int ld3C = early[start+8];
|
||||
double wet = GetParameter( kParam_F );
|
||||
|
||||
while (nSampleFrames-- > 0) {
|
||||
double inputSampleL = *inputL;
|
||||
double inputSampleR = *inputR;
|
||||
if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17;
|
||||
if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17;
|
||||
double drySampleL = inputSampleL;
|
||||
double drySampleR = inputSampleR;
|
||||
|
||||
bez[bez_cycle] += derez;
|
||||
bez[bez_SampL] += ((inputSampleL+bez[bez_InL]) * derez);
|
||||
bez[bez_SampR] += ((inputSampleR+bez[bez_InR]) * derez);
|
||||
bez[bez_InL] = inputSampleL; bez[bez_InR] = inputSampleR;
|
||||
if (bez[bez_cycle] > 1.0) { //hit the end point and we do a reverb sample
|
||||
if (stepped) bez[bez_cycle] = 0.0;
|
||||
else bez[bez_cycle] -= 1.0;
|
||||
|
||||
inputSampleL = (bez[bez_SampL]+bez[bez_AvgInSampL])*0.5;
|
||||
bez[bez_AvgInSampL] = bez[bez_SampL];
|
||||
inputSampleR = (bez[bez_SampR]+bez[bez_AvgInSampR])*0.5;
|
||||
bez[bez_AvgInSampR] = bez[bez_SampR];
|
||||
|
||||
a3AL[c3AL] = inputSampleL;// + (f3AL * reg3n);
|
||||
a3BL[c3BL] = inputSampleL;// + (f3BL * reg3n);
|
||||
a3CL[c3CL] = inputSampleL;// + (f3CL * reg3n);
|
||||
|
||||
a3CR[c3CR] = inputSampleR;// + (f3CR * reg3n);
|
||||
a3FR[c3FR] = inputSampleR;// + (f3FR * reg3n);
|
||||
a3IR[c3IR] = inputSampleR;// + (f3IR * reg3n);
|
||||
|
||||
c3AL++; if (c3AL < 0 || c3AL > ld3A) c3AL = 0;
|
||||
c3BL++; if (c3BL < 0 || c3BL > ld3B) c3BL = 0;
|
||||
c3CL++; if (c3CL < 0 || c3CL > ld3C) c3CL = 0;
|
||||
c3CR++; if (c3CR < 0 || c3CR > ld3C) c3CR = 0;
|
||||
c3FR++; if (c3FR < 0 || c3FR > ld3F) c3FR = 0;
|
||||
c3IR++; if (c3IR < 0 || c3IR > ld3I) c3IR = 0;
|
||||
|
||||
double o3AL = a3AL[c3AL-((c3AL > ld3A)?c3AL+1:0)];
|
||||
double o3BL = a3BL[c3BL-((c3BL > ld3B)?c3BL+1:0)];
|
||||
double o3CL = a3CL[c3CL-((c3CL > ld3C)?c3CL+1:0)];
|
||||
double o3CR = a3CR[c3CR-((c3CR > ld3C)?c3CR+1:0)];
|
||||
double o3FR = a3FR[c3FR-((c3FR > ld3F)?c3FR+1:0)];
|
||||
double o3IR = a3IR[c3IR-((c3IR > ld3I)?c3IR+1:0)];
|
||||
|
||||
a3DL[c3DL] = (((o3BL + o3CL) * -2.0) + o3AL);
|
||||
a3EL[c3EL] = (((o3AL + o3CL) * -2.0) + o3BL);
|
||||
a3FL[c3FL] = (((o3AL + o3BL) * -2.0) + o3CL);
|
||||
a3BR[c3BR] = (((o3FR + o3IR) * -2.0) + o3CR);
|
||||
a3ER[c3ER] = (((o3CR + o3IR) * -2.0) + o3FR);
|
||||
a3HR[c3HR] = (((o3CR + o3FR) * -2.0) + o3IR);
|
||||
|
||||
c3DL++; if (c3DL < 0 || c3DL > ld3D) c3DL = 0;
|
||||
c3EL++; if (c3EL < 0 || c3EL > ld3E) c3EL = 0;
|
||||
c3FL++; if (c3FL < 0 || c3FL > ld3F) c3FL = 0;
|
||||
c3BR++; if (c3BR < 0 || c3BR > ld3B) c3BR = 0;
|
||||
c3ER++; if (c3ER < 0 || c3ER > ld3E) c3ER = 0;
|
||||
c3HR++; if (c3HR < 0 || c3HR > ld3H) c3HR = 0;
|
||||
|
||||
double o3DL = a3DL[c3DL-((c3DL > ld3D)?c3DL+1:0)];
|
||||
double o3EL = a3EL[c3EL-((c3EL > ld3E)?c3EL+1:0)];
|
||||
double o3FL = a3FL[c3FL-((c3FL > ld3F)?c3FL+1:0)];
|
||||
double o3BR = a3BR[c3BR-((c3BR > ld3B)?c3BR+1:0)];
|
||||
double o3ER = a3ER[c3ER-((c3ER > ld3E)?c3ER+1:0)];
|
||||
double o3HR = a3HR[c3HR-((c3HR > ld3H)?c3HR+1:0)];
|
||||
|
||||
a3GL[c3GL] = (((o3EL + o3FL) * -2.0) + o3DL);
|
||||
a3HL[c3HL] = (((o3DL + o3FL) * -2.0) + o3EL);
|
||||
a3IL[c3IL] = (((o3DL + o3EL) * -2.0) + o3FL);
|
||||
a3AR[c3AR] = (((o3ER + o3HR) * -2.0) + o3BR);
|
||||
a3DR[c3DR] = (((o3BR + o3HR) * -2.0) + o3ER);
|
||||
a3GR[c3GR] = (((o3BR + o3ER) * -2.0) + o3HR);
|
||||
|
||||
c3GL++; if (c3GL < 0 || c3GL > ld3G) c3GL = 0;
|
||||
c3HL++; if (c3HL < 0 || c3HL > ld3H) c3HL = 0;
|
||||
c3IL++; if (c3IL < 0 || c3IL > ld3I) c3IL = 0;
|
||||
c3AR++; if (c3AR < 0 || c3AR > ld3A) c3AR = 0;
|
||||
c3DR++; if (c3DR < 0 || c3DR > ld3D) c3DR = 0;
|
||||
c3GR++; if (c3GR < 0 || c3GR > ld3G) c3GR = 0;
|
||||
|
||||
double o3GL = a3GL[c3GL-((c3GL > ld3G)?c3GL+1:0)];
|
||||
double o3HL = a3HL[c3HL-((c3HL > ld3H)?c3HL+1:0)];
|
||||
double o3IL = a3IL[c3IL-((c3IL > ld3I)?c3IL+1:0)];
|
||||
double o3AR = a3AR[c3AR-((c3AR > ld3A)?c3AR+1:0)];
|
||||
double o3DR = a3DR[c3DR-((c3DR > ld3D)?c3DR+1:0)];
|
||||
double o3GR = a3GR[c3GR-((c3GR > ld3G)?c3GR+1:0)];
|
||||
|
||||
double inputSampleL = (o3GL + o3HL + o3IL)*0.03125;
|
||||
double inputSampleR = (o3AR + o3DR + o3GR)*0.03125;
|
||||
|
||||
bezF[bez_cycle] += derezFreq;
|
||||
bezF[bez_SampL] += ((inputSampleL+bezF[bez_InL]) * derezFreq);
|
||||
bezF[bez_SampR] += ((inputSampleL+bezF[bez_InR]) * derezFreq);
|
||||
bezF[bez_InL] = inputSampleL; bezF[bez_InR] = inputSampleR;
|
||||
if (bezF[bez_cycle] > 1.0) { //hit the end point and we do a filter sample
|
||||
if (steppedFreq) bezF[bez_cycle] = 0.0;
|
||||
else bezF[bez_cycle] -= 1.0;
|
||||
bezF[bez_CL] = bezF[bez_BL];
|
||||
bezF[bez_BL] = bezF[bez_AL];
|
||||
bezF[bez_AL] = (bezF[bez_SampL]+bezF[bez_AvgInSampL])*0.5;
|
||||
bezF[bez_AvgInSampL] = bezF[bez_SampL]; bezF[bez_SampL] = 0.0;
|
||||
bezF[bez_CR] = bezF[bez_BR];
|
||||
bezF[bez_BR] = bezF[bez_AR];
|
||||
bezF[bez_AR] = (bezF[bez_SampR]+bezF[bez_AvgInSampR])*0.5;
|
||||
bezF[bez_AvgInSampR] = bezF[bez_SampR]; bezF[bez_SampR] = 0.0;
|
||||
}
|
||||
double X = bezF[bez_cycle]*bezFreqTrim;
|
||||
double CBLfreq = (bezF[bez_CL]*(1.0-X))+(bezF[bez_BL]*X);
|
||||
double BALfreq = (bezF[bez_BL]*(1.0-X))+(bezF[bez_AL]*X);
|
||||
double CBALfreq = (bezF[bez_BL]+(CBLfreq*(1.0-X))+(BALfreq*X))*0.125;
|
||||
double CBRfreq = (bezF[bez_CR]*(1.0-X))+(bezF[bez_BR]*X);
|
||||
double BARfreq = (bezF[bez_BR]*(1.0-X))+(bezF[bez_AR]*X);
|
||||
double CBARfreq = (bezF[bez_BR]+(CBRfreq*(1.0-X))+(BARfreq*X))*0.125;
|
||||
inputSampleL = CBALfreq+bezF[bez_AvgOutSampL];
|
||||
bezF[bez_AvgOutSampL] = CBALfreq;
|
||||
inputSampleR = CBARfreq+bezF[bez_AvgOutSampR];
|
||||
bezF[bez_AvgOutSampR] = CBARfreq;
|
||||
|
||||
double earlyReflectionL = inputSampleL;
|
||||
double earlyReflectionR = inputSampleR; //kWoodRoom has filtered early reflections
|
||||
|
||||
a6AL[c6AL] = inputSampleL + (f6BL * reg6n);
|
||||
a6BL[c6BL] = inputSampleL + (f6CL * reg6n);
|
||||
a6CL[c6CL] = inputSampleL + (f6DL * reg6n);
|
||||
a6DL[c6DL] = inputSampleL + (f6EL * reg6n);
|
||||
a6EL[c6EL] = inputSampleL + (f6FL * reg6n);
|
||||
a6FL[c6FL] = inputSampleL + (f6AL * reg6n);
|
||||
|
||||
c6AL++; if (c6AL < 0 || c6AL > d6A) c6AL = 0;
|
||||
c6BL++; if (c6BL < 0 || c6BL > d6B) c6BL = 0;
|
||||
c6CL++; if (c6CL < 0 || c6CL > d6C) c6CL = 0;
|
||||
c6DL++; if (c6DL < 0 || c6DL > d6D) c6DL = 0;
|
||||
c6EL++; if (c6EL < 0 || c6EL > d6E) c6EL = 0;
|
||||
c6FL++; if (c6FL < 0 || c6FL > d6F) c6FL = 0;
|
||||
|
||||
double o6AL = a6AL[c6AL-((c6AL > d6A)?d6A+1:0)];
|
||||
double o6BL = a6BL[c6BL-((c6BL > d6B)?d6B+1:0)];
|
||||
double o6CL = a6CL[c6CL-((c6CL > d6C)?d6C+1:0)];
|
||||
double o6DL = a6DL[c6DL-((c6DL > d6D)?d6D+1:0)];
|
||||
double o6EL = a6EL[c6EL-((c6EL > d6E)?d6E+1:0)];
|
||||
double o6FL = a6FL[c6FL-((c6FL > d6F)?d6F+1:0)];
|
||||
|
||||
a6FR[c6FR] = inputSampleR + (f6LR * reg6n);
|
||||
a6LR[c6LR] = inputSampleR + (f6RR * reg6n);
|
||||
a6RR[c6RR] = inputSampleR + (f6XR * reg6n);
|
||||
a6XR[c6XR] = inputSampleR + (f6ZER * reg6n);
|
||||
a6ZER[c6ZER] = inputSampleR + (f6ZKR * reg6n);
|
||||
a6ZKR[c6ZKR] = inputSampleR + (f6FR * reg6n);
|
||||
|
||||
c6FR++; if (c6FR < 0 || c6FR > d6F) c6FR = 0;
|
||||
c6LR++; if (c6LR < 0 || c6LR > d6L) c6LR = 0;
|
||||
c6RR++; if (c6RR < 0 || c6RR > d6R) c6RR = 0;
|
||||
c6XR++; if (c6XR < 0 || c6XR > d6X) c6XR = 0;
|
||||
c6ZER++; if (c6ZER < 0 || c6ZER > d6ZE) c6ZER = 0;
|
||||
c6ZKR++; if (c6ZKR < 0 || c6ZKR > d6ZK) c6ZKR = 0;
|
||||
|
||||
double o6FR = a6FR[c6FR-((c6FR > d6F)?d6F+1:0)];
|
||||
double o6LR = a6LR[c6LR-((c6LR > d6L)?d6L+1:0)];
|
||||
double o6RR = a6RR[c6RR-((c6RR > d6R)?d6R+1:0)];
|
||||
double o6XR = a6XR[c6XR-((c6XR > d6X)?d6X+1:0)];
|
||||
double o6ZER = a6ZER[c6ZER-((c6ZER > d6ZE)?d6ZE+1:0)];
|
||||
double o6ZKR = a6ZKR[c6ZKR-((c6ZKR > d6ZK)?d6ZK+1:0)];
|
||||
|
||||
//-------- one
|
||||
|
||||
a6GL[c6GL] = ((o6AL*2.0) - (o6BL + o6CL + o6DL + o6EL + o6FL));
|
||||
a6HL[c6HL] = ((o6BL*2.0) - (o6AL + o6CL + o6DL + o6EL + o6FL));
|
||||
a6IL[c6IL] = ((o6CL*2.0) - (o6AL + o6BL + o6DL + o6EL + o6FL));
|
||||
a6JL[c6JL] = ((o6DL*2.0) - (o6AL + o6BL + o6CL + o6EL + o6FL));
|
||||
a6KL[c6KL] = ((o6EL*2.0) - (o6AL + o6BL + o6CL + o6DL + o6FL));
|
||||
a6LL[c6LL] = ((o6FL*2.0) - (o6AL + o6BL + o6CL + o6DL + o6EL));
|
||||
|
||||
c6GL++; if (c6GL < 0 || c6GL > d6G) c6GL = 0;
|
||||
c6HL++; if (c6HL < 0 || c6HL > d6H) c6HL = 0;
|
||||
c6IL++; if (c6IL < 0 || c6IL > d6I) c6IL = 0;
|
||||
c6JL++; if (c6JL < 0 || c6JL > d6J) c6JL = 0;
|
||||
c6KL++; if (c6KL < 0 || c6KL > d6K) c6KL = 0;
|
||||
c6LL++; if (c6LL < 0 || c6LL > d6L) c6LL = 0;
|
||||
|
||||
double o6GL = a6GL[c6GL-((c6GL > d6G)?d6G+1:0)];
|
||||
double o6HL = a6HL[c6HL-((c6HL > d6H)?d6H+1:0)];
|
||||
double o6IL = a6IL[c6IL-((c6IL > d6I)?d6I+1:0)];
|
||||
double o6JL = a6JL[c6JL-((c6JL > d6J)?d6J+1:0)];
|
||||
double o6KL = a6KL[c6KL-((c6KL > d6K)?d6K+1:0)];
|
||||
double o6LL = a6LL[c6LL-((c6LL > d6L)?d6L+1:0)];
|
||||
|
||||
a6ER[c6ER] = ((o6FR*2.0) - (o6LR + o6RR + o6XR + o6ZER + o6ZKR));
|
||||
a6KR[c6KR] = ((o6LR*2.0) - (o6FR + o6RR + o6XR + o6ZER + o6ZKR));
|
||||
a6QR[c6QR] = ((o6RR*2.0) - (o6FR + o6LR + o6XR + o6ZER + o6ZKR));
|
||||
a6WR[c6WR] = ((o6XR*2.0) - (o6FR + o6LR + o6RR + o6ZER + o6ZKR));
|
||||
a6ZDR[c6ZDR] = ((o6ZER*2.0) - (o6FR + o6LR + o6RR + o6XR + o6ZKR));
|
||||
a6ZJR[c6ZJR] = ((o6ZKR*2.0) - (o6FR + o6LR + o6RR + o6XR + o6ZER));
|
||||
|
||||
c6ER++; if (c6ER < 0 || c6ER > d6E) c6ER = 0;
|
||||
c6KR++; if (c6KR < 0 || c6KR > d6K) c6KR = 0;
|
||||
c6QR++; if (c6QR < 0 || c6QR > d6Q) c6QR = 0;
|
||||
c6WR++; if (c6WR < 0 || c6WR > d6W) c6WR = 0;
|
||||
c6ZDR++; if (c6ZDR < 0 || c6ZDR > d6ZD) c6ZDR = 0;
|
||||
c6ZJR++; if (c6ZJR < 0 || c6ZJR > d6ZJ) c6ZJR = 0;
|
||||
|
||||
double o6ER = a6ER[c6ER-((c6ER > d6E)?d6E+1:0)];
|
||||
double o6KR = a6KR[c6KR-((c6KR > d6K)?d6K+1:0)];
|
||||
double o6QR = a6QR[c6QR-((c6QR > d6Q)?d6Q+1:0)];
|
||||
double o6WR = a6WR[c6WR-((c6WR > d6W)?d6W+1:0)];
|
||||
double o6ZDR = a6ZDR[c6ZDR-((c6ZDR > d6ZD)?d6ZD+1:0)];
|
||||
double o6ZJR = a6ZJR[c6ZJR-((c6ZJR > d6ZJ)?d6ZJ+1:0)];
|
||||
|
||||
//-------- two
|
||||
|
||||
a6ML[c6ML] = ((o6GL*2.0) - (o6HL + o6IL + o6JL + o6KL + o6LL));
|
||||
a6NL[c6NL] = ((o6HL*2.0) - (o6GL + o6IL + o6JL + o6KL + o6LL));
|
||||
a6OL[c6OL] = ((o6IL*2.0) - (o6GL + o6HL + o6JL + o6KL + o6LL));
|
||||
a6PL[c6PL] = ((o6JL*2.0) - (o6GL + o6HL + o6IL + o6KL + o6LL));
|
||||
a6QL[c6QL] = ((o6KL*2.0) - (o6GL + o6HL + o6IL + o6JL + o6LL));
|
||||
a6RL[c6RL] = ((o6LL*2.0) - (o6GL + o6HL + o6IL + o6JL + o6KL));
|
||||
|
||||
c6ML++; if (c6ML < 0 || c6ML > d6M) c6ML = 0;
|
||||
c6NL++; if (c6NL < 0 || c6NL > d6N) c6NL = 0;
|
||||
c6OL++; if (c6OL < 0 || c6OL > d6O) c6OL = 0;
|
||||
c6PL++; if (c6PL < 0 || c6PL > d6P) c6PL = 0;
|
||||
c6QL++; if (c6QL < 0 || c6QL > d6Q) c6QL = 0;
|
||||
c6RL++; if (c6RL < 0 || c6RL > d6R) c6RL = 0;
|
||||
|
||||
double o6ML = a6ML[c6ML-((c6ML > d6M)?d6M+1:0)];
|
||||
double o6NL = a6NL[c6NL-((c6NL > d6N)?d6N+1:0)];
|
||||
double o6OL = a6OL[c6OL-((c6OL > d6O)?d6O+1:0)];
|
||||
double o6PL = a6PL[c6PL-((c6PL > d6P)?d6P+1:0)];
|
||||
double o6QL = a6QL[c6QL-((c6QL > d6Q)?d6Q+1:0)];
|
||||
double o6RL = a6RL[c6RL-((c6RL > d6R)?d6R+1:0)];
|
||||
|
||||
a6DR[c6DR] = ((o6ER*2.0) - (o6KR + o6QR + o6WR + o6ZDR + o6ZJR));
|
||||
a6JR[c6JR] = ((o6KR*2.0) - (o6ER + o6QR + o6WR + o6ZDR + o6ZJR));
|
||||
a6PR[c6PR] = ((o6QR*2.0) - (o6ER + o6KR + o6WR + o6ZDR + o6ZJR));
|
||||
a6VR[c6VR] = ((o6WR*2.0) - (o6ER + o6KR + o6QR + o6ZDR + o6ZJR));
|
||||
a6ZCR[c6ZCR] = ((o6ZDR*2.0) - (o6ER + o6KR + o6QR + o6WR + o6ZJR));
|
||||
a6ZIR[c6ZIR] = ((o6ZJR*2.0) - (o6ER + o6KR + o6QR + o6WR + o6ZDR));
|
||||
|
||||
c6DR++; if (c6DR < 0 || c6DR > d6D) c6DR = 0;
|
||||
c6JR++; if (c6JR < 0 || c6JR > d6J) c6JR = 0;
|
||||
c6PR++; if (c6PR < 0 || c6PR > d6P) c6PR = 0;
|
||||
c6VR++; if (c6VR < 0 || c6VR > d6V) c6VR = 0;
|
||||
c6ZCR++; if (c6ZCR < 0 || c6ZCR > d6ZC) c6ZCR = 0;
|
||||
c6ZIR++; if (c6ZIR < 0 || c6ZIR > d6ZI) c6ZIR = 0;
|
||||
|
||||
double o6DR = a6DR[c6DR-((c6DR > d6D)?d6D+1:0)];
|
||||
double o6JR = a6JR[c6JR-((c6JR > d6J)?d6J+1:0)];
|
||||
double o6PR = a6PR[c6PR-((c6PR > d6P)?d6P+1:0)];
|
||||
double o6VR = a6VR[c6VR-((c6VR > d6V)?d6V+1:0)];
|
||||
double o6ZCR = a6ZCR[c6ZCR-((c6ZCR > d6ZC)?d6ZC+1:0)];
|
||||
double o6ZIR = a6ZIR[c6ZIR-((c6ZIR > d6ZI)?d6ZI+1:0)];
|
||||
|
||||
//-------- three
|
||||
|
||||
a6SL[c6SL] = ((o6ML*2.0) - (o6NL + o6OL + o6PL + o6QL + o6RL));
|
||||
a6TL[c6TL] = ((o6NL*2.0) - (o6ML + o6OL + o6PL + o6QL + o6RL));
|
||||
a6UL[c6UL] = ((o6OL*2.0) - (o6ML + o6NL + o6PL + o6QL + o6RL));
|
||||
a6VL[c6VL] = ((o6PL*2.0) - (o6ML + o6NL + o6OL + o6QL + o6RL));
|
||||
a6WL[c6WL] = ((o6QL*2.0) - (o6ML + o6NL + o6OL + o6PL + o6RL));
|
||||
a6XL[c6XL] = ((o6RL*2.0) - (o6ML + o6NL + o6OL + o6PL + o6QL));
|
||||
|
||||
c6SL++; if (c6SL < 0 || c6SL > d6S) c6SL = 0;
|
||||
c6TL++; if (c6TL < 0 || c6TL > d6T) c6TL = 0;
|
||||
c6UL++; if (c6UL < 0 || c6UL > d6U) c6UL = 0;
|
||||
c6VL++; if (c6VL < 0 || c6VL > d6V) c6VL = 0;
|
||||
c6WL++; if (c6WL < 0 || c6WL > d6W) c6WL = 0;
|
||||
c6XL++; if (c6XL < 0 || c6XL > d6X) c6XL = 0;
|
||||
|
||||
double o6SL = a6SL[c6SL-((c6SL > d6S)?d6S+1:0)];
|
||||
double o6TL = a6TL[c6TL-((c6TL > d6T)?d6T+1:0)];
|
||||
double o6UL = a6UL[c6UL-((c6UL > d6U)?d6U+1:0)];
|
||||
double o6VL = a6VL[c6VL-((c6VL > d6V)?d6V+1:0)];
|
||||
double o6WL = a6WL[c6WL-((c6WL > d6W)?d6W+1:0)];
|
||||
double o6XL = a6XL[c6XL-((c6XL > d6X)?d6X+1:0)];
|
||||
|
||||
a6CR[c6CR] = ((o6DR*2.0) - (o6JR + o6PR + o6VR + o6ZCR + o6ZIR));
|
||||
a6IR[c6IR] = ((o6JR*2.0) - (o6DR + o6PR + o6VR + o6ZCR + o6ZIR));
|
||||
a6OR[c6OR] = ((o6PR*2.0) - (o6DR + o6JR + o6VR + o6ZCR + o6ZIR));
|
||||
a6UR[c6UR] = ((o6VR*2.0) - (o6DR + o6JR + o6PR + o6ZCR + o6ZIR));
|
||||
a6ZBR[c6ZBR] = ((o6ZCR*2.0) - (o6DR + o6JR + o6PR + o6VR + o6ZIR));
|
||||
a6ZHR[c6ZHR] = ((o6ZIR*2.0) - (o6DR + o6JR + o6PR + o6VR + o6ZCR));
|
||||
|
||||
c6CR++; if (c6CR < 0 || c6CR > d6C) c6CR = 0;
|
||||
c6IR++; if (c6IR < 0 || c6IR > d6I) c6IR = 0;
|
||||
c6OR++; if (c6OR < 0 || c6OR > d6O) c6OR = 0;
|
||||
c6UR++; if (c6UR < 0 || c6UR > d6U) c6UR = 0;
|
||||
c6ZBR++; if (c6ZBR < 0 || c6ZBR > d6ZB) c6ZBR = 0;
|
||||
c6ZHR++; if (c6ZHR < 0 || c6ZHR > d6ZH) c6ZHR = 0;
|
||||
|
||||
double o6CR = a6CR[c6CR-((c6CR > d6C)?d6C+1:0)];
|
||||
double o6IR = a6IR[c6IR-((c6IR > d6I)?d6I+1:0)];
|
||||
double o6OR = a6OR[c6OR-((c6OR > d6O)?d6O+1:0)];
|
||||
double o6UR = a6UR[c6UR-((c6UR > d6U)?d6U+1:0)];
|
||||
double o6ZBR = a6ZBR[c6ZBR-((c6ZBR > d6ZB)?d6ZB+1:0)];
|
||||
double o6ZHR = a6ZHR[c6ZHR-((c6ZHR > d6ZH)?d6ZH+1:0)];
|
||||
|
||||
//-------- four
|
||||
|
||||
a6YL[c6YL] = ((o6SL*2.0) - (o6TL + o6UL + o6VL + o6WL + o6XL));
|
||||
a6ZAL[c6ZAL] = ((o6TL*2.0) - (o6SL + o6UL + o6VL + o6WL + o6XL));
|
||||
a6ZBL[c6ZBL] = ((o6UL*2.0) - (o6SL + o6TL + o6VL + o6WL + o6XL));
|
||||
a6ZCL[c6ZCL] = ((o6VL*2.0) - (o6SL + o6TL + o6UL + o6WL + o6XL));
|
||||
a6ZDL[c6ZDL] = ((o6WL*2.0) - (o6SL + o6TL + o6UL + o6VL + o6XL));
|
||||
a6ZEL[c6ZEL] = ((o6XL*2.0) - (o6SL + o6TL + o6UL + o6VL + o6WL));
|
||||
|
||||
c6YL++; if (c6YL < 0 || c6YL > d6Y) c6YL = 0;
|
||||
c6ZAL++; if (c6ZAL < 0 || c6ZAL > d6ZA) c6ZAL = 0;
|
||||
c6ZBL++; if (c6ZBL < 0 || c6ZBL > d6ZB) c6ZBL = 0;
|
||||
c6ZCL++; if (c6ZCL < 0 || c6ZCL > d6ZC) c6ZCL = 0;
|
||||
c6ZDL++; if (c6ZDL < 0 || c6ZDL > d6ZD) c6ZDL = 0;
|
||||
c6ZEL++; if (c6ZEL < 0 || c6ZEL > d6ZE) c6ZEL = 0;
|
||||
|
||||
double o6YL = a6YL[c6YL-((c6YL > d6Y)?d6Y+1:0)];
|
||||
double o6ZAL = a6ZAL[c6ZAL-((c6ZAL > d6ZA)?d6ZA+1:0)];
|
||||
double o6ZBL = a6ZBL[c6ZBL-((c6ZBL > d6ZB)?d6ZB+1:0)];
|
||||
double o6ZCL = a6ZCL[c6ZCL-((c6ZCL > d6ZC)?d6ZC+1:0)];
|
||||
double o6ZDL = a6ZDL[c6ZDL-((c6ZDL > d6ZD)?d6ZD+1:0)];
|
||||
double o6ZEL = a6ZEL[c6ZEL-((c6ZEL > d6ZE)?d6ZE+1:0)];
|
||||
|
||||
a6BR[c6BR] = ((o6CR*2.0) - (o6IR + o6OR + o6UR + o6ZBR + o6ZHR));
|
||||
a6HR[c6HR] = ((o6IR*2.0) - (o6CR + o6OR + o6UR + o6ZBR + o6ZHR));
|
||||
a6NR[c6NR] = ((o6OR*2.0) - (o6CR + o6IR + o6UR + o6ZBR + o6ZHR));
|
||||
a6TR[c6TR] = ((o6UR*2.0) - (o6CR + o6IR + o6OR + o6ZBR + o6ZHR));
|
||||
a6ZAR[c6ZAR] = ((o6ZBR*2.0) - (o6CR + o6IR + o6OR + o6UR + o6ZHR));
|
||||
a6ZGR[c6ZGR] = ((o6ZHR*2.0) - (o6CR + o6IR + o6OR + o6UR + o6ZBR));
|
||||
|
||||
c6BR++; if (c6BR < 0 || c6BR > d6B) c6BR = 0;
|
||||
c6HR++; if (c6HR < 0 || c6HR > d6H) c6HR = 0;
|
||||
c6NR++; if (c6NR < 0 || c6NR > d6N) c6NR = 0;
|
||||
c6TR++; if (c6TR < 0 || c6TR > d6T) c6TR = 0;
|
||||
c6ZBR++; if (c6ZBR < 0 || c6ZBR > d6ZB) c6ZBR = 0;
|
||||
c6ZGR++; if (c6ZGR < 0 || c6ZGR > d6ZG) c6ZGR = 0;
|
||||
|
||||
double o6BR = a6BR[c6BR-((c6BR > d6B)?d6B+1:0)];
|
||||
double o6HR = a6HR[c6HR-((c6HR > d6H)?d6H+1:0)];
|
||||
double o6NR = a6NR[c6NR-((c6NR > d6N)?d6N+1:0)];
|
||||
double o6TR = a6TR[c6TR-((c6TR > d6T)?d6T+1:0)];
|
||||
double o6ZAR = a6ZAR[c6ZAR-((c6ZAR > d6ZA)?d6ZA+1:0)];
|
||||
double o6ZGR = a6ZGR[c6ZGR-((c6ZGR > d6ZG)?d6ZG+1:0)];
|
||||
|
||||
//-------- five
|
||||
|
||||
a6ZFL[c6ZFL] = ((o6YL*2.0) - (o6ZAL + o6ZBL + o6ZCL + o6ZDL + o6ZEL));
|
||||
a6ZGL[c6ZGL] = ((o6ZAL*2.0) - (o6YL + o6ZBL + o6ZCL + o6ZDL + o6ZEL));
|
||||
a6ZHL[c6ZHL] = ((o6ZBL*2.0) - (o6YL + o6ZAL + o6ZCL + o6ZDL + o6ZEL));
|
||||
a6ZIL[c6ZIL] = ((o6ZCL*2.0) - (o6YL + o6ZAL + o6ZBL + o6ZDL + o6ZEL));
|
||||
a6ZJL[c6ZJL] = ((o6ZDL*2.0) - (o6YL + o6ZAL + o6ZBL + o6ZCL + o6ZEL));
|
||||
a6ZKL[c6ZKL] = ((o6ZEL*2.0) - (o6YL + o6ZAL + o6ZBL + o6ZCL + o6ZDL));
|
||||
|
||||
c6ZFL++; if (c6ZFL < 0 || c6ZFL > d6ZF) c6ZFL = 0;
|
||||
c6ZGL++; if (c6ZGL < 0 || c6ZGL > d6ZG) c6ZGL = 0;
|
||||
c6ZHL++; if (c6ZHL < 0 || c6ZHL > d6ZH) c6ZHL = 0;
|
||||
c6ZIL++; if (c6ZIL < 0 || c6ZIL > d6ZI) c6ZIL = 0;
|
||||
c6ZJL++; if (c6ZJL < 0 || c6ZJL > d6ZJ) c6ZJL = 0;
|
||||
c6ZKL++; if (c6ZKL < 0 || c6ZKL > d6ZK) c6ZKL = 0;
|
||||
|
||||
double o6ZFL = a6ZFL[c6ZFL-((c6ZFL > d6ZF)?d6ZF+1:0)];
|
||||
double o6ZGL = a6ZGL[c6ZGL-((c6ZGL > d6ZG)?d6ZG+1:0)];
|
||||
double o6ZHL = a6ZHL[c6ZHL-((c6ZHL > d6ZH)?d6ZH+1:0)];
|
||||
double o6ZIL = a6ZIL[c6ZIL-((c6ZIL > d6ZI)?d6ZI+1:0)];
|
||||
double o6ZJL = a6ZJL[c6ZJL-((c6ZJL > d6ZJ)?d6ZJ+1:0)];
|
||||
double o6ZKL = a6ZKL[c6ZKL-((c6ZKL > d6ZK)?d6ZK+1:0)];
|
||||
|
||||
a6AR[c6AR] = ((o6BR*2.0) - (o6HR + o6NR + o6TR + o6ZAR + o6ZGR));
|
||||
a6GR[c6GR] = ((o6HR*2.0) - (o6BR + o6NR + o6TR + o6ZAR + o6ZGR));
|
||||
a6MR[c6MR] = ((o6NR*2.0) - (o6BR + o6HR + o6TR + o6ZAR + o6ZGR));
|
||||
a6SR[c6SR] = ((o6TR*2.0) - (o6BR + o6HR + o6NR + o6ZAR + o6ZGR));
|
||||
a6YR[c6YR] = ((o6ZAR*2.0) - (o6BR + o6HR + o6NR + o6TR + o6ZGR));
|
||||
a6ZFR[c6ZFR] = ((o6ZGR*2.0) - (o6BR + o6HR + o6NR + o6TR + o6ZAR));
|
||||
|
||||
c6AR++; if (c6AR < 0 || c6AR > d6A) c6AR = 0;
|
||||
c6GR++; if (c6GR < 0 || c6GR > d6G) c6GR = 0;
|
||||
c6MR++; if (c6MR < 0 || c6MR > d6M) c6MR = 0;
|
||||
c6SR++; if (c6SR < 0 || c6SR > d6S) c6SR = 0;
|
||||
c6YR++; if (c6YR < 0 || c6YR > d6Y) c6YR = 0;
|
||||
c6ZFR++; if (c6ZFR < 0 || c6ZFR > d6ZF) c6ZFR = 0;
|
||||
|
||||
double o6AR = a6AR[c6AR-((c6AR > d6A)?d6A+1:0)];
|
||||
double o6GR = a6GR[c6GR-((c6GR > d6G)?d6G+1:0)];
|
||||
double o6MR = a6MR[c6MR-((c6MR > d6M)?d6M+1:0)];
|
||||
double o6SR = a6SR[c6SR-((c6SR > d6S)?d6S+1:0)];
|
||||
double o6YR = a6YR[c6YR-((c6YR > d6Y)?d6Y+1:0)];
|
||||
double o6ZFR = a6ZFR[c6ZFR-((c6ZFR > d6ZF)?d6ZF+1:0)];
|
||||
|
||||
//-------- six
|
||||
|
||||
f6AL = ((o6AR*2.0) - (o6GR + o6MR + o6SR + o6YR + o6ZFR));
|
||||
f6BL = ((o6GR*2.0) - (o6AR + o6MR + o6SR + o6YR + o6ZFR));
|
||||
f6CL = ((o6MR*2.0) - (o6AR + o6GR + o6SR + o6YR + o6ZFR));
|
||||
f6DL = ((o6SR*2.0) - (o6AR + o6GR + o6MR + o6YR + o6ZFR));
|
||||
f6EL = ((o6YR*2.0) - (o6AR + o6GR + o6MR + o6SR + o6ZFR));
|
||||
f6FL = ((o6ZFR*2.0) - (o6AR + o6GR + o6MR + o6SR + o6YR));
|
||||
|
||||
f6FR = ((o6ZFL*2.0) - (o6ZGL + o6ZHL + o6ZIL + o6ZJL + o6ZKL));
|
||||
f6LR = ((o6ZGL*2.0) - (o6ZFL + o6ZHL + o6ZIL + o6ZJL + o6ZKL));
|
||||
f6RR = ((o6ZHL*2.0) - (o6ZFL + o6ZGL + o6ZIL + o6ZJL + o6ZKL));
|
||||
f6XR = ((o6ZIL*2.0) - (o6ZFL + o6ZGL + o6ZHL + o6ZJL + o6ZKL));
|
||||
f6ZER = ((o6ZJL*2.0) - (o6ZFL + o6ZGL + o6ZHL + o6ZIL + o6ZKL));
|
||||
f6ZKR = ((o6ZKL*2.0) - (o6ZFL + o6ZGL + o6ZHL + o6ZIL + o6ZJL));
|
||||
|
||||
inputSampleL = (o6ZFL + o6ZGL + o6ZHL + o6ZIL + o6ZJL + o6ZKL)*0.001953125;
|
||||
inputSampleR = (o6AR + o6GR + o6MR + o6SR + o6YR + o6ZFR)*0.001953125;
|
||||
|
||||
f6AL = (f6AL+avg6L)*0.5; avg6L = f6AL;
|
||||
f6FR = (f6FR+avg6R)*0.5; avg6R = f6FR;
|
||||
//manipulating deep reverb tail for realism
|
||||
|
||||
inputSampleL += (earlyReflectionL * earlyLoudness);
|
||||
inputSampleR += (earlyReflectionR * earlyLoudness);
|
||||
|
||||
bez[bez_CL] = bez[bez_BL];
|
||||
bez[bez_BL] = bez[bez_AL];
|
||||
bez[bez_AL] = inputSampleL;
|
||||
bez[bez_SampL] = 0.0;
|
||||
|
||||
bez[bez_CR] = bez[bez_BR];
|
||||
bez[bez_BR] = bez[bez_AR];
|
||||
bez[bez_AR] = inputSampleR;
|
||||
bez[bez_SampR] = 0.0;
|
||||
}
|
||||
double X = bez[bez_cycle]*bezTrim;
|
||||
double CBL = (bez[bez_CL]*(1.0-X))+(bez[bez_BL]*X);
|
||||
double CBR = (bez[bez_CR]*(1.0-X))+(bez[bez_BR]*X);
|
||||
double BAL = (bez[bez_BL]*(1.0-X))+(bez[bez_AL]*X);
|
||||
double BAR = (bez[bez_BR]*(1.0-X))+(bez[bez_AR]*X);
|
||||
double CBAL = (bez[bez_BL]+(CBL*(1.0-X))+(BAL*X))*-0.0625;
|
||||
double CBAR = (bez[bez_BR]+(CBR*(1.0-X))+(BAR*X))*-0.0625;
|
||||
inputSampleL = CBAL+bez[bez_AvgOutSampL]; bez[bez_AvgOutSampL] = CBAL;
|
||||
inputSampleR = CBAR+bez[bez_AvgOutSampR]; bez[bez_AvgOutSampR] = CBAR;
|
||||
|
||||
inputSampleL = (inputSampleL * wet)+(drySampleL * (1.0-wet));
|
||||
inputSampleR = (inputSampleR * wet)+(drySampleR * (1.0-wet));
|
||||
|
||||
//begin 32 bit stereo floating point dither
|
||||
int expon; frexpf((float)inputSampleL, &expon);
|
||||
fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5;
|
||||
inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
frexpf((float)inputSampleR, &expon);
|
||||
fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5;
|
||||
inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62));
|
||||
//end 32 bit stereo floating point dither
|
||||
|
||||
*outputL = inputSampleL;
|
||||
*outputR = inputSampleR;
|
||||
//direct stereo out
|
||||
|
||||
inputL += 1;
|
||||
inputR += 1;
|
||||
outputL += 1;
|
||||
outputR += 1;
|
||||
}
|
||||
return noErr;
|
||||
}
|
||||
1
plugins/MacSignedAU/kWoodRoom/kWoodRoom.exp
Executable file
1
plugins/MacSignedAU/kWoodRoom/kWoodRoom.exp
Executable file
|
|
@ -0,0 +1 @@
|
|||
_kWoodRoomEntry
|
||||
270
plugins/MacSignedAU/kWoodRoom/kWoodRoom.h
Executable file
270
plugins/MacSignedAU/kWoodRoom/kWoodRoom.h
Executable file
|
|
@ -0,0 +1,270 @@
|
|||
/*
|
||||
* File: kWoodRoom.h
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 11/1/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include "AUEffectBase.h"
|
||||
#include "kWoodRoomVersion.h"
|
||||
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
#include "AUDebugDispatcher.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifndef __kWoodRoom_h__
|
||||
#define __kWoodRoom_h__
|
||||
|
||||
|
||||
#pragma mark ____kWoodRoom Parameters
|
||||
|
||||
// parameters
|
||||
static const float kDefaultValue_ParamA = 0.5;
|
||||
static const float kDefaultValue_ParamB = 0.5;
|
||||
static const float kDefaultValue_ParamC = 0.25;
|
||||
static const float kDefaultValue_ParamD = 0.5;
|
||||
static const float kDefaultValue_ParamE = 0.5;
|
||||
static const float kDefaultValue_ParamF = 0.5;
|
||||
|
||||
static CFStringRef kParameterAName = CFSTR("Regen");
|
||||
static CFStringRef kParameterBName = CFSTR("Derez");
|
||||
static CFStringRef kParameterCName = CFSTR("Filter");
|
||||
static CFStringRef kParameterDName = CFSTR("EarlyRf");
|
||||
static CFStringRef kParameterEName = CFSTR("Positin");
|
||||
static CFStringRef kParameterFName = CFSTR("Dry/Wet");
|
||||
|
||||
enum {
|
||||
kParam_A =0,
|
||||
kParam_B =1,
|
||||
kParam_C =2,
|
||||
kParam_D =3,
|
||||
kParam_E =4,
|
||||
kParam_F =5,
|
||||
//Add your parameters here...
|
||||
kNumberOfParameters=6
|
||||
};
|
||||
|
||||
const int d3A = 581; const int d3B = 831; const int d3C = 832;
|
||||
const int d3D = 574; const int d3E = 598; const int d3F = 685;
|
||||
const int d3G = 499; const int d3H = 573; const int d3I = 655;
|
||||
#define THREEBYTHREE true
|
||||
const int d6A = 154; const int d6B = 832; const int d6C = 109; const int d6D = 685; const int d6E = 33; const int d6F = 12; const int d6G = 27; const int d6H = 30; const int d6I = 339; const int d6J = 499; const int d6K = 296; const int d6L = 169; const int d6M = 169; const int d6N = 831; const int d6O = 15; const int d6P = 411; const int d6Q = 238; const int d6R = 68; const int d6S = 0; const int d6T = 8; const int d6U = 655; const int d6V = 581; const int d6W = 465; const int d6X = 173; const int d6Y = 3; const int d6ZA = 96; const int d6ZB = 573; const int d6ZC = 243; const int d6ZD = 30; const int d6ZE = 188; const int d6ZF = 291; const int d6ZG = 11; const int d6ZH = 372; const int d6ZI = 574; const int d6ZJ = 100; const int d6ZK = 598; //1 to 90 ms, 249 seat club
|
||||
#define SIXBYSIX true // 249seat154832109x6 on 2025-10-31 kWoodRoom
|
||||
const int early[] = {0, 3, 8, 11, 12, 15, 27, 30, 30, 33, 68, 96, 100, 109, 154, 169, 169, 173, 188, 238, 243, 291, 296, 339, 372, 411, 465, 499, 573, 574, 581, 598, 655, 685, 831, 832};
|
||||
|
||||
#pragma mark ____kWoodRoom
|
||||
class kWoodRoom : public AUEffectBase
|
||||
{
|
||||
public:
|
||||
kWoodRoom(AudioUnit component);
|
||||
#if AU_DEBUG_DISPATCHER
|
||||
virtual ~kWoodRoom () { delete mDebugDispatcher; }
|
||||
#endif
|
||||
|
||||
virtual ComponentResult Reset(AudioUnitScope inScope, AudioUnitElement inElement);
|
||||
|
||||
virtual OSStatus ProcessBufferLists(AudioUnitRenderActionFlags & ioActionFlags,
|
||||
const AudioBufferList & inBuffer, AudioBufferList & outBuffer,
|
||||
UInt32 inFramesToProcess);
|
||||
virtual UInt32 SupportedNumChannels(const AUChannelInfo ** outInfo);
|
||||
|
||||
virtual ComponentResult GetParameterValueStrings(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
CFArrayRef * outStrings);
|
||||
|
||||
virtual ComponentResult GetParameterInfo(AudioUnitScope inScope,
|
||||
AudioUnitParameterID inParameterID,
|
||||
AudioUnitParameterInfo &outParameterInfo);
|
||||
|
||||
virtual ComponentResult GetPropertyInfo(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
UInt32 & outDataSize,
|
||||
Boolean & outWritable );
|
||||
|
||||
virtual ComponentResult GetProperty(AudioUnitPropertyID inID,
|
||||
AudioUnitScope inScope,
|
||||
AudioUnitElement inElement,
|
||||
void * outData);
|
||||
|
||||
virtual ComponentResult Initialize();
|
||||
virtual bool SupportsTail () { return true; }
|
||||
virtual Float64 GetTailTime() {return (1.0/GetSampleRate())*0.0;} //in SECONDS! gsr * a number = in samples
|
||||
virtual Float64 GetLatency() {return (1.0/GetSampleRate())*0.0;} // in SECONDS! gsr * a number = in samples
|
||||
|
||||
/*! @method Version */
|
||||
virtual ComponentResult Version() { return kkWoodRoomVersion; }
|
||||
|
||||
private:
|
||||
double a3AL[d3A+5];
|
||||
double a3BL[d3B+5];
|
||||
double a3CL[d3C+5];
|
||||
double a3DL[d3D+5];
|
||||
double a3EL[d3E+5];
|
||||
double a3FL[d3F+5];
|
||||
double a3GL[d3G+5];
|
||||
double a3HL[d3H+5];
|
||||
double a3IL[d3I+5];
|
||||
double a3AR[d3A+5];
|
||||
double a3BR[d3B+5];
|
||||
double a3CR[d3C+5];
|
||||
double a3DR[d3D+5];
|
||||
double a3ER[d3E+5];
|
||||
double a3FR[d3F+5];
|
||||
double a3GR[d3G+5];
|
||||
double a3HR[d3H+5];
|
||||
double a3IR[d3I+5];
|
||||
int c3AL,c3AR,c3BL,c3BR,c3CL,c3CR,c3DL,c3DR,c3EL,c3ER;
|
||||
int c3FL,c3FR,c3GL,c3GR,c3HL,c3HR,c3IL,c3IR;
|
||||
|
||||
double a6AL[d6A+5];
|
||||
double a6BL[d6B+5];
|
||||
double a6CL[d6C+5];
|
||||
double a6DL[d6D+5];
|
||||
double a6EL[d6E+5];
|
||||
double a6FL[d6F+5];
|
||||
double a6GL[d6G+5];
|
||||
double a6HL[d6H+5];
|
||||
double a6IL[d6I+5];
|
||||
double a6JL[d6J+5];
|
||||
double a6KL[d6K+5];
|
||||
double a6LL[d6L+5];
|
||||
double a6ML[d6M+5];
|
||||
double a6NL[d6N+5];
|
||||
double a6OL[d6O+5];
|
||||
double a6PL[d6P+5];
|
||||
double a6QL[d6Q+5];
|
||||
double a6RL[d6R+5];
|
||||
double a6SL[d6S+5];
|
||||
double a6TL[d6T+5];
|
||||
double a6UL[d6U+5];
|
||||
double a6VL[d6V+5];
|
||||
double a6WL[d6W+5];
|
||||
double a6XL[d6X+5];
|
||||
double a6YL[d6Y+5];
|
||||
double a6ZAL[d6ZA+5];
|
||||
double a6ZBL[d6ZB+5];
|
||||
double a6ZCL[d6ZC+5];
|
||||
double a6ZDL[d6ZD+5];
|
||||
double a6ZEL[d6ZE+5];
|
||||
double a6ZFL[d6ZF+5];
|
||||
double a6ZGL[d6ZG+5];
|
||||
double a6ZHL[d6ZH+5];
|
||||
double a6ZIL[d6ZI+5];
|
||||
double a6ZJL[d6ZJ+5];
|
||||
double a6ZKL[d6ZK+5];
|
||||
double a6AR[d6A+5];
|
||||
double a6BR[d6B+5];
|
||||
double a6CR[d6C+5];
|
||||
double a6DR[d6D+5];
|
||||
double a6ER[d6E+5];
|
||||
double a6FR[d6F+5];
|
||||
double a6GR[d6G+5];
|
||||
double a6HR[d6H+5];
|
||||
double a6IR[d6I+5];
|
||||
double a6JR[d6J+5];
|
||||
double a6KR[d6K+5];
|
||||
double a6LR[d6L+5];
|
||||
double a6MR[d6M+5];
|
||||
double a6NR[d6N+5];
|
||||
double a6OR[d6O+5];
|
||||
double a6PR[d6P+5];
|
||||
double a6QR[d6Q+5];
|
||||
double a6RR[d6R+5];
|
||||
double a6SR[d6S+5];
|
||||
double a6TR[d6T+5];
|
||||
double a6UR[d6U+5];
|
||||
double a6VR[d6V+5];
|
||||
double a6WR[d6W+5];
|
||||
double a6XR[d6X+5];
|
||||
double a6YR[d6Y+5];
|
||||
double a6ZAR[d6ZA+5];
|
||||
double a6ZBR[d6ZB+5];
|
||||
double a6ZCR[d6ZC+5];
|
||||
double a6ZDR[d6ZD+5];
|
||||
double a6ZER[d6ZE+5];
|
||||
double a6ZFR[d6ZF+5];
|
||||
double a6ZGR[d6ZG+5];
|
||||
double a6ZHR[d6ZH+5];
|
||||
double a6ZIR[d6ZI+5];
|
||||
double a6ZJR[d6ZJ+5];
|
||||
double a6ZKR[d6ZK+5];
|
||||
int c6AL,c6BL,c6CL,c6DL,c6EL,c6FL,c6GL,c6HL,c6IL;
|
||||
int c6JL,c6KL,c6LL,c6ML,c6NL,c6OL,c6PL,c6QL,c6RL;
|
||||
int c6SL,c6TL,c6UL,c6VL,c6WL,c6XL,c6YL,c6ZAL,c6ZBL;
|
||||
int c6ZCL,c6ZDL,c6ZEL,c6ZFL,c6ZGL,c6ZHL,c6ZIL,c6ZJL,c6ZKL;
|
||||
int c6AR,c6BR,c6CR,c6DR,c6ER,c6FR,c6GR,c6HR,c6IR;
|
||||
int c6JR,c6KR,c6LR,c6MR,c6NR,c6OR,c6PR,c6QR,c6RR;
|
||||
int c6SR,c6TR,c6UR,c6VR,c6WR,c6XR,c6YR,c6ZAR,c6ZBR;
|
||||
int c6ZCR,c6ZDR,c6ZER,c6ZFR,c6ZGR,c6ZHR,c6ZIR,c6ZJR,c6ZKR;
|
||||
double f6AL,f6BL,f6CL,f6DL,f6EL,f6FL;
|
||||
double f6FR,f6LR,f6RR,f6XR,f6ZER,f6ZKR;
|
||||
double avg6L,avg6R;
|
||||
|
||||
enum {
|
||||
bez_AL,
|
||||
bez_AR,
|
||||
bez_BL,
|
||||
bez_BR,
|
||||
bez_CL,
|
||||
bez_CR,
|
||||
bez_InL,
|
||||
bez_InR,
|
||||
bez_UnInL,
|
||||
bez_UnInR,
|
||||
bez_SampL,
|
||||
bez_SampR,
|
||||
bez_AvgInSampL,
|
||||
bez_AvgInSampR,
|
||||
bez_AvgOutSampL,
|
||||
bez_AvgOutSampR,
|
||||
bez_cycle,
|
||||
bez_total
|
||||
}; //the new undersampling. bez signifies the bezier curve reconstruction
|
||||
double bez[bez_total];
|
||||
|
||||
double bezF[bez_total];
|
||||
|
||||
uint32_t fpdL;
|
||||
uint32_t fpdR;
|
||||
};
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#endif
|
||||
61
plugins/MacSignedAU/kWoodRoom/kWoodRoom.r
Executable file
61
plugins/MacSignedAU/kWoodRoom/kWoodRoom.r
Executable file
|
|
@ -0,0 +1,61 @@
|
|||
/*
|
||||
* File: kWoodRoom.r
|
||||
*
|
||||
* Version: 1.0
|
||||
*
|
||||
* Created: 11/1/25
|
||||
*
|
||||
* Copyright: Copyright © 2025 Airwindows, Airwindows uses the MIT license
|
||||
*
|
||||
* 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
|
||||
* or redistribution of this Apple software constitutes acceptance of these terms. If you do
|
||||
* not agree with these terms, please do not use, install, modify or redistribute this Apple
|
||||
* software.
|
||||
*
|
||||
* In consideration of your agreement to abide by the following terms, and subject to these terms,
|
||||
* Apple grants you a personal, non-exclusive license, under Apple's copyrights in this
|
||||
* original Apple software (the "Apple Software"), to use, reproduce, modify and redistribute the
|
||||
* Apple Software, with or without modifications, in source and/or binary forms; provided that if you
|
||||
* redistribute the Apple Software in its entirety and without modifications, you must retain this
|
||||
* notice and the following text and disclaimers in all such redistributions of the Apple Software.
|
||||
* Neither the name, trademarks, service marks or logos of Apple Computer, Inc. may be used to
|
||||
* endorse or promote products derived from the Apple Software without specific prior written
|
||||
* permission from Apple. Except as expressly stated in this notice, no other rights or
|
||||
* licenses, express or implied, are granted by Apple herein, including but not limited to any
|
||||
* patent rights that may be infringed by your derivative works or by other works in which the
|
||||
* Apple Software may be incorporated.
|
||||
*
|
||||
* The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO WARRANTIES, EXPRESS OR
|
||||
* IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
|
||||
* AND FITNESS FOR A PARTICULAR PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE
|
||||
* OR IN COMBINATION WITH YOUR PRODUCTS.
|
||||
*
|
||||
* IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
|
||||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF THE USE,
|
||||
* REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER
|
||||
* UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN
|
||||
* IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
*/
|
||||
#include <AudioUnit/AudioUnit.r>
|
||||
|
||||
#include "kWoodRoomVersion.h"
|
||||
|
||||
// Note that resource IDs must be spaced 2 apart for the 'STR ' name and description
|
||||
#define kAudioUnitResID_kWoodRoom 1000
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ kWoodRoom~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#define RES_ID kAudioUnitResID_kWoodRoom
|
||||
#define COMP_TYPE kAudioUnitType_Effect
|
||||
#define COMP_SUBTYPE kWoodRoom_COMP_SUBTYPE
|
||||
#define COMP_MANUF kWoodRoom_COMP_MANF
|
||||
|
||||
#define VERSION kkWoodRoomVersion
|
||||
#define NAME "Airwindows: kWoodRoom"
|
||||
#define DESCRIPTION "kWoodRoom AU"
|
||||
#define ENTRY_POINT "kWoodRoomEntry"
|
||||
|
||||
#include "AUResources.r"
|
||||
1359
plugins/MacSignedAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.mode1v3
Executable file
1359
plugins/MacSignedAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.mode1v3
Executable file
File diff suppressed because it is too large
Load diff
142
plugins/MacSignedAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.pbxuser
Executable file
142
plugins/MacSignedAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.pbxuser
Executable file
|
|
@ -0,0 +1,142 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
089C1669FE841209C02AAC07 /* Project object */ = {
|
||||
activeBuildConfigurationName = Release;
|
||||
activeTarget = 8D01CCC60486CAD60068D4B7 /* kWoodRoom */;
|
||||
codeSenseManager = 8BD3CCB9148830B20062E48C /* Code sense */;
|
||||
perUserDictionary = {
|
||||
PBXConfiguration.PBXFileTableDataSource3.PBXFileTableDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
364,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
20,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
PBXFileDataSource_Target_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXConfiguration.PBXTargetDataSource.PBXTargetDataSource = {
|
||||
PBXFileTableDataSourceColumnSortingDirectionKey = "-1";
|
||||
PBXFileTableDataSourceColumnSortingKey = PBXFileDataSource_Filename_ColumnID;
|
||||
PBXFileTableDataSourceColumnWidthsKey = (
|
||||
20,
|
||||
188,
|
||||
60,
|
||||
20,
|
||||
48,
|
||||
43,
|
||||
43,
|
||||
);
|
||||
PBXFileTableDataSourceColumnsKey = (
|
||||
PBXFileDataSource_FiletypeID,
|
||||
PBXFileDataSource_Filename_ColumnID,
|
||||
PBXTargetDataSource_PrimaryAttribute,
|
||||
PBXFileDataSource_Built_ColumnID,
|
||||
PBXFileDataSource_ObjectSize_ColumnID,
|
||||
PBXFileDataSource_Errors_ColumnID,
|
||||
PBXFileDataSource_Warnings_ColumnID,
|
||||
);
|
||||
};
|
||||
PBXPerProjectTemplateStateSaveDate = 783773359;
|
||||
PBXWorkspaceStateSaveDate = 783773359;
|
||||
};
|
||||
perUserProjectItems = {
|
||||
8B2829512EB7764F003789A7 /* PBXTextBookmark */ = 8B2829512EB7764F003789A7 /* PBXTextBookmark */;
|
||||
8BD128442EB6E2C500B339E5 /* PBXTextBookmark */ = 8BD128442EB6E2C500B339E5 /* PBXTextBookmark */;
|
||||
8BD128462EB6E2C500B339E5 /* PBXTextBookmark */ = 8BD128462EB6E2C500B339E5 /* PBXTextBookmark */;
|
||||
};
|
||||
sourceControlManager = 8BD3CCB8148830B20062E48C /* Source Control */;
|
||||
userBuildSettings = {
|
||||
};
|
||||
};
|
||||
8B2829512EB7764F003789A7 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* kWoodRoom.h */;
|
||||
name = "kWoodRoom.h: 88";
|
||||
rLen = 0;
|
||||
rLoc = 4838;
|
||||
rType = 0;
|
||||
vrLen = 1065;
|
||||
vrLoc = 3804;
|
||||
};
|
||||
8BA05A660720730100365D66 /* kWoodRoom.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {939, 14634}}";
|
||||
sepNavSelRange = "{35694, 84}";
|
||||
sepNavVisRange = "{21092, 1777}";
|
||||
sepNavWindowFrame = "{{7, 52}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A690720730100365D66 /* kWoodRoomVersion.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {1056, 1062}}";
|
||||
sepNavSelRange = "{2906, 0}";
|
||||
sepNavVisRange = "{1069, 1900}";
|
||||
sepNavWindowFrame = "{{15, 47}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BA05A7F072073D200365D66 /* AUBase.cpp */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {516, 23430}}";
|
||||
sepNavSelRange = "{0, 0}";
|
||||
sepNavVisRange = "{0, 1336}";
|
||||
};
|
||||
};
|
||||
8BC6025B073B072D006C4272 /* kWoodRoom.h */ = {
|
||||
uiCtxt = {
|
||||
sepNavIntBoundsRect = "{{0, 0}, {7041, 4446}}";
|
||||
sepNavSelRange = "{4838, 0}";
|
||||
sepNavVisRange = "{3804, 1065}";
|
||||
sepNavWindowFrame = "{{15, 47}, {912, 826}}";
|
||||
};
|
||||
};
|
||||
8BD128442EB6E2C500B339E5 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BA05A660720730100365D66 /* kWoodRoom.cpp */;
|
||||
name = "kWoodRoom.cpp: 472";
|
||||
rLen = 0;
|
||||
rLoc = 22228;
|
||||
rType = 0;
|
||||
vrLen = 184;
|
||||
vrLoc = 22080;
|
||||
};
|
||||
8BD128462EB6E2C500B339E5 /* PBXTextBookmark */ = {
|
||||
isa = PBXTextBookmark;
|
||||
fRef = 8BC6025B073B072D006C4272 /* kWoodRoom.h */;
|
||||
name = "kWoodRoom.h: 88";
|
||||
rLen = 0;
|
||||
rLoc = 4838;
|
||||
rType = 0;
|
||||
vrLen = 1065;
|
||||
vrLoc = 3804;
|
||||
};
|
||||
8BD3CCB8148830B20062E48C /* Source Control */ = {
|
||||
isa = PBXSourceControlManager;
|
||||
fallbackIsa = XCSourceControlManager;
|
||||
isSCMEnabled = 0;
|
||||
scmConfiguration = {
|
||||
repositoryNamesForRoots = {
|
||||
"" = "";
|
||||
};
|
||||
};
|
||||
};
|
||||
8BD3CCB9148830B20062E48C /* Code sense */ = {
|
||||
isa = PBXCodeSenseManager;
|
||||
indexTemplatePath = "";
|
||||
};
|
||||
8D01CCC60486CAD60068D4B7 /* kWoodRoom */ = {
|
||||
activeExec = 0;
|
||||
};
|
||||
}
|
||||
1485
plugins/MacSignedAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.perspectivev3
Executable file
1485
plugins/MacSignedAU/kWoodRoom/kWoodRoom.xcodeproj/christopherjohnson.perspectivev3
Executable file
File diff suppressed because it is too large
Load diff
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue