34 const double kSmallestPositiveFloatValue = 1.175494351e-38;
35 const double kSmallestNegativeFloatValue = -1.175494351e-38;
36 const double kSqrtTwo = pow(2.0, 0.5);
37 const double kMinFilterFrequency = 20.0;
38 const double kMaxFilterFrequency = 20480.0;
39 const double ARC4RANDOMMAX = 4294967295.0;
59 bool retValue =
false;
60 if (value > 0.0 && value < kSmallestPositiveFloatValue)
65 else if (value < 0.0 && value > kSmallestNegativeFloatValue)
89 double denom = x2 - x1;
94 double dx = (x - x1) / (x2 - x1);
97 return dx*y2 + (1 - dx)*y1;
115 if (fractional_X >= 1.0)
return y2;
118 return fractional_X*y2 + (1.0 - fractional_X)*y1;
138 for (i = 0; i<n; i++)
141 for (j = 0; j<n; j++)
144 l *= (xbar - x[j]) / (x[i] - x[j]);
162 inline void boundValue(
double& value,
double minValue,
double maxValue)
164 value = fmin(value, maxValue);
165 value = fmax(value, minValue);
185 return unipolarModulatorValue*(maxValue - minValue) + minValue;
205 return maxValue - (1.0 - unipolarModulatorValue)*(maxValue - minValue);
225 double halfRange = (maxValue - minValue) / 2.0;
226 double midpoint = halfRange + minValue;
228 return bipolarModulatorValue*(halfRange) + midpoint;
242 return 2.0*value - 1.0;
256 return 0.5*value + 0.5;
270 return 20.0*log10(raw);
284 return pow(10.0, (dB / 20.0));
299 if (Q <= 0.707)
return 1.0;
300 return (Q*Q) / (pow((Q*Q - 0.25), 0.5));
328 #if defined _WINDOWS || defined _WINDLL 330 noise = (float)rand();
333 noise = 2.0*(noise / 32767.0) - 1.0;
336 noise = (float)arc4random();
339 noise = 2.0*(noise / ARC4RANDOMMAX) - 1.0;
353 inline double sgn(
double xn)
355 return (xn > 0) - (xn < 0);
368 inline double calcWSGain(
double xn,
double saturation,
double asymmetry)
370 double g = ((xn >= 0.0 && asymmetry > 0.0) || (xn < 0.0 && asymmetry < 0.0)) ? saturation * (1.0 + 4.0*fabs(asymmetry)) : saturation;
385 return atan(saturation*xn) / atan(saturation);
399 return tanh(saturation*xn) / tanh(saturation);
414 return sgn(xn)*(1.0 - exp(-fabs(saturation*xn)));
429 double wsGain =
calcWSGain(xn, saturation, asymmetry);
430 return sgn(xn)*(1.0 - exp(-fabs(wsGain*xn))) / (1.0 - exp(-wsGain));
443 inline double getMagResponse(
double theta,
double a0,
double a1,
double a2,
double b1,
double b2)
446 double num = a1*a1 + (a0 - a2)*(a0 - a2) + 2.0*a1*(a0 + a2)*cos(theta) + 4.0*a0*a2*cos(theta)*cos(theta);
447 double denom = b1*b1 + (1.0 - b2)*(1.0 - b2) + 2.0*b1*(1.0 + b2)*cos(theta) + 4.0*b2*cos(theta)*cos(theta);
449 magSqr = num / denom;
453 double mag = pow(magSqr, 0.5);
497 return complexProduct;
513 bool arithmeticBW =
true;
514 double bandwidth = fc / Q;
520 f_Low = fc - bandwidth / 2.0;
521 f_High = fc + bandwidth / 2.0;
561 double* magArray =
nullptr;
562 unsigned int dftArrayLen = 0;
563 double sampleRate = 44100.0;
624 return (
int)(testFreq / bin1Freq);
641 double targetF1 = testFreq;
642 double targetF2 = testFreq + relax_Bins*bin1Freq;
655 int relaxBins = nF2 - nF1;
666 transitionData.
stopBin = relaxBins + nF1;
671 if (transitionData.
edgeType == edgeTransition::kFallingEdge)
690 double actualLength = magData.
mirrorMag ? (double)magData.dftArrayLen : (
double)magData.dftArrayLen * 2.0;
691 int dumpLength = magData.
mirrorMag ? magData.dftArrayLen / 2 : magData.dftArrayLen;
694 double bin1 = magData.sampleRate / actualLength;
697 memset(&magData.magArray[0], 0, magData.dftArrayLen *
sizeof(
double));
701 fallingEdge.
edgeType = edgeTransition::kFallingEdge;
704 risingEdge.
edgeType = edgeTransition::kRisingEdge;
709 bool relaxIt =
false;
712 if(magData.filterType == brickwallFilter::kBrickLPF)
714 else if (magData.filterType == brickwallFilter::kBrickHPF)
716 else if (magData.filterType == brickwallFilter::kBrickBPF)
721 else if (magData.filterType == brickwallFilter::kBrickBSF)
728 for (
int i = 0; i < dumpLength; i++)
730 double eval_f = i*bin1;
732 if (magData.filterType == brickwallFilter::kBrickLPF)
736 if (eval_f <= magData.
fc)
737 magData.magArray[i] = 1.0;
742 magData.magArray[i] = 1.0;
747 else if (magData.filterType == brickwallFilter::kBrickHPF)
751 if (eval_f >= magData.
fc)
752 magData.magArray[i] = 1.0;
757 magData.magArray[i] = 1.0;
762 else if (magData.filterType == brickwallFilter::kBrickBPF)
766 if (eval_f >= magData.
f_Low && eval_f <= magData.
f_High)
767 magData.magArray[i] = 1.0;
772 magData.magArray[i] = 1.0;
780 else if (magData.filterType == brickwallFilter::kBrickBSF)
782 if (!relaxIt && eval_f >= magData.
f_Low && eval_f <= magData.
f_High)
783 magData.magArray[i] = 0.0;
784 else if((!relaxIt && eval_f < magData.
f_Low) || eval_f > magData.
f_High)
785 magData.magArray[i] = 1.0;
794 if (!magData.mirrorMag)
798 int index = magData.dftArrayLen / 2 - 1;
799 for (
unsigned int i = magData.dftArrayLen / 2; i <magData.dftArrayLen; i++)
801 magData.magArray[i] = magData.magArray[index--];
838 double* magArray =
nullptr;
839 unsigned int dftArrayLen = 0;
840 double sampleRate = 44100.0;
846 bool mirrorMag =
true;
861 double actualLength = magData.mirrorMag ? (double)magData.dftArrayLen : (
double)magData.dftArrayLen * 2.0;
862 int dumpLength = magData.mirrorMag ? magData.dftArrayLen / 2 : magData.dftArrayLen;
864 double bin1 = magData.sampleRate / actualLength;
865 double zeta = 1.0 / (2.0*magData.Q);
866 double w_c = 2.0*
kPi*magData.fc;
869 memset(&magData.magArray[0], 0, magData.dftArrayLen *
sizeof(
double));
871 for (
int i = 0; i < dumpLength; i++)
873 double eval_w = 2.0*
kPi*i*bin1;
874 double w_o = eval_w / w_c;
876 if (magData.filterType == analogFilter::kLPF1)
878 double denXSq = 1.0 + (w_o*w_o);
879 magData.magArray[i] = 1.0 / (pow(denXSq, 0.5));
881 else if (magData.filterType == analogFilter::kHPF1)
883 double denXSq = 1.0 + (w_o*w_o);
884 magData.magArray[i] = w_o / (pow(denXSq, 0.5));
886 else if (magData.filterType == analogFilter::kLPF2)
888 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
889 magData.magArray[i] = 1.0 / (pow(denXSq, 0.5));
891 else if (magData.filterType == analogFilter::kHPF2)
893 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
894 magData.magArray[i] = (w_o*w_o) / (pow(denXSq, 0.5));
896 else if (magData.filterType == analogFilter::kBPF2)
898 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
899 magData.magArray[i] = 2.0*w_o*zeta / (pow(denXSq, 0.5));
901 else if (magData.filterType == analogFilter::kBSF2)
903 double numXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o));
904 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
905 magData.magArray[i] = (pow(numXSq, 0.5)) / (pow(denXSq, 0.5));
910 if (!magData.mirrorMag)
914 int index = magData.dftArrayLen / 2 - 1;
915 for (
unsigned int i = magData.dftArrayLen / 2; i <magData.dftArrayLen; i++)
917 magData.magArray[i] = magData.magArray[index--];
935 inline void freqSample(
int N,
double A[],
double h[],
int symm)
941 if (symm == POSITIVE)
945 for (n = 0; n<N; n++)
949 for (k = 1; k <= M; k++)
950 val += 2.0 * A[k] * cos(x*k);
956 for (n = 0; n<N; n++)
960 for (k = 1; k <= (N / 2 - 1); k++)
961 val += 2.0 * A[k] * cos(x*k);
970 for (n = 0; n<N; n++)
974 for (k = 1; k <= M; k++)
975 val += 2.0 * A[k] * sin(x*k);
981 for (n = 0; n<N; n++)
983 val = A[N / 2] * sin(
kPi * (n - M));
985 for (k = 1; k <= (N / 2 - 1); k++)
986 val += 2.0 * A[k] * sin(x*k);
1005 return sqrt((re*re) + (im*im));
1020 return atan2(im, re);
1041 enum class interpolation {kLinear, kLagrange4};
1060 inline bool resample(
double* input,
double* output, uint32_t inLength, uint32_t outLength,
1061 interpolation interpType = interpolation::kLinear,
1062 double scalar = 1.0,
double* outWindow =
nullptr)
1064 if (inLength == 0 || outLength == 0)
return false;
1065 if (!input || !output)
return false;
1067 double x[4] = { 0.0 };
1068 double y[4] = { 0.0 };
1071 double inc = (double)inLength / (
double)(outLength);
1075 output[0] = outWindow[0] * scalar * input[0];
1077 output[0] = scalar * input[0];
1079 if (interpType == interpolation::kLagrange4)
1081 for (
unsigned int i = 1; i < outLength; i++)
1084 double xInterp = i*inc;
1085 int x1 = (int)xInterp;
1088 if (xInterp > 1 && x1 < outLength-2)
1091 y[0] = input[(int)x[0]];
1094 y[1] = input[(int)x[1]];
1097 y[2] = input[(int)x[2]];
1100 y[3] = input[(int)x[3]];
1110 if (x2 >= outLength)
1112 double y1 = input[x1];
1113 double y2 = input[x2];
1125 for (
unsigned int i = 1; i < outLength; i++)
1127 double xInterp = i*inc;
1128 int x1 = (int)xInterp;
1130 if (x2 >= outLength)
1132 double y1 = input[x1];
1133 double y2 = input[x2];
1168 virtual bool reset(
double _sampleRate) = 0;
1196 uint32_t inputChannels,
1197 uint32_t outputChannels)
1248 virtual bool reset(
double _sampleRate) = 0;
1322 enum class biquadAlgorithm { kDirect, kCanonical, kTransposeDirect, kTransposeCanonical };
1343 if (
this == ¶ms)
1381 memset(&
stateArray[0], 0,
sizeof(
double)*numStates);
1411 memcpy(&
coeffArray[0], &coeffs[0],
sizeof(
double)*numCoeffs);
1436 double coeffArray[numCoeffs] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
1463 kLPF1P, kLPF1, kHPF1, kLPF2, kHPF2, kBPF2, kBSF2, kButterLPF2, kButterHPF2, kButterBPF2,
1464 kButterBSF2, kMMALPF2, kMMALPF2B, kLowShelf, kHiShelf, kNCQParaEQ, kCQParaEQ, kLWRLPF2, kLWRHPF2,
1465 kAPF1, kAPF2, kResonA, kResonB, kMatchLP2A, kMatchLP2B, kMatchBP2A, kMatchBP2B,
1466 kImpInvLP1, kImpInvLP2
1487 if (
this == ¶ms)
1595 double coeffArray[numCoeffs] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
1649 if (
this == ¶ms)
1686 params.
algorithm = filterAlgorithm::kLWRLPF2;
1690 params.
algorithm = filterAlgorithm::kLWRHPF2;
1769 const unsigned int TLD_AUDIO_DETECT_MODE_PEAK = 0;
1770 const unsigned int TLD_AUDIO_DETECT_MODE_MS = 1;
1771 const unsigned int TLD_AUDIO_DETECT_MODE_RMS = 2;
1772 const double TLD_AUDIO_ENVELOPE_ANALOG_TC = -0.99967234081320612357829304641019;
1796 if (
this == ¶ms)
1858 double input = fabs(xn);
1866 double currEnvelope = 0.0;
1879 currEnvelope = fmin(currEnvelope, 1.0);
1882 currEnvelope = fmax(currEnvelope, 0.0);
1889 currEnvelope = pow(currEnvelope, 0.5);
1893 return currEnvelope;
1896 if (currEnvelope <= 0)
1902 return 20.0*log10(currEnvelope);
1949 void setAttackTime(
double attack_in_ms,
bool forceCalc =
false);
1952 void setReleaseTime(
double release_in_ms,
bool forceCalc =
false);
1993 if (
this == ¶ms)
2111 double detect_dB = 0.0;
2126 return xn * gr * makeupGain;
2139 double output_dB = 0.0;
2148 output_dB = detect_dB;
2161 output_dB = detect_dB;
2189 output_dB = detect_dB;
2193 output_dB = -1.0e34;
2202 output_dB = detect_dB;
2232 template <
typename T>
2240 void flushBuffer() { memset(&buffer[0], 0, bufferLength *
sizeof(T)); }
2247 bufferLength = _bufferLength;
2250 buffer.reset(
new T[bufferLength]);
2259 if (index >= bufferLength)
return;
2262 buffer[index] = input;
2268 if (index >= bufferLength)
return 0.0;
2271 return buffer[index];
2275 std::unique_ptr<T[]> buffer =
nullptr;
2276 unsigned int bufferLength = 1024;
2294 template <
typename T>
2302 void flushBuffer(){ memset(&buffer[0], 0, bufferLength *
sizeof(T)); }
2320 bufferLength = _bufferLengthPowerOfTwo;
2323 wrapMask = bufferLength - 1;
2326 buffer.reset(
new T[bufferLength]);
2336 buffer[writeIndex++] = input;
2339 writeIndex &= wrapMask;
2348 int readIndex = (writeIndex - 1) - delayInSamples;
2351 readIndex &= wrapMask;
2354 return buffer[readIndex];
2361 T y1 =
readBuffer((
int)delayInFractionalSamples);
2364 if (!interpolate)
return y1;
2369 T y2 =
readBuffer((
int)delayInFractionalSamples + 1);
2372 double fraction = delayInFractionalSamples - (int)delayInFractionalSamples;
2382 std::unique_ptr<T[]> buffer =
nullptr;
2383 unsigned int writeIndex = 0;
2384 unsigned int bufferLength = 1024;
2385 unsigned int wrapMask = 1023;
2386 bool interpolate =
true;
2431 double output = 0.0;
2438 for (
unsigned int i = 0; i <
length; i++)
2445 output += signal*irrrrr;
2457 void init(
unsigned int lengthPowerOfTwo)
2459 length = lengthPowerOfTwo;
2468 if (lengthPowerOfTwo !=
length)
2470 length = lengthPowerOfTwo;
2477 for (
unsigned int i = 0; i <
length; i++)
2492 const unsigned int IR_LEN = 512;
2512 if (
this == ¶ms)
2557 sampleRate = _sampleRate;
2558 convolver.
reset(_sampleRate);
2559 convolver.
init(IR_LEN);
2589 if (_parameters.
fc != parameters.
fc ||
2590 _parameters.
Q != parameters.
Q ||
2595 analogFilterData.sampleRate = sampleRate;
2596 analogFilterData.magArray = &analogMagArray[0];
2597 analogFilterData.dftArrayLen = IR_LEN;
2598 analogFilterData.mirrorMag =
false;
2600 analogFilterData.filterType = _parameters.
filterType;
2601 analogFilterData.fc = _parameters.
fc;
2602 analogFilterData.Q = _parameters.
Q;
2608 freqSample(IR_LEN, analogMagArray, irArray, POSITIVE);
2614 parameters = _parameters;
2620 double analogMagArray[IR_LEN] = { 0.0 };
2621 double irArray[IR_LEN] = { 0.0 };
2622 double sampleRate = 0.0;
2674 if (
this == ¶ms)
2730 if (sampleRate == _sampleRate)
2752 double yn = delayBuffer_L.
readBuffer(delayInSamples_L);
2755 double dn = xn + (parameters.
feedback_Pct / 100.0) * yn;
2761 double output = dryMix*xn + wetMix*yn;
2772 uint32_t inputChannels,
2773 uint32_t outputChannels)
2776 if (inputChannels == 0 || outputChannels == 0)
2780 if (parameters.
algorithm != delayAlgorithm::kNormal &&
2781 parameters.
algorithm != delayAlgorithm::kPingPong)
2785 if (outputChannels == 1)
2797 double xnL = inputFrame[0];
2800 double xnR = inputChannels > 1 ? inputFrame[1] : xnL;
2803 double ynL = delayBuffer_L.
readBuffer(delayInSamples_L);
2806 double ynR = delayBuffer_R.
readBuffer(delayInSamples_R);
2809 double dnL = xnL + (parameters.
feedback_Pct / 100.0) * ynL;
2812 double dnR = xnR + (parameters.
feedback_Pct / 100.0) * ynR;
2815 if (parameters.
algorithm == delayAlgorithm::kNormal)
2823 else if (parameters.
algorithm == delayAlgorithm::kPingPong)
2833 double outputL = dryMix*xnL + wetMix*ynL;
2836 double outputR = dryMix*xnR + wetMix*ynR;
2839 outputFrame[0] = outputL;
2842 outputFrame[1] = outputR;
2861 dryMix = pow(10.0, _parameters.
dryLevel_dB / 20.0);
2863 wetMix = pow(10.0, _parameters.
wetLevel_dB / 20.0);
2866 parameters = _parameters;
2869 if (parameters.
updateType == delayUpdateType::kLeftAndRight)
2873 double newDelayInSamples_L = parameters.
leftDelay_mSec*(samplesPerMSec);
2874 double newDelayInSamples_R = parameters.
rightDelay_mSec*(samplesPerMSec);
2877 delayInSamples_L = newDelayInSamples_L;
2878 delayInSamples_R = newDelayInSamples_R;
2880 else if (parameters.
updateType == delayUpdateType::kLeftPlusRatio)
2887 double newDelayInSamples = parameters.
leftDelay_mSec*(samplesPerMSec);
2890 delayInSamples_L = newDelayInSamples;
2891 delayInSamples_R = delayInSamples_L*delayRatio;
2899 bufferLength_mSec = _bufferLength_mSec;
2900 sampleRate = _sampleRate;
2901 samplesPerMSec = sampleRate / 1000.0;
2904 bufferLength = (
unsigned int)(bufferLength_mSec*(samplesPerMSec)) + 1;
2914 double sampleRate = 0.0;
2915 double samplesPerMSec = 0.0;
2916 double delayInSamples_L = 0.0;
2917 double delayInSamples_R = 0.0;
2918 double bufferLength_mSec = 0.0;
2919 unsigned int bufferLength = 0;
2920 double wetMix = 0.707;
2921 double dryMix = 0.707;
2961 if (
this == ¶ms)
2995 LFO() { srand(time(NULL)); }
3049 if (
phaseInc > 0 && moduloCounter >= 1.0)
3051 moduloCounter -= 1.0;
3056 if (
phaseInc < 0 && moduloCounter <= 0.0)
3058 moduloCounter += 1.0;
3072 if (
phaseInc > 0 && moduloCounter >= 1.0)
3074 moduloCounter -= 1.0;
3079 if (
phaseInc < 0 && moduloCounter <= 0.0)
3081 moduloCounter += 1.0;
3091 const double B = 4.0 /
kPi;
3092 const double C = -4.0 / (
kPi*
kPi);
3093 const double P = 0.225;
3097 double y = B * angle + C * angle * fabs(angle);
3098 y = P * (y * fabs(y) - y) + y;
3162 memset(&
stateArray[0], 0,
sizeof(
double)*numDFOStates);
3222 double n = wnT1 / wT;
3288 if (
this == ¶ms)
3334 delay.
reset(_sampleRate);
3338 lfo.
reset(_sampleRate);
3340 params.
waveform = generatorWaveform::kTriangle;
3365 uint32_t inputChannels,
3366 uint32_t outputChannels)
3369 if (inputChannels == 0 || outputChannels == 0)
3377 double minDelay_mSec = 0.0;
3378 double maxDepth_mSec = 0.0;
3381 if (parameters.
algorithm == modDelaylgorithm::kFlanger)
3383 minDelay_mSec = 0.1;
3384 maxDepth_mSec = 7.0;
3388 if (parameters.
algorithm == modDelaylgorithm::kChorus)
3390 minDelay_mSec = 10.0;
3391 maxDepth_mSec = 30.0;
3396 if (parameters.
algorithm == modDelaylgorithm::kVibrato)
3398 minDelay_mSec = 0.0;
3399 maxDepth_mSec = 7.0;
3407 double modulationMin = minDelay_mSec;
3408 double modulationMax = minDelay_mSec + maxDepth_mSec;
3411 if (parameters.
algorithm == modDelaylgorithm::kFlanger)
3413 modulationMin, modulationMax);
3425 return delay.
processAudioFrame(inputFrame, outputFrame, inputChannels, outputChannels);
3441 parameters = _parameters;
3445 if (parameters.
algorithm == modDelaylgorithm::kVibrato)
3446 lfoParams.
waveform = generatorWaveform::kSin;
3448 lfoParams.
waveform = generatorWaveform::kTriangle;
3480 if (
this == ¶ms)
3498 const unsigned int PHASER_STAGES = 6;
3520 const double apf0_minF = 32.0;
3521 const double apf0_maxF = 1500.0;
3523 const double apf1_minF = 68.0;
3524 const double apf1_maxF = 3400.0;
3526 const double apf2_minF = 96.0;
3527 const double apf2_maxF = 4800.0;
3529 const double apf3_minF = 212.0;
3530 const double apf3_maxF = 10000.0;
3532 const double apf4_minF = 320.0;
3533 const double apf4_maxF = 16000.0;
3535 const double apf5_minF = 636.0;
3536 const double apf5_maxF = 20480.0;
3560 lfoparams.
waveform = generatorWaveform::kTriangle;
3565 params.
algorithm = filterAlgorithm::kAPF1;
3568 for (
int i = 0; i < PHASER_STAGES; i++)
3584 for (
int i = 0; i < PHASER_STAGES; i++){
3606 double modulatorValue = lfoValue*depth;
3643 double alpha0 = 1.0 / (1.0 + K*gamma6);
3649 double u = alpha0*(xn + K*Sn);
3666 double output = 0.125*xn + 1.25*APF6;
3720 if (
this == ¶ms)
3768 return simpleLPFParameters;
3777 simpleLPFParameters = params;
3787 double g = simpleLPFParameters.
g;
3788 double yn = (1.0 - g)*xn + g*state;
3818 if (
this == ¶ms)
3863 if (sampleRate == _sampleRate)
3882 return simpleDelayParameters;
3891 simpleDelayParameters = params;
3923 bufferLength_mSec = _bufferLength_mSec;
3924 sampleRate = _sampleRate;
3925 samplesPerMSec = sampleRate / 1000.0;
3928 bufferLength = (
unsigned int)(bufferLength_mSec*(samplesPerMSec)) + 1;
3945 double _delay_Samples = _delay_mSec*(samplesPerMSec);
3948 return delayBuffer.
readBuffer(_delay_Samples);
3968 double sampleRate = 0.0;
3969 double samplesPerMSec = 0.0;
3970 double bufferLength_mSec = 0.0;
3971 unsigned int bufferLength = 0;
3995 if (
this == ¶ms)
4065 double g2 = lpf_g*(1.0 - comb_g);
4066 double filteredSignal = yn + g2*lpf_state;
4067 input = xn + comb_g*(filteredSignal);
4068 lpf_state = filteredSignal;
4072 input = xn + comb_g*yn;
4090 return combFilterParameters;
4099 combFilterParameters = params;
4108 double exponent = -3.0*delayParams.
delay_Samples*(1.0 / sampleRate);
4109 double rt60_mSec = combFilterParameters.
RT60Time_mSec / 1000.0;
4110 comb_g = pow(10.0, exponent / rt60_mSec);
4113 lpf_g = combFilterParameters.
lpf_g;
4119 sampleRate = _sampleRate;
4120 bufferLength_mSec = delay_mSec;
4128 double sampleRate = 0.0;
4129 double comb_g = 0.0;
4130 double bufferLength_mSec = 0.0;
4134 double lpf_state = 0.0;
4157 if (
this == ¶ms)
4247 minDelay = fmax(0.0, minDelay);
4252 minDelay, maxDelay);
4264 wnD = wnD*(1.0 - lpf_g) + lpf_g*
lpf_state;
4269 double wn = xn + apf_g*wnD;
4272 double yn = -apf_g*wn + wnD;
4353 if (
this == ¶ms)
4417 nestedAPF.
reset(_sampleRate);
4445 minDelay = fmax(0.0, minDelay);
4451 minDelay, maxDelay);
4463 wnD = wnD*(1.0 - lpf_g) + lpf_g*
lpf_state;
4468 double wn = xn + apf_g*wnD;
4474 double yn = -apf_g*wn + wnD;
4497 nestedAPFParameters = params;
4552 if (
this == ¶ms)
4592 params.
algorithm = filterAlgorithm::kLowShelf;
4596 params.
algorithm = filterAlgorithm::kHiShelf;
4605 lowShelfFilter.
reset(_sampleRate);
4606 highShelfFilter.
reset(_sampleRate);
4624 return filteredSignal;
4642 parameters = params;
4692 if (
this == ¶ms)
4743 const unsigned int NUM_BRANCHES = 4;
4744 const unsigned int NUM_CHANNELS = 2;
4773 sampleRate = _sampleRate;
4776 preDelay.
reset(_sampleRate);
4779 for (
int i = 0; i < NUM_BRANCHES; i++)
4781 branchDelays[i].
reset(_sampleRate);
4784 branchNestedAPFs[i].
reset(_sampleRate);
4787 branchLPFs[i].
reset(_sampleRate);
4789 for (
int i = 0; i < NUM_CHANNELS; i++)
4791 shelvingFilters[i].
reset(_sampleRate);
4807 float inputs[2] = { 0.0 };
4808 float outputs[2] = { 0.0 };
4816 uint32_t inputChannels,
4817 uint32_t outputChannels)
4820 double globFB = branchDelays[NUM_BRANCHES-1].
readDelay();
4823 double fb = parameters.
kRT*(globFB);
4826 double xnL = inputFrame[0];
4827 double xnR = inputChannels > 1 ? inputFrame[1] : 0.0;
4828 double monoXn = double(1.0 / inputChannels)*xnL + double(1.0 / inputChannels)*xnR;
4834 double input = preDelayOut + fb;
4835 for (
int i = 0; i < NUM_BRANCHES; i++)
4840 input = delayOut + preDelayOut;
4852 double weight = 0.707;
4866 if (parameters.
density == reverbDensity::kThick)
4884 double dry = pow(10.0, parameters.
dryLevel_dB / 20.0);
4885 double wet = pow(10.0, parameters.
wetLevel_dB / 20.0);
4887 if (outputChannels == 1)
4888 outputFrame[0] = dry*xnL + wet*(0.5*tankOutL + 0.5*tankOutR);
4891 outputFrame[0] = dry*xnL + wet*tankOutL;
4892 outputFrame[1] = dry*xnR + wet*tankOutR;
4923 lpfParams.
g = params.
lpf_g;
4925 for (
int i = 0; i < NUM_BRANCHES; i++)
4949 for (
int i = 0; i < NUM_BRANCHES; i++)
4968 delayParams.
delayTime_mSec = globalFixedMaxDelay*fixedDelayWeight[i];
4973 parameters = params;
4988 double apfDelayWeight[NUM_BRANCHES * 2] = { 0.317, 0.873, 0.477, 0.291, 0.993, 0.757, 0.179, 0.575 };
4989 double fixedDelayWeight[NUM_BRANCHES] = { 1.0, 0.873, 0.707, 0.667 };
4990 double sampleRate = 0.0;
5052 double output_dB = 0.0;
5055 bool softknee =
true;
5056 double kneeWidth_dB = 10.0;
5063 output_dB = detect_dB;
5073 output_dB = detect_dB;
5075 else if (2.0*(fabs(detect_dB -
threshold_dB)) <= kneeWidth_dB)
5076 output_dB = detect_dB - pow((detect_dB -
threshold_dB + (kneeWidth_dB / 2.0)), 2.0) / (2.0*kneeWidth_dB);
5078 else if (2.0*(detect_dB -
threshold_dB) > kneeWidth_dB)
5083 return pow(10.0, (output_dB - detect_dB) / 20.0);
5113 kLPF1, kHPF1, kAPF1, kSVF_LP, kSVF_HP, kSVF_BP, kSVF_BS
5134 if (
this == ¶ms)
5240 double halfPeak_dBGain =
dB2Raw(-peak_dB / 2.0);
5241 xn *= halfPeak_dBGain;
5262 double hpf = xn - lpf;
5265 double apf = lpf - hpf;
5271 if (matchAnalogNyquistLPF)
5272 return lpf +
alpha*hpf;
5297 double bsf = hpf + lpf;
5311 if (matchAnalogNyquistLPF)
5313 return filterOutputGain*lpf;
5316 return filterOutputGain*hpf;
5318 return filterOutputGain*bpf;
5320 return filterOutputGain*bsf;
5323 return filterOutputGain*lpf;
5337 double wa = (2.0 / T)*tan(wd*T / 2.0);
5338 double g = wa*T / 2.0;
5346 alpha = g / (1.0 + g);
5352 alpha0 = 1.0 / (1.0 + 2.0*R*g + g*g);
5404 if (
this == ¶ms)
5451 filterParams.
fc = 1000.0;
5461 adParams.
detectMode = TLD_AUDIO_DETECT_MODE_RMS;
5494 filterParams.
fc = params.
fc;
5495 filterParams.
Q = params.
Q;
5525 double detectValue = pow(10.0, detect_dB / 20.0);
5526 double deltaValue = detectValue - threshValue;
5532 if (deltaValue > 0.0)
5535 double modulatorValue = 0.0;
5591 if (
this == ¶ms)
5649 params.
algorithm = filterAlgorithm::kHPF1;
5653 params.
algorithm = filterAlgorithm::kLowShelf;
5685 filterParams.
algorithm = filterAlgorithm::kHPF1;
5689 filterParams.
algorithm = filterAlgorithm::kLowShelf;
5706 double output = 0.0;
5739 const unsigned int NUM_TUBES = 4;
5758 if (
this == ¶ms)
5823 tubeParams.
waveshaper = distortionModel::kFuzzAsym;
5825 for (
int i = 0; i < NUM_TUBES; i++)
5870 for (
int i = 0; i < NUM_TUBES; i++)
5922 if (
this == ¶ms)
5957 virtual bool reset(
double _sampleRate){
return true; }
5988 return QL*(int(xn /
QL));
6029 virtual void setInput1(
double _in1) = 0;
6032 virtual void setInput2(
double _in2) = 0;
6035 virtual void setInput3(
double _in3) = 0;
6047 virtual void reset(
double _sampleRate) {}
6336 WdfSeriesLC(
double _componentValue_L,
double _componentValue_C)
6398 double YC = 1.0 /
RC;
6399 double K = (1.0 -
RL*YC) / (1.0 +
RL*YC);
6456 WdfParallelLC(
double _componentValue_L,
double _componentValue_C)
6518 double YL = 1.0 /
RL;
6519 double K = (YL*
RC - 1.0) / (YL*
RC + 1.0);
6577 WdfSeriesRL(
double _componentValue_R,
double _componentValue_L)
6700 WdfParallelRL(
double _componentValue_R,
double _componentValue_L)
6824 WdfSeriesRC(
double _componentValue_R,
double _componentValue_C)
6947 WdfParallelRC(
double _componentValue_R,
double _componentValue_C)
7071 enum class wdfComponent { R, L, C, seriesLC, parallelLC, seriesRL, parallelRL, seriesRC, parallelRC };
7173 if (componentType == wdfComponent::R)
7179 else if (componentType == wdfComponent::L)
7185 else if (componentType == wdfComponent::C)
7191 else if (componentType == wdfComponent::seriesLC)
7197 else if (componentType == wdfComponent::parallelLC)
7203 else if (componentType == wdfComponent::seriesRL)
7209 else if (componentType == wdfComponent::parallelRL)
7215 else if (componentType == wdfComponent::seriesRC)
7221 else if (componentType == wdfComponent::parallelRC)
7253 wdfComponent->setComponentValue_LC(componentValue_L, componentValue_C);
7260 wdfComponent->setComponentValue_RL(componentValue_R, componentValue_L);
7267 wdfComponent->setComponentValue_RC(componentValue_R, componentValue_C);
7333 double componentResistance = 0.0;
7337 R2 =
R1 + componentResistance;
7347 double componentResistance = 0.0;
7352 B =
R1 / (
R1 + componentResistance);
7359 R3 = componentResistance;
7441 double componentResistance = 0.0;
7445 R2 =
R1 + componentResistance;
7455 double componentResistance = 0.0;
7467 R3 = componentResistance;
7480 double N3 =
in1 + N2;
7543 double componentConductance = 0.0;
7548 R2 = 1.0 / ((1.0 /
R1) + componentConductance);
7558 double G1 = 1.0 /
R1;
7559 double componentConductance = 0.0;
7564 A = G1 / (G1 + componentConductance);
7571 R3 = 1.0/ componentConductance;
7600 N1 =
in2 - A*(-
in1 + N2);
7653 double componentConductance = 0.0;
7658 R2 = 1.0 / ((1.0 /
R1) + componentConductance);
7668 double G1 = 1.0 /
R1;
7673 double componentConductance = 0.0;
7677 A1 = 2.0*G1 / (G1 + componentConductance + G2);
7685 R3 = 1.0 / componentConductance;
7699 N1 = -A1*(-
in1 + N2) + N2 - A3*N2;
7824 double L1_value = 95.49e-3;
7825 double C1_value = 0.5305e-6;
7826 double L2_value = 95.49e-3;
7935 fc_Hz = fc_Hz*(tan(arg) / arg);
7949 double L1_norm = 95.493;
7950 double C1_norm = 530.516e-6;
7951 double L2_norm = 95.493;
8160 if (
this == ¶ms)
8203 sampleRate = _sampleRate;
8276 double arg = (
kPi*fc_Hz) / sampleRate;
8277 fc_Hz = fc_Hz*(tan(arg) / arg);
8280 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8281 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8295 double sampleRate = 1.0;
8398 fc_Hz = fc_Hz*(tan(arg) / arg);
8401 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8402 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8447 sampleRate = _sampleRate;
8519 double arg = (
kPi*fc_Hz) / sampleRate;
8520 fc_Hz = fc_Hz*(tan(arg) / arg);
8523 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8524 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8539 double sampleRate = 1.0;
8642 fc_Hz = fc_Hz*(tan(arg) / arg);
8645 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8646 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8682 enum class windowType {kNoWindow, kRectWindow, kHannWindow, kBlackmanHarrisWindow, kHammingWindow };
8694 inline std::unique_ptr<double[]>
makeWindow(
unsigned int windowLength,
unsigned int hopSize,
windowType window,
double& gainCorrectionValue)
8696 std::unique_ptr<double[]> windowBuffer;
8697 windowBuffer.reset(
new double[windowLength]);
8699 if (!windowBuffer)
return nullptr;
8701 double overlap = hopSize > 0.0 ? 1.0 - (double)hopSize / (
double)windowLength : 0.0;
8702 gainCorrectionValue = 0.0;
8704 for (
int n = 0; n < windowLength; n++)
8706 if (window == windowType::kRectWindow)
8708 if (n >= 1 && n <= windowLength - 1)
8709 windowBuffer[n] = 1.0;
8711 else if (window == windowType::kHammingWindow)
8713 windowBuffer[n] = 0.54 - 0.46*cos((n*2.0*
kPi) / (windowLength));
8715 else if (window == windowType::kHannWindow)
8717 windowBuffer[n] = 0.5 * (1 - cos((n*2.0*
kPi) / (windowLength)));
8719 else if (window == windowType::kBlackmanHarrisWindow)
8721 windowBuffer[n] = (0.42323 - (0.49755*cos((n*2.0*
kPi) / (windowLength))) + 0.07922*cos((2 * n*2.0*
kPi) / (windowLength)));
8723 else if (window == windowType::kNoWindow)
8725 windowBuffer[n] = 1.0;
8728 gainCorrectionValue += windowBuffer[n];
8732 if (window != windowType::kNoWindow)
8733 gainCorrectionValue = (1.0 - overlap) / gainCorrectionValue;
8735 gainCorrectionValue = 1.0 / gainCorrectionValue;
8737 return windowBuffer;
8779 fftw_complex*
doFFT(
double* inputReal,
double* inputImag =
nullptr);
8782 fftw_complex*
doInverseFFT(
double* inputReal,
double* inputImag);
8858 void doOverlapAdd(
double* outputData =
nullptr,
int length = 0);
8990 if (!irBuffer)
return;
9008 for (
int i = 0; i < 2; i++)
9020 bool fftReady =
false;
9021 double output = 0.0;
9046 signalFFT[i][0] = product.
real;
9047 signalFFT[i][1] = product.
imag;
9079 const unsigned int PSM_FFT_LEN = 4096;
9100 if (
this == ¶ms)
9154 if (
this == ¶ms)
9203 memset(&
phi[0], 0,
sizeof(
double)*PSM_FFT_LEN);
9204 memset(&
psi[0], 0,
sizeof(
double)* PSM_FFT_LEN);
9208 for (
int i = 0; i < PSM_FFT_LEN; i++)
9227 double newAlpha = pow(2.0, semitones / 12.0);
9228 double newOutputBufferLength = round((1.0/newAlpha)*(
double)PSM_FFT_LEN);
9265 int previousPeak = -1;
9266 for (
int i = 0; i < PSM_FFT_LEN; i++)
9272 if (dist > PSM_FFT_LEN/4)
9280 else if (dist < delta)
9287 return previousPeak;
9296 double localWindow[4] = { 0.0 };
9298 for (
int i = 0; i < PSM_FFT_LEN; i++)
9302 localWindow[0] = 0.0;
9303 localWindow[1] = 0.0;
9309 localWindow[0] = 0.0;
9314 else if (i == PSM_FFT_LEN - 1)
9318 localWindow[2] = 0.0;
9319 localWindow[3] = 0.0;
9321 else if (i == PSM_FFT_LEN - 2)
9326 localWindow[3] = 0.0;
9337 if (
binData[i].magnitude > 0.00001 &&
9338 binData[i].magnitude > localWindow[0]
9339 &&
binData[i].magnitude > localWindow[1]
9340 &&
binData[i].magnitude > localWindow[2]
9341 &&
binData[i].magnitude > localWindow[3])
9360 int midBoundary = (nextPeak - (double)bossPeakBin) / 2.0 + bossPeakBin;
9364 for (
int i = 0; i < PSM_FFT_LEN; i++)
9366 if (i <= bossPeakBin)
9370 else if (i < midBoundary)
9376 bossPeakBin = nextPeak;
9378 if (nextPeak > bossPeakBin)
9379 midBoundary = (nextPeak - (double)bossPeakBin) / 2.0 + bossPeakBin;
9381 midBoundary = PSM_FFT_LEN;
9397 bool fftReady =
false;
9398 double output = 0.0;
9412 for (
int i = 0; i < PSM_FFT_LEN; i++)
9429 for (
int i = 0; i < PSM_FFT_LEN; i++)
9437 double omega_k =
kTwoPi*i / PSM_FFT_LEN;
9441 double phaseDev = phi_k -
phi[i] - omega_k*
ha;
9453 if(
binData[i].previousPeakBin < 0)
9467 for (
int i = 0; i < PSM_FFT_LEN; i++)
9485 for (
int i = 0; i < PSM_FFT_LEN; i++)
9490 fftData[i][0] = mag_k*cos(
binData[i].updatedPhase);
9491 fftData[i][1] = mag_k*sin(
binData[i].updatedPhase);
9502 for (
int i = 0; i < PSM_FFT_LEN; i++)
9504 double mag_k =
getMagnitude(fftData[i][0], fftData[i][1]);
9505 double phi_k =
getPhase(fftData[i][0], fftData[i][1]);
9510 double omega_k =
kTwoPi*i / PSM_FFT_LEN;
9514 double phaseDev = phi_k -
phi[i] - omega_k*
ha;
9526 fftData[i][0] = mag_k*cos(
psi[i]);
9527 fftData[i][1] = mag_k*sin(
psi[i]);
9539 double ifft[PSM_FFT_LEN] = { 0.0 };
9540 for (
int i = 0; i < PSM_FFT_LEN; i++)
9541 ifft[i] = inv_fftData[i][0];
9583 const double hs = PSM_FFT_LEN / 4;
9584 double ha = PSM_FFT_LEN / 4;
9585 double phi[PSM_FFT_LEN] = { 0.0 };
9586 double psi[PSM_FFT_LEN] = { 0.0 };
9618 const unsigned int maxSamplingRatio = 4;
9631 if (ratio == rateConversionRatio::k2x)
9633 else if (ratio == rateConversionRatio::k4x || ratio == rateConversionRatio::k4x)
9654 if (sampleRate != 44100 && sampleRate != 48000)
return nullptr;
9657 if (ratio == rateConversionRatio::k2x)
9659 if (sampleRate == 44100)
9661 if (FIRLength == 128)
9662 return &LPF128_882[0];
9663 else if (FIRLength == 256)
9664 return &LPF256_882[0];
9665 else if (FIRLength == 512)
9666 return &LPF512_882[0];
9667 else if (FIRLength == 1024)
9668 return &LPF1024_882[0];
9670 if (sampleRate == 48000)
9672 if (FIRLength == 128)
9673 return &LPF128_96[0];
9674 else if (FIRLength == 256)
9675 return &LPF256_96[0];
9676 else if (FIRLength == 512)
9677 return &LPF512_96[0];
9678 else if (FIRLength == 1024)
9679 return &LPF1024_96[0];
9684 if (ratio == rateConversionRatio::k4x)
9686 if (sampleRate == 44100)
9688 if (FIRLength == 128)
9689 return &LPF128_1764[0];
9690 else if (FIRLength == 256)
9691 return &LPF256_1764[0];
9692 else if (FIRLength == 512)
9693 return &LPF512_1764[0];
9694 else if (FIRLength == 1024)
9695 return &LPF1024_1764[0];
9697 if (sampleRate == 48000)
9699 if (FIRLength == 128)
9700 return &LPF128_192[0];
9701 else if (FIRLength == 256)
9702 return &LPF256_192[0];
9703 else if (FIRLength == 512)
9704 return &LPF512_192[0];
9705 else if (FIRLength == 1024)
9706 return &LPF1024_192[0];
9724 inline double**
decomposeFilter(
double* filterIR,
unsigned int FIRLength,
unsigned int ratio)
9726 unsigned int subBandLength = FIRLength / ratio;
9727 double ** polyFilterSet =
new double*[ratio];
9728 for (
unsigned int i = 0; i < ratio; i++)
9730 double* polyFilter =
new double[subBandLength];
9731 polyFilterSet[i] = polyFilter;
9735 for (
int i = 0; i < subBandLength; i++)
9737 for (
int j = ratio - 1; j >= 0; j--)
9739 double* polyFilter = polyFilterSet[j];
9740 polyFilter[i] = filterIR[m++];
9744 return polyFilterSet;
9803 unsigned int subBandLength =
FIRLength / count;
9810 if (!filterTable)
return;
9817 if (!polyPhaseFilters)
9824 for (
unsigned int i = 0; i < count; i++)
9828 delete[] polyPhaseFilters[i];
9831 delete[] polyPhaseFilters;
9841 output.
count = count;
9844 double ampCorrection = double(count);
9848 for (
unsigned int i = 0; i < count; i++)
9928 unsigned int subBandLength =
FIRLength / count;
9935 if (!filterTable)
return;
9942 if (!polyPhaseFilters)
9949 for (
unsigned int i = 0; i < count; i++)
9953 delete[] polyPhaseFilters[i];
9956 delete[] polyPhaseFilters;
9965 double output = 0.0;
9968 for (
unsigned int i = 0; i < count; i++)
virtual void setComponentValue_RC(double _componentValue_R, double _componentValue_C)
Definition: fxobjects.h:6854
DFOscillatorStates
Use this non-typed enum to easily access the direct form oscillator state registers.
Definition: fxobjects.h:3131
rateConversionRatio ratio
conversion ration
Definition: fxobjects.h:9985
EnvelopeFollowerParameters parameters
object parameters
Definition: fxobjects.h:5552
virtual void setComponentValue_RL(double _componentValue_R, double _componentValue_L)
Definition: fxobjects.h:6731
virtual double getOutput()
Definition: fxobjects.h:6212
double componentValue_L
component value L
Definition: fxobjects.h:6673
double preDelayTime_mSec
pre-delay time in mSec
Definition: fxobjects.h:4729
Custom parameter structure for the LFO and DFOscillator objects.
Definition: fxobjects.h:2955
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6150
unsigned int getFrameLength()
Definition: fxobjects.h:9064
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1553
double attackTime_mSec
attack mSec
Definition: fxobjects.h:2020
unsigned int stopBin
ending bin for transition band
Definition: fxobjects.h:607
Custom parameter structure for the ModulatedDelay object.
Definition: fxobjects.h:3282
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5812
void createWDF()
Definition: fxobjects.h:8599
SimpleDelay delay
delay
Definition: fxobjects.h:4326
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8567
void setImpulseResponse(double *irArray, unsigned int lengthPowerOfTwo)
Definition: fxobjects.h:2466
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5882
bool frequencyWarping
enable frequency warping
Definition: fxobjects.h:8174
unsigned int getFilterIRLength()
Definition: fxobjects.h:9067
AudioDetectorParameters getParameters()
Definition: fxobjects.h:1909
bool getTransitionBandData(double testFreq, double bin1Freq, unsigned int relax_Bins, TransitionBandData &transitionData)
get bin data for a filter's transitino band (see FX book for details)
Definition: fxobjects.h:639
virtual double getComponentConductance()
Definition: fxobjects.h:6107
void setParameters(const ReverbTankParameters ¶ms)
Definition: fxobjects.h:4908
fftw_complex * fft_result
array for FFT output
Definition: fxobjects.h:8877
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6393
The WdfAdaptorBase object acts as the base class for all WDF Adaptors; the static members allow for s...
Definition: fxobjects.h:7133
double f_High
brickwall f_high
Definition: fxobjects.h:570
virtual double getComponentResistance()
Definition: fxobjects.h:6266
virtual double getOutput1()
Definition: fxobjects.h:6651
virtual double getOutput2()
Definition: fxobjects.h:6218
vaFilterAlgorithm
Use this strongly typed enum to easily set the virtual analog filter algorithm.
Definition: fxobjects.h:5112
double windowCorrection
window correction value
Definition: fxobjects.h:9597
virtual double getOutput3()
Definition: fxobjects.h:6903
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4284
virtual double getOutput3()
Definition: fxobjects.h:6415
void setParameters(const SimpleDelayParameters ¶ms)
Definition: fxobjects.h:3889
std::unique_ptr< double[]> makeWindow(unsigned int windowLength, unsigned int hopSize, windowType window, double &gainCorrectionValue)
creates a new std::unique_ptr<double[]> array for a given window lenght and type. ...
Definition: fxobjects.h:8694
double zRegister_L
storage register for L
Definition: fxobjects.h:6792
TwoBandShelvingFilterParameters & operator=(const TwoBandShelvingFilterParameters ¶ms)
Definition: fxobjects.h:4550
PSMVocoderParameters parameters
object parameters
Definition: fxobjects.h:9578
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6234
virtual void setInput(double in)
Definition: fxobjects.h:6885
SimpleLPFParameters & operator=(const SimpleLPFParameters ¶ms)
Definition: fxobjects.h:3718
void setBeta(double _beta)
Definition: fxobjects.h:5363
void writeBuffer(unsigned int index, T input)
Definition: fxobjects.h:2257
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2429
virtual void setInput3(double _in3)
Definition: fxobjects.h:6309
bool detect_dB
detect in dB DEFAULT = false (linear NOT log)
Definition: fxobjects.h:1810
void initialize(unsigned int _FIRLength, rateConversionRatio _ratio, unsigned int _sampleRate, bool _polyphase=true)
Definition: fxobjects.h:9796
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6275
double RL
RL value.
Definition: fxobjects.h:7045
AudioFilterParameters & operator=(const AudioFilterParameters ¶ms)
Definition: fxobjects.h:1485
virtual void setInput3(double _in3)
Definition: fxobjects.h:7720
double L
value of L component
Definition: fxobjects.h:7115
void setOpenTerminalResistance(bool _openTerminalResistance=true)
Definition: fxobjects.h:7143
double processAudioSample(double input)
Definition: fxobjects.h:9018
double audioData[maxSamplingRatio]
array of interpolated output samples
Definition: fxobjects.h:9761
wdfComponent componentType
selected component type
Definition: fxobjects.h:7117
bool interpolate
interpolate flag (diagnostics)
Definition: fxobjects.h:4177
fftw_complex * filterFFT
filterFFT output arrays
Definition: fxobjects.h:9072
Custom parameter structure for the LRFilterBank object which splits the input signal into multiple ba...
Definition: fxobjects.h:1643
unsigned int inputWriteIndex
circular buffer index: input write
Definition: fxobjects.h:8890
virtual double getOutput3()
Definition: fxobjects.h:6138
Custom parameter structure for the PhaseShifter object.
Definition: fxobjects.h:3474
AudioFilter apf[PHASER_STAGES]
six APF objects
Definition: fxobjects.h:3699
double sensitivity
detector sensitivity
Definition: fxobjects.h:5423
double RR
RR value.
Definition: fxobjects.h:6801
void setParameters(const DynamicsProcessorParameters &_parameters)
Definition: fxobjects.h:2088
Structure to hold a complex value.
Definition: fxobjects.h:468
double highShelfBoostCut_dB
high shelf gain
Definition: fxobjects.h:4566
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6739
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6803
double readDelay()
Definition: fxobjects.h:3935
double sampleRate
sample rate
Definition: fxobjects.h:3038
ModulatedDelayParameters getParameters()
Definition: fxobjects.h:3432
virtual double getComponentValue_R()
Definition: fxobjects.h:6756
generatorWaveform
Use this strongly typed enum to easily set the oscillator waveform.
Definition: fxobjects.h:2942
InterpolatorOutput interpolateAudio(double xn)
Definition: fxobjects.h:9835
void setParameters(AudioDelayParameters _parameters)
Definition: fxobjects.h:2857
double lowShelfBoostCut_dB
low shelf gain
Definition: fxobjects.h:4734
ZVAFilter filter
filter to modulate
Definition: fxobjects.h:5555
virtual double getComponentResistance()
Definition: fxobjects.h:6184
void setParameters(ModulatedDelayParameters _parameters)
Definition: fxobjects.h:3438
filterAlgorithm
Use this strongly typed enum to easily set the filter algorithm for the AudioFilter object or any oth...
Definition: fxobjects.h:1462
ClassATubePreParameters & operator=(const ClassATubePreParameters ¶ms)
Definition: fxobjects.h:5756
TriodeClassAParameters getParameters()
Definition: fxobjects.h:5674
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1177
double RL
RL value.
Definition: fxobjects.h:6922
virtual double getOutput1()
Definition: fxobjects.h:6774
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L2
adaptor for L2
Definition: fxobjects.h:7947
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6615
Custom parameter structure for the Biquad object. Default version defines the biquad structure used i...
Definition: fxobjects.h:1336
double fc
filter fc
Definition: fxobjects.h:5418
double componentValue_R
component value R
Definition: fxobjects.h:6919
virtual void setInput3(double _in3)
Definition: fxobjects.h:6230
double out2
stored port 2 output; it is y(n) for this library
Definition: fxobjects.h:7302
double Q
filter Q
Definition: fxobjects.h:1500
virtual void setInput3(double _in3)
Definition: fxobjects.h:7035
unsigned int getHopSize()
Definition: fxobjects.h:8864
double alphaStretchRatio
alpha stretch ratio = hs/ha
Definition: fxobjects.h:9580
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3794
double highShelfBoostCut_dB
high shelf gain
Definition: fxobjects.h:4736
virtual void setInput2(double _in2)
Definition: fxobjects.h:6306
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3596
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1697
reverbDensity
Use this strongly typed enum to easily set the density in the reverb object.
Definition: fxobjects.h:4673
double parabolicSine(double angle)
Definition: fxobjects.h:3095
WdfSeriesAdaptor seriesAdaptor_L1C1
adaptor for L1 and C1
Definition: fxobjects.h:8132
LFO lfo
the one and only LFO
Definition: fxobjects.h:3700
virtual void updateComponentResistance()
Definition: fxobjects.h:6845
double overlap
overlap as raw value (75% = 0.75)
Definition: fxobjects.h:8914
virtual double getOutput1()=0
double getS_value()
returns the storage component S(n) for delay-free loop solutions
Definition: fxobjects.cpp:32
The ImpulseConvolver object implements a linear conovlver. NOTE: compile in Release mode or you may e...
Definition: fxobjects.h:2408
double alpha
alpha is (wcT/2)
Definition: fxobjects.h:5377
virtual void updateComponentResistance()
Definition: fxobjects.h:6598
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:2770
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8336
The DelayAPF object implements a delaying APF with optional LPF and optional modulated delay time wit...
Definition: fxobjects.h:4202
bool invertOutput
invertOutput - triodes invert output
Definition: fxobjects.h:5617
The WdfSeriesRL object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6573
T readBuffer(unsigned int index)
Definition: fxobjects.h:2266
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5044
unsigned int wrapMask
input wrap mask
Definition: fxobjects.h:8894
double sampleRate
sample rate storage
Definition: fxobjects.h:8418
double bipolarToUnipolar(double value)
calculates the unipolar [0.0, +1.0] value FROM a bipolar [-1.0, +1.0] value
Definition: fxobjects.h:254
void initialize(unsigned int _frameLength, unsigned int _hopSize, windowType _window)
initialize the Fast FFT object for operation
Definition: fxobjects.cpp:1251
virtual double getOutput2()=0
double highShelf_fc
HSF shelf frequency.
Definition: fxobjects.h:5783
virtual double getOutput2()
Definition: fxobjects.h:6900
double tanhWaveShaper(double xn, double saturation)
calculates hyptan waveshaper
Definition: fxobjects.h:397
void setParameters(const ClassATubePreParameters ¶ms)
Definition: fxobjects.h:5846
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_L
adaptor for L
Definition: fxobjects.h:8416
bool enablePeakTracking
flag to enable peak tracking
Definition: fxobjects.h:9167
The LFO object implements a mathematically perfect LFO generator for modulation uses only...
Definition: fxobjects.h:2992
virtual double getOutput2()
Definition: fxobjects.h:7726
virtual void updateComponentResistance()
Definition: fxobjects.h:6721
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1386
double saturation
input level in dB
Definition: fxobjects.h:5776
dynamicsProcessorType
Use this strongly typed enum to set the dynamics processor type.
Definition: fxobjects.h:1973
virtual const SignalGenData renderAudioOutput()=0
double delayTime_mSec
delay time in mSec
Definition: fxobjects.h:4007
virtual void setInput(double in)
Definition: fxobjects.h:7008
double QL
the quantization level
Definition: fxobjects.h:5993
The PeakLimiter object implements a simple peak limiter; it is really a simplified and hard-wired ver...
Definition: fxobjects.h:5013
WdfSeriesAdaptor seriesAdaptor_RC
adaptor for RC
Definition: fxobjects.h:8415
double fc
filter fc
Definition: fxobjects.h:2524
double sampleRate
sample rate
Definition: fxobjects.h:6556
virtual double getComponentResistance()
Definition: fxobjects.h:6962
double boostCut_dB
filter gain; note not used in all types
Definition: fxobjects.h:1501
const double hs
hs = N/4 — 75% overlap
Definition: fxobjects.h:9583
The EnvelopeFollower object implements a traditional envelope follower effect modulating a LPR fc val...
Definition: fxobjects.h:5444
virtual void setInput1(double _in1)
Definition: fxobjects.h:6303
virtual double getOutput3()
Definition: fxobjects.h:7729
double inputLevel_dB
input level in dB
Definition: fxobjects.h:5775
double sampleRate
stored sample rate
Definition: fxobjects.h:1945
fftw_complex * getIFFTData()
Definition: fxobjects.h:8852
double lpf_g
LPF g coefficient.
Definition: fxobjects.h:4730
void setParameters(const TwoBandShelvingFilterParameters ¶ms)
Definition: fxobjects.h:4640
double zRegister_L
storage register for L
Definition: fxobjects.h:6669
double magnitude
bin magnitude angle
Definition: fxobjects.h:9129
void setParameters(const AudioDetectorParameters ¶meters)
Definition: fxobjects.h:1918
virtual double getComponentValue_R()
Definition: fxobjects.h:6876
virtual void updateComponentResistance()
Definition: fxobjects.h:6968
double lpf_state
LPF state register (z^-1)
Definition: fxobjects.h:4332
void flushBuffer()
Definition: fxobjects.h:2302
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8003
void destroyFFTW()
destroys the FFTW arrays and plans.
Definition: fxobjects.cpp:1051
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1840
virtual double getComponentConductance()
Definition: fxobjects.h:6354
double zRegister_C
storage register for C
Definition: fxobjects.h:7039
double dB2Raw(double dB)
converts dB to raw value
Definition: fxobjects.h:282
void setParameters(const PhaseShifterParameters ¶ms)
Definition: fxobjects.h:3684
virtual double processAuxInputAudioSample(double xn)
Definition: fxobjects.h:1184
double componentValue_L
component value L
Definition: fxobjects.h:6796
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4056
void setParameters(const PSMVocoderParameters ¶ms)
Definition: fxobjects.h:9566
virtual void setInput(double in)
Definition: fxobjects.h:6209
double RC
RC value.
Definition: fxobjects.h:6800
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6992
double RL
RL value.
Definition: fxobjects.h:6799
double RC
RC value.
Definition: fxobjects.h:6677
The WdfSeriesTerminatedAdaptor object implements the series terminated (non-reflection-free) adaptor...
Definition: fxobjects.h:7432
AudioDetector detector
detector to track input signal
Definition: fxobjects.h:5556
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5470
double componentValue_C
component value C
Definition: fxobjects.h:6920
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7877
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8629
Custom parameter structure calculating analog magnitude response arrays with calculateAnalogMagArray(...
Definition: fxobjects.h:833
bool advanceAndCheckWrapModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3066
biquadAlgorithm biquadCalcType
biquad structure to use
Definition: fxobjects.h:1350
virtual double getOutput3()
Definition: fxobjects.h:6300
WdfParallelAdaptor parallelAdaptor_C1
adaptor for C1
Definition: fxobjects.h:7946
void createWDF()
Definition: fxobjects.h:8103
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8343
unsigned int countForRatio(rateConversionRatio ratio)
returns the up or downsample ratio as a numeric value
Definition: fxobjects.h:9629
WDFParameters getParameters()
Definition: fxobjects.h:8258
The WdfParallelTerminatedAdaptor object implements the parallel terminated (non-reflection-free) adap...
Definition: fxobjects.h:7644
The WDFConstKBPF6 object implements a 6th order constant K BPF NOTE: designed with Elsie www...
Definition: fxobjects.h:8059
fftw_plan plan_backward
FFTW plan for IFFT.
Definition: fxobjects.h:8880
double beta
beta value, not used
Definition: fxobjects.h:5380
double storageComponent
Definition: fxobjects.h:1445
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6259
virtual double getComponentConductance()
Definition: fxobjects.h:6842
double getS_value()
Definition: fxobjects.h:1588
double gainReduction
output value for gain reduction that occurred
Definition: fxobjects.h:2025
double asymmetry
input level in dB
Definition: fxobjects.h:5777
double out1
stored port 1 output; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7301
double lfoDepth
LFO deoth (not in %) if enabled.
Definition: fxobjects.h:4180
const double kTwoPi
2pi to 80 decimal places
Definition: guiconstants.h:191
void createWDF()
Definition: fxobjects.h:8477
Custom parameter structure for the AudioDetector object. NOTE: this object uses constant defintions: ...
Definition: fxobjects.h:1790
virtual double getComponentConductance()
Definition: fxobjects.h:6187
double threshold_dB
threshold in dB
Definition: fxobjects.h:2014
The Biquad object implements a first or second order H(z) transfer function using one of four standar...
Definition: fxobjects.h:1370
double apf_g
APF g coefficient.
Definition: fxobjects.h:4174
bool enableLPF
enable LPF flag
Definition: fxobjects.h:4009
virtual void setInput2(double _in2)
Definition: fxobjects.h:6421
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6832
double f_Low
brickwall f_low
Definition: fxobjects.h:569
virtual void setInput2(double _in2)
Definition: fxobjects.h:7032
double doWhiteNoise()
calculates a random value between -1.0 and +1.0
Definition: fxobjects.h:324
ZVAFilterParameters zvaFilterParameters
object parameters
Definition: fxobjects.h:5369
virtual void setInput1(double _in1)=0
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6955
double fc
filter cutoff or center frequency (Hz)
Definition: fxobjects.h:1499
virtual void setInput2(double _in2)
Definition: fxobjects.h:6144
void createWDF()
Definition: fxobjects.h:7821
virtual void setInput2(double _in2)
Definition: fxobjects.h:6786
unsigned int getFrameLength()
Definition: fxobjects.h:8861
virtual void setInput2(double _in2)
Definition: fxobjects.h:7382
double zRegister_C
storage register for C
Definition: fxobjects.h:6916
virtual double getOutput3()
Definition: fxobjects.h:7624
virtual void reset(double _sampleRate)
Definition: fxobjects.h:7163
virtual double getOutput3()
Definition: fxobjects.h:7412
bool quadPhaseLFO
quad phase LFO flag
Definition: fxobjects.h:3494
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8458
double saturation
saturation level
Definition: fxobjects.h:5613
void setPort2_CompAdaptor(IComponentAdaptor *_port2CompAdaptor)
Definition: fxobjects.h:7157
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4411
fftw_complex * ifft_input
array for IFFT input
Definition: fxobjects.h:8791
CircularBuffer< double > signalBuffer
circulat buffer for the signal
Definition: fxobjects.h:2485
virtual double getComponentValue()
Definition: fxobjects.h:6190
double delayRatio_Pct
dela ratio: right length = (delayRatio)*(left length)
Definition: fxobjects.h:2699
virtual void setComponentValue_RC(double componentValue_R, double componentValue_C)
Definition: fxobjects.h:6068
double R2
output port resistance
Definition: fxobjects.h:7289
The WdfCapacitor object implements the reflection coefficient and signal flow through a WDF simulated...
Definition: fxobjects.h:6169
virtual void setInput3(double _in3)
Definition: fxobjects.h:6912
The AudioDelay object implements a stereo audio delay with multiple delay algorithms.
Definition: fxobjects.h:2719
double attackTime
attack time coefficient
Definition: fxobjects.h:1943
virtual double getR2()
Definition: fxobjects.h:7651
double zRegister_C
storage register for C
Definition: fxobjects.h:6548
double lfoRate_Hz
mod delay LFO rate in Hz
Definition: fxobjects.h:3300
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1543
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2066
double threshold_dB
detector threshold in dB
Definition: fxobjects.h:5422
TwoBandShelvingFilterParameters getParameters()
Definition: fxobjects.h:4631
double in2
stored port 2 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7295
double rightDelay_mSec
right delay time
Definition: fxobjects.h:2698
bool interpolate
interpolation flag (diagnostics)
Definition: fxobjects.h:4011
bool enableHPF
HPF simulates DC blocking cap on output.
Definition: fxobjects.h:5618
double getPhase(double re, double im)
calculates phase of a complex numb er
Definition: fxobjects.h:1018
virtual void setComponentValue_LC(double componentValue_L, double componentValue_C)
Definition: fxobjects.h:7250
double sampleRate
sample rate
Definition: fxobjects.h:6153
double sampleRate
sample rate
Definition: fxobjects.h:6315
void createDelayBuffers(double _sampleRate, double delay_mSec, double nestedAPFDelay_mSec)
Definition: fxobjects.h:4521
double * getStateArray()
Definition: fxobjects.h:1422
WdfSeriesAdaptor seriesAdaptor_LC
adaptor for LC
Definition: fxobjects.h:8536
AnalogFIRFilterParameters & operator=(const AnalogFIRFilterParameters ¶ms)
Definition: fxobjects.h:2510
ReverbTankParameters & operator=(const ReverbTankParameters ¶ms)
Definition: fxobjects.h:4690
fftw_plan plan_forward
FFTW plan for FFT.
Definition: fxobjects.h:8793
AudioDetectorParameters audioDetectorParameters
parameters for object
Definition: fxobjects.h:1942
AudioFilter hpFilter
high-band filter
Definition: fxobjects.h:1762
virtual double getOutput3()
Definition: fxobjects.h:7514
The ReverbTank object implements the cyclic reverb tank in the FX book listed below.
Definition: fxobjects.h:4763
double modCounter
modulo counter [0.0, +1.0]
Definition: fxobjects.h:3041
virtual double getComponentConductance()
Definition: fxobjects.h:6965
double zRegister_L
storage register for L
Definition: fxobjects.h:6915
WDFParameters getParameters()
Definition: fxobjects.h:8623
double LFOut
low frequency output sample
Definition: fxobjects.h:1623
DelayAPFParameters delayAPFParameters
obeject parameters
Definition: fxobjects.h:4321
virtual double processAudioSample(double xn)
Definition: fxobjects.h:1855
PSMVocoderParameters & operator=(const PSMVocoderParameters ¶ms)
Definition: fxobjects.h:9152
void createDelayBuffer(double _sampleRate, double delay_mSec)
Definition: fxobjects.h:4117
unsigned int fftCounter
FFT sample counter.
Definition: fxobjects.h:8910
double sampleRate
sample rate storage
Definition: fxobjects.h:8661
void createWDF()
Definition: fxobjects.h:8234
modDelaylgorithm
Use this strongly typed enum to easily set modulated delay algorithm.
Definition: fxobjects.h:3268
double feedback_Pct
feedback as a % value
Definition: fxobjects.h:2694
virtual double getOutput()
Definition: fxobjects.h:6291
void setParameters(const OscillatorParameters ¶ms)
Definition: fxobjects.h:3180
unsigned int inputReadIndex
circular buffer index: input read
Definition: fxobjects.h:8892
unsigned int frameLength
current FFT length
Definition: fxobjects.h:8799
unsigned int hopSize
hop: ha = hs
Definition: fxobjects.h:8913
double componentValue_R
component value R
Definition: fxobjects.h:6674
The DynamicsProcessor object implements a dynamics processor suite: compressor, limiter, downward expander, gate.
Definition: fxobjects.h:2046
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6233
double sidechainInputSample
storage for sidechain sample
Definition: fxobjects.h:2134
double RC
RC value.
Definition: fxobjects.h:6554
void setTerminalResistance(double _terminalResistance)
Definition: fxobjects.h:7140
Custom parameter structure for the ClassATubePre object.
Definition: fxobjects.h:5752
AudioDetectorParameters & operator=(const AudioDetectorParameters ¶ms)
Definition: fxobjects.h:1794
virtual double getOutput()
Definition: fxobjects.h:6406
DFOscillatorCoeffs
Use this non-typed enum to easily access the direct form oscillator coefficients. ...
Definition: fxobjects.h:3116
IComponentAdaptor * getPort1_CompAdaptor()
Definition: fxobjects.h:7271
The CombFilter object implements a comb filter with optional LPF in feedback loop. Used for reverb algorithms in book.
Definition: fxobjects.h:4032
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6493
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5661
bool enableLSF
LSF simulates shelf due to cathode self biasing.
Definition: fxobjects.h:5619
double doLagrangeInterpolation(double *x, double *y, int n, double xbar)
implements n-order Lagrange Interpolation
Definition: fxobjects.h:133
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6759
virtual void initialize(double _R1)
Definition: fxobjects.h:7663
void advanceModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3089
DynamicsProcessorParameters getParameters()
Definition: fxobjects.h:2082
virtual double getComponentValue_C()
Definition: fxobjects.h:6390
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4770
double fuzzExp1WaveShaper(double xn, double saturation, double asymmetry)
calculates fuzz exp1 waveshaper
Definition: fxobjects.h:426
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7996
static void connectAdaptors(WdfAdaptorBase *upstreamAdaptor, WdfAdaptorBase *downstreamAdaptor)
Definition: fxobjects.h:7230
Custom parameter structure for the NestedDelayAPF object. Used for reverb algorithms in book...
Definition: fxobjects.h:4347
LRFilterBankParameters parameters
parameters for the object
Definition: fxobjects.h:1765
virtual double processAuxInputAudioSample(double xn)
Definition: fxobjects.h:2072
virtual double processAudioSample(double xn)
Definition: fxobjects.h:7811
double processAudioSample(double input, bool &fftReady)
process one input sample throug the vocoder to produce one output sample
Definition: fxobjects.cpp:1476
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5020
virtual void setInput3(double _in3)
Definition: fxobjects.h:7615
double lfoDepth_Pct
mod delay LFO depth in %
Definition: fxobjects.h:3301
unsigned int length
length of convolution (buffer)
Definition: fxobjects.h:2488
void setParameters(const OscillatorParameters ¶ms)
Definition: fxobjects.h:3021
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4040
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2054
virtual void setInput(double in)
Definition: fxobjects.h:6516
void createLinearBuffer(unsigned int _bufferLength)
Definition: fxobjects.h:2244
The AudioFilter object implements all filters in Designing Audio Effects Plugins in C++ 2nd Ed...
Definition: fxobjects.h:1521
double HFOut
high frequency output sample
Definition: fxobjects.h:1624
double terminalResistance
value of terminal (load) resistance
Definition: fxobjects.h:7306
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6373
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3351
dynamicsProcessorType calculation
processor calculation type
Definition: fxobjects.h:2019
void reset()
Definition: fxobjects.h:9116
WdfSeriesAdaptor seriesAdaptor_L5C5
adaptor for L5 and C5
Definition: fxobjects.h:8138
PhaseShifterParameters parameters
the object parameters
Definition: fxobjects.h:3698
double lfoRate_Hz
LFO rate in Hz (if enabled)
Definition: fxobjects.h:4378
delayUpdateType updateType
update algorithm
Definition: fxobjects.h:2696
virtual void setComponentValue_RL(double componentValue_R, double componentValue_L)
Definition: fxobjects.h:6065
TwoBandShelvingFilter shelvingFilter
shelving filters
Definition: fxobjects.h:5898
virtual void initialize(double _R1)
Definition: fxobjects.h:7450
bool needInverseFFT
internal flag to signal IFFT required
Definition: fxobjects.h:8902
double stateArray[numDFOStates]
array of state registers
Definition: fxobjects.h:3247
virtual double getOutput()
Definition: fxobjects.h:6641
virtual void setInput1(double _in1)
Definition: fxobjects.h:7471
void initialize(unsigned int _FIRLength, rateConversionRatio _ratio, unsigned int _sampleRate, bool _polyphase=true)
Definition: fxobjects.h:9921
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6862
unsigned int outputReadIndex
circular buffer index: output read
Definition: fxobjects.h:8893
Custom structure that holds transition band information for FIR filter calculations.
Definition: fxobjects.h:601
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8091
double filterOutputGain_dB
va filter gain (normally unused)
Definition: fxobjects.h:5152
bool openTerminalResistance
flag for open circuit load
Definition: fxobjects.h:7307
void setParameters(const CombFilterParameters ¶ms)
Definition: fxobjects.h:4097
WdfSeriesAdaptor seriesAdaptor_RL
adaptor for series RL
Definition: fxobjects.h:8292
WdfSeriesAdaptor seriesAdaptor_L3C3
adaptor for L3 and C3
Definition: fxobjects.h:8135
double sampleRate
current sample rate
Definition: fxobjects.h:1599
double componentValue_C
component value C
Definition: fxobjects.h:6551
virtual void enableAuxInput(bool enableAuxInput)
Definition: fxobjects.h:2069
double doUnipolarModulationFromMax(double unipolarModulatorValue, double minValue, double maxValue)
Perform unipolar modulation from a max value down to a min value using a unipolar modulator value...
Definition: fxobjects.h:199
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7791
biquadAlgorithm
Use this strongly typed enum to easily set the biquad calculation type.
Definition: fxobjects.h:1322
bool useFrequencyWarping
flag for freq warping
Definition: fxobjects.h:7953
virtual void setInput3(double _in3)=0
rateConversionRatio ratio
conversion ration
Definition: fxobjects.h:9865
ZVAFilterParameters getParameters()
Definition: fxobjects.h:5196
double sampleRate
sample rate
Definition: fxobjects.h:6236
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4618
void writeBuffer(T input)
Definition: fxobjects.h:2333
fftw_complex * fft_result
array for FFT output
Definition: fxobjects.h:8790
double calcWSGain(double xn, double saturation, double asymmetry)
calculates gain of a waveshaper
Definition: fxobjects.h:368
void setParameters(const BitCrusherParameters ¶ms)
Definition: fxobjects.h:5969
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3331
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6622
double intensity_Pct
phaser feedback in %
Definition: fxobjects.h:3493
void setParameters(const EnvelopeFollowerParameters ¶ms)
Definition: fxobjects.h:5487
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6097
Use this interface for objects that render an output without an input, such as oscillators. May also be used for envelope generators whose input is a note-on or other switchable event.
Definition: fxobjects.h:1240
double RR
RR value.
Definition: fxobjects.h:6924
OscillatorParameters getParameters()
Definition: fxobjects.h:3171
double frequency_Hz
oscillator frequency
Definition: fxobjects.h:2971
void setAttackTime(double attack_in_ms, bool forceCalc=false)
sets the new attack time and re-calculates the time constant
Definition: fxobjects.cpp:958
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3785
vaFilterAlgorithm filterAlgorithm
va filter algorithm
Definition: fxobjects.h:5149
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8066
bool checkFloatUnderflow(double &value)
Perform underflow check; returns true if we did underflow (user may not care)
Definition: fxobjects.h:57
double K
K value.
Definition: fxobjects.h:6794
modDelaylgorithm algorithm
mod delay algorithm
Definition: fxobjects.h:3299
double sgn(double xn)
calculates sgn( ) of input
Definition: fxobjects.h:353
double componentValue_C
component value C
Definition: fxobjects.h:7042
double threshold_dB
stored threshold (dB)
Definition: fxobjects.h:5094
virtual double getComponentResistance()
Definition: fxobjects.h:6050
WdfParallelAdaptor parallelAdaptor_L4C4
adaptor for L4 and C4
Definition: fxobjects.h:8136
The WdfParallelLC object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6452
TriodeClassA triodes[NUM_TUBES]
array of triode tube objects
Definition: fxobjects.h:5897
double hpf_Fc
fc of DC blocking cap
Definition: fxobjects.h:5621
void findPeaksAndRegionsOfInfluence()
Definition: fxobjects.h:9291
double unipolarToBipolar(double value)
calculates the bipolar [-1.0, +1.0] value FROM a unipolar [0.0, +1.0] value
Definition: fxobjects.h:240
double boostCut_dB
filter boost or cut in dB
Definition: fxobjects.h:8173
virtual double getR2()
Definition: fxobjects.h:7541
int findPreviousNearestPeak(int peakIndex)
Definition: fxobjects.h:9259
const uint32_t ENVELOPE_DETECT_MODE_PEAK
|x|
Definition: guiconstants.h:199
virtual double processAudioSample(double xn)
process one sample through the biquad
Definition: fxobjects.cpp:67
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5875
double splitFrequency
LF/HF split frequency.
Definition: fxobjects.h:1656
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8587
double delayTime_mSec
delay tine in mSec
Definition: fxobjects.h:3828
Biquad biquad
the biquad object
Definition: fxobjects.h:1592
The AudioDetector object implements the audio detector defined in the book source below...
Definition: fxobjects.h:1832
double windowGainCorrection
window gain correction
Definition: fxobjects.h:8797
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6312
AudioFilterParameters audioFilterParameters
parameters
Definition: fxobjects.h:1598
The WdfParallelRC object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6943
virtual double getComponentValue()
Definition: fxobjects.h:6071
AudioFilter outputHPF
HPF to simulate output DC blocking cap.
Definition: fxobjects.h:5735
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4427
double attackTime_mSec
attack time in milliseconds
Definition: fxobjects.h:1807
Custom parameter structure for the WDF filter examples.
Definition: fxobjects.h:8154
virtual void setInput1(double _in1)
Definition: fxobjects.h:6538
double outerAPFdelayTime_mSec
delay time for outer APF
Definition: fxobjects.h:4371
double in1
stored port 1 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7294
virtual void setInput2(double _in2)
Definition: fxobjects.h:6541
double componentValue_R
component value R
Definition: fxobjects.h:7043
double sampleRate
current sample rate
Definition: fxobjects.h:4322
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4798
double RC
RC value.
Definition: fxobjects.h:6923
double kneeWidth_dB
knee width in dB for soft-knee operation
Definition: fxobjects.h:2015
double zRegister_L
storage register for L
Definition: fxobjects.h:6427
virtual double getOutput()
Definition: fxobjects.h:6025
The WDFButterLPF3 object implements a 3rd order Butterworth ladder filter. NOTE: designed with Elsie ...
Definition: fxobjects.h:7784
virtual double getOutput2()
Definition: fxobjects.h:6297
DelayAPFParameters getParameters()
Definition: fxobjects.h:4290
The FastConvolver provides a fast convolver - the user supplies the filter IR and the object snapshot...
Definition: fxobjects.h:8941
virtual void setInput1(double _in1)
Definition: fxobjects.h:7029
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6206
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8084
double lowShelf_fc
low shelf fc
Definition: fxobjects.h:4733
double getG_value()
Definition: fxobjects.h:1429
distortionModel waveshaper
waveshaper
Definition: fxobjects.h:5611
double getOverlap()
Definition: fxobjects.h:8867
bool needOverlapAdd
internal flag to signal overlap/add required
Definition: fxobjects.h:8903
double fixeDelayMax_mSec
fixed delay max time
Definition: fxobjects.h:4725
The WDFIdealRLCBSF object implements an ideal RLC BSF using the WDF library.
Definition: fxobjects.h:8560
virtual void setInput(double in)
Definition: fxobjects.h:6762
void setParameters(const SimpleLPFParameters ¶ms)
Definition: fxobjects.h:3775
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_R
adaptor for R
Definition: fxobjects.h:8537
virtual double getOutput1()
Definition: fxobjects.h:7508
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2727
Custom structure to hold component information.
Definition: fxobjects.h:7084
virtual double getOutput1()
Definition: fxobjects.h:6132
double real
real part
Definition: fxobjects.h:477
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_C
adaptopr for parallel C
Definition: fxobjects.h:8293
void updateDFO()
Definition: fxobjects.h:3207
double rho
p = 2R + g (feedback)
Definition: fxobjects.h:5378
double gainReduction_dB
output value for gain reduction that occurred in dB
Definition: fxobjects.h:2026
double delayTime_mSec
APF delay time.
Definition: fxobjects.h:4173
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6635
virtual double getComponentConductance()
Definition: fxobjects.h:6474
LRFilterBankParameters getParameters()
Definition: fxobjects.h:1736
The WDFIdealRLCBPF object implements an ideal RLC BPF using the WDF library.
Definition: fxobjects.h:8438
double componentValue_L
component value L
Definition: fxobjects.h:6430
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5227
double releaseTime_mSec
detector release time
Definition: fxobjects.h:5421
virtual void reset(double _sampleRate)
Definition: fxobjects.h:7005
void setFilterFc(double fc_Hz)
Definition: fxobjects.h:7930
virtual double getOutput1()
Definition: fxobjects.h:6215
BiquadParameters parameters
Definition: fxobjects.h:1442
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3901
AudioDetector detector
the detector object
Definition: fxobjects.h:5093
double lfoDepth
LFO depth (not in %) (if enabled)
Definition: fxobjects.h:4379
BiquadParameters getParameters()
Definition: fxobjects.h:1399
virtual double processAudioSample(double xn)
Definition: fxobjects.h:1712
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8533
double RT60Time_mSec
RT 60 time ini mSec.
Definition: fxobjects.h:4008
IComponentAdaptor * wdfComponent
WDF componant connected to port 3 (default operation)
Definition: fxobjects.h:7285
fftw_plan plan_forward
FFTW plan for FFT.
Definition: fxobjects.h:8879
double softClipWaveShaper(double xn, double saturation)
calculates hyptan waveshaper
Definition: fxobjects.h:411
Custom parameter structure for the ReverbTank object.
Definition: fxobjects.h:4686
double invertedOutput
inverted
Definition: fxobjects.h:1221
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6435
The Decimator object implements a sample rate decimator. Ana array of M input samples is decimated to...
Definition: fxobjects.h:9908
double computeGain(double detect_dB)
Definition: fxobjects.h:5050
virtual double getOutput1()
Definition: fxobjects.h:7723
virtual void setInput(double in)
Definition: fxobjects.h:6288
DynamicsProcessorParameters & operator=(const DynamicsProcessorParameters ¶ms)
Definition: fxobjects.h:1991
void setParameters(const TriodeClassAParameters ¶ms)
Definition: fxobjects.h:5680
double stateArray[numStates]
Definition: fxobjects.h:1439
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3860
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8465
virtual void setInput2(double _in2)
Definition: fxobjects.h:7717
double quantizedBitDepth
bid depth of quantizer
Definition: fxobjects.h:5930
const double kPi
pi to 80 decimal places
Definition: guiconstants.h:184
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6869
ZVAFilterParameters & operator=(const ZVAFilterParameters ¶ms)
Definition: fxobjects.h:5132
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:3363
void destroyFFTW()
destroys the FFTW arrays and plans.
Definition: fxobjects.cpp:1225
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4603
EnvelopeFollowerParameters getParameters()
Definition: fxobjects.h:5481
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7804
bool addZeroPad(unsigned int count)
zero pad the input timeline
Definition: fxobjects.cpp:1392
CombFilterParameters getParameters()
Definition: fxobjects.h:4088
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_LC
adaptor for parallel LC
Definition: fxobjects.h:8659
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6059
SimpleDelayParameters & operator=(const SimpleDelayParameters ¶ms)
Definition: fxobjects.h:3816
BitCrusherParameters parameters
object parameters
Definition: fxobjects.h:5992
virtual double getComponentResistance()
Definition: fxobjects.h:6592
double peakGainFor_Q(double Q)
calculates the peak magnitude for a given Q
Definition: fxobjects.h:296
The CircularBuffer object implements a simple circular buffer. It uses a wrap mask to wrap the read o...
Definition: fxobjects.h:2295
The PSMVocoder object implements a phase vocoder pitch shifter. Phase locking and peak tracking are o...
Definition: fxobjects.h:9188
double * getCoefficients()
Definition: fxobjects.h:1415
double highShelf_fc
fc for high shelf
Definition: fxobjects.h:4565
PhaseVocoder vocoder
vocoder object
Definition: fxobjects.h:9070
double Q
filter Q
Definition: fxobjects.h:5419
double integrator_z[2]
state variables
Definition: fxobjects.h:5373
double componentResistance
simulated resistance
Definition: fxobjects.h:6235
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6313
Custom structure that holds information about each FFT bin. This includes all information needed to p...
Definition: fxobjects.h:9094
virtual double getOutput()
Definition: fxobjects.h:6129
virtual void initialize(double _R1)
Definition: fxobjects.h:6016
virtual void setInput2(double _in2)=0
void setThreshold_dB(double _threshold_dB)
Definition: fxobjects.h:5087
virtual void setComponentValue_RL(double componentValue_R, double componentValue_L)
Definition: fxobjects.h:7257
double sampleRate
sample rate
Definition: fxobjects.h:6681
virtual double getComponentConductance()
Definition: fxobjects.h:6053
double getBeta()
Definition: fxobjects.h:5366
void setOverlapAddOnly(bool b)
Definition: fxobjects.h:8872
double lfoRate_Hz
phaser LFO rate in Hz
Definition: fxobjects.h:3491
virtual double processAudioSample(double xn)=0
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8201
IComponentAdaptor * port2CompAdaptor
componant or adaptor connected to port 2
Definition: fxobjects.h:7283
virtual void updateComponentResistance()
Definition: fxobjects.h:6120
void doInverseFFT()
perform the inverse FFT on the processed data
Definition: fxobjects.cpp:1516
Custom parameter structure for the SimpleLPFP object. Used for reverb algorithms in book...
Definition: fxobjects.h:3714
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6047
double fc
va filter fc
Definition: fxobjects.h:5150
double * outputBuff
buffer for resampled output
Definition: fxobjects.h:9596
virtual double getOutput2()
Definition: fxobjects.h:6654
The TriodeClassA object simulates a triode in class A configuration. This is a very simple and basic ...
Definition: fxobjects.h:5644
BiquadParameters & operator=(const BiquadParameters ¶ms)
Definition: fxobjects.h:1341
double RR
RR value.
Definition: fxobjects.h:7047
void createDelayBuffer(double _sampleRate, double delay_mSec)
Definition: fxobjects.h:4310
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6464
virtual void initializeAdaptorChain()
Definition: fxobjects.h:7237
Custom parameter structure for the DelayAPF object. Used for reverb algorithms in book...
Definition: fxobjects.h:4151
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8412
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3917
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7891
void setReleaseTime(double release_in_ms, bool forceCalc=false)
sets the new release time and re-calculates the time constant
Definition: fxobjects.cpp:974
void setMakeUpGain_dB(double _makeUpGain_dB)
Definition: fxobjects.h:5090
void setUsePostWarping(bool b)
Definition: fxobjects.h:7927
virtual void setInput1(double _in1)
Definition: fxobjects.h:7575
bool advanceAndCheckFFT()
advance the sample counter and check to see if we need to do the FFT.
Definition: fxobjects.cpp:1422
virtual void initialize(double _R1)
Definition: fxobjects.h:7342
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3578
virtual double getComponentValue_L()
Definition: fxobjects.h:6629
The WDFIdealRLCLPF object implements an ideal RLC LPF using the WDF library.
Definition: fxobjects.h:8194
The Interpolator object implements a sample rate interpolator. One input sample yields N output sampl...
Definition: fxobjects.h:9783
AudioDelayParameters getParameters()
Definition: fxobjects.h:2851
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6193
FastFFT filterFastFFT
FastFFT object.
Definition: fxobjects.h:9071
double attackTime_mSec
detector attack time
Definition: fxobjects.h:5420
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5703
double quadPhaseOutput_pos
90 degrees out
Definition: fxobjects.h:1222
double componentValue_C
component value C
Definition: fxobjects.h:6431
virtual void setInput(double in)
Definition: fxobjects.h:6126
double dryLevel_dB
dry output level in dB
Definition: fxobjects.h:4739
virtual double processAudioSample(double input)
Definition: fxobjects.h:9395
double sampleRate
stored sample rate
Definition: fxobjects.h:7954
SimpleDelayParameters getParameters()
Definition: fxobjects.h:3880
AudioDelayParameters & operator=(const AudioDelayParameters ¶ms)
Definition: fxobjects.h:2672
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4805
FastConvolver convolver
fast convolver
Definition: fxobjects.h:9980
virtual const SignalGenData renderAudioOutput()
generates the oscillator output for one sample interval; note that there are multiple outputs...
Definition: fxobjects.cpp:986
LRFilterBankParameters & operator=(const LRFilterBankParameters ¶ms)
Definition: fxobjects.h:1647
int peakBins[PSM_FFT_LEN]
array of current peak bin index values (-1 = not peak)
Definition: fxobjects.h:9592
AudioDetector detector
the sidechain audio detector
Definition: fxobjects.h:2131
double readDelayAtPercentage(double delayPercent)
Definition: fxobjects.h:3952
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6708
bool interpolate
interpolation flag (diagnostics usually)
Definition: fxobjects.h:3829
virtual double getComponentValue_R()
Definition: fxobjects.h:6632
AudioFilter outputLSF
LSF to simulate shelf caused by cathode self-biasing cap.
Definition: fxobjects.h:5736
virtual double processAudioSample(double xn)
process one sample through the audio filter
Definition: fxobjects.cpp:944
filterAlgorithm algorithm
filter algorithm
Definition: fxobjects.h:1498
double sampleRate
current sample rate
Definition: fxobjects.h:5370
Custom parameter structure for the CombFilter object. Used for reverb algorithms in book...
Definition: fxobjects.h:3989
bool polyphase
enable polyphase decomposition
Definition: fxobjects.h:9868
virtual void setInput1(double _in1)
Definition: fxobjects.h:6906
virtual void setInput3(double _in3)
Definition: fxobjects.h:7505
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3159
brickwallFilter
Use this strongly typed enum to easily set brickwall filter type for functions that need it...
Definition: fxobjects.h:543
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6500
virtual void setInput3(double _in3)
Definition: fxobjects.h:6147
Custom output structure for filter bank objects that split the inptu into multiple frequency channels...
Definition: fxobjects.h:1618
virtual void setInput1(double _in1)
Definition: fxobjects.h:7363
double computeGain(double detect_dB)
Definition: fxobjects.h:2137
void setFilterIR(double *irBuffer)
Definition: fxobjects.h:8988
AudioFilterParameters getParameters()
Definition: fxobjects.h:1560
virtual void updateComponentResistance()
Definition: fxobjects.h:6056
double doLinearInterpolation(double x1, double x2, double y1, double y2, double x)
performs linear interpolation of x distance between two (x,y) points; returns interpolated value ...
Definition: fxobjects.h:87
double zRegister_L
storage register for L
Definition: fxobjects.h:6547
void setParameters(const NestedDelayAPFParameters ¶ms)
Definition: fxobjects.h:4495
double doUnipolarModulationFromMin(double unipolarModulatorValue, double minValue, double maxValue)
Perform unipolar modulation from a min value up to a max value using a unipolar modulator value...
Definition: fxobjects.h:179
virtual double getOutput2()
Definition: fxobjects.h:6777
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5518
The SimpleDelay object implements a basic delay line without feedback.
Definition: fxobjects.h:3852
double * windowBuffer
buffer for window (naked)
Definition: fxobjects.h:8796
generatorWaveform waveform
the current waveform
Definition: fxobjects.h:2970
virtual double getOutput()
Definition: fxobjects.h:7011
bool selfOscillate
enable selfOscillation
Definition: fxobjects.h:5155
analogFilter filterType
filter type
Definition: fxobjects.h:2523
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8580
double lowShelf_fc
fc for low shelf
Definition: fxobjects.h:4563
double innerAPFdelayTime_mSec
delay time for inner APF
Definition: fxobjects.h:4372
unsigned int FIRLength
FIR length.
Definition: fxobjects.h:9984
double dBPeakGainFor_Q(double Q)
calculates the peak magnitude in dB for a given Q
Definition: fxobjects.h:312
double lsf_BoostCut_dB
boost/cut due to cathode self biasing
Definition: fxobjects.h:5623
double coeffArray[numDFOCoeffs]
array of coefficients
Definition: fxobjects.h:3248
Custom parameter structure for the TriodeClassA object.
Definition: fxobjects.h:5585
unsigned int sampleRate
sample rate
Definition: fxobjects.h:9863
virtual double getOutput3()
Definition: fxobjects.h:6780
virtual double getComponentResistance()
Definition: fxobjects.h:6104
double kRT
reverb time, 0 to 1
Definition: fxobjects.h:4731
TriodeClassAParameters parameters
object parameters
Definition: fxobjects.h:5734
unsigned int filterImpulseLength
IR length.
Definition: fxobjects.h:9075
bool enableGainComp
enable gain compensation (see book)
Definition: fxobjects.h:5153
WDFParameters getParameters()
Definition: fxobjects.h:8501
The LinearBuffer object implements a linear buffer of type T. It allows easy wrapping of a smart poin...
Definition: fxobjects.h:2233
CombFilterParameters & operator=(const CombFilterParameters ¶ms)
Definition: fxobjects.h:3993
The DFOscillator object implements generates a very pure sinusoidal oscillator by placing poles direc...
Definition: fxobjects.h:3152
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8289
The WdfSeriesLC object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6332
void setPort3_CompAdaptor(IComponentAdaptor *_port3CompAdaptor)
Definition: fxobjects.h:7160
double zRegister_C
storage register for C (not used)
Definition: fxobjects.h:6670
virtual void setInput1(double _in1)
Definition: fxobjects.h:6141
The WdfSeriesRC object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6820
virtual double getR2()
Definition: fxobjects.h:7331
virtual void setInput1(double _in1)
Definition: fxobjects.h:6783
Custom parameter structure for the AnalogFIRFilter object. This is a somewhat silly object that impla...
Definition: fxobjects.h:2506
double out3
stored port 3 output; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7303
double lsf_Fshelf
shelf fc from self bias cap
Definition: fxobjects.h:5622
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6113
fftw_complex * fft_input
array for FFT input
Definition: fxobjects.h:8876
virtual bool reset(double _sampleRate)=0
bool checkAndWrapModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3046
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6555
double sampleRate
sample rate
Definition: fxobjects.h:6804
double apfDelayWeight_Pct
APF max delay weighying.
Definition: fxobjects.h:4724
double principalArg(double phaseIn)
calculates proncipal argument of a phase value; this is the wrapped value on the range of [-pi...
Definition: fxobjects.h:1033
OscillatorParameters lfoParameters
obejcgt parameters
Definition: fxobjects.h:3035
unsigned int relaxationBins
relaxation bins for FIR specification
Definition: fxobjects.h:571
unsigned int FIRLength
FIR length.
Definition: fxobjects.h:9864
This is the output structure for audio generator objects that can render up to four outputs...
Definition: fxobjects.h:1216
edgeTransition edgeType
edge type
Definition: fxobjects.h:605
FastConvolver polyPhaseConvolvers[maxSamplingRatio]
a set of sub-band convolvers for polyphase operation
Definition: fxobjects.h:9989
virtual void setInput(double _in)
Definition: fxobjects.h:6022
Custom parameter structure for the AudioFilter object.
Definition: fxobjects.h:1481
bool enablePeakPhaseLocking
flag to enable phase lock
Definition: fxobjects.h:9166
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L2
adaptor for L2
Definition: fxobjects.h:7848
bool enableNLP
enable non linear processing (use oversampling for best results)
Definition: fxobjects.h:5156
LinearBuffer< double > irBuffer
linear buffer for the IR
Definition: fxobjects.h:2486
stateReg
Use this enum to easily access z^-1 state values inside of arrays. For some structures, fewer storage units are needed. They are divided as follows:
Definition: fxobjects.h:1305
PhaseVocoder vocoder
vocoder to perform PSM
Definition: fxobjects.h:9579
virtual void setInput3(double _in3)
Definition: fxobjects.h:6789
virtual double getOutput()
Definition: fxobjects.h:6765
globally utilized constants and enumerations
virtual bool canProcessAudioFrame()=0
IComponentAdaptor * port1CompAdaptor
componant or adaptor connected to port 1
Definition: fxobjects.h:7282
double outputLevel_dB
input level in dB
Definition: fxobjects.h:5778
The WDFTunableButterLPF3 object implements a tunable 3rd order Butterworth ladder filter...
Definition: fxobjects.h:7870
FilterBankOutput processFilterBank(double xn)
Definition: fxobjects.h:1718
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8385
double raw2dB(double raw)
calculates dB for given input
Definition: fxobjects.h:268
windowType window
window type
Definition: fxobjects.h:8906
virtual void setInput2(double _in2)
Definition: fxobjects.h:6227
DynamicsProcessorParameters parameters
object parameters
Definition: fxobjects.h:2130
T readBuffer(int delayInSamples)
Definition: fxobjects.h:2343
double lowShelfBoostCut_dB
low shelf gain
Definition: fxobjects.h:4564
fftw_complex * fft_input
array for FFT input
Definition: fxobjects.h:8789
fftw_complex * ifft_result
array for IFFT output
Definition: fxobjects.h:8792
double R3
component resistance
Definition: fxobjects.h:7290
virtual void setInput1(double _in1)
Definition: fxobjects.h:6660
void setParameters(const DelayAPFParameters ¶ms)
Definition: fxobjects.h:4299
BinData binData[PSM_FFT_LEN]
array of BinData structures for current FFT frame
Definition: fxobjects.h:9589
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2417
void createWDF()
Definition: fxobjects.h:8355
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4210
FastConvolver polyPhaseConvolvers[maxSamplingRatio]
a set of sub-band convolvers for polyphase operation
Definition: fxobjects.h:9869
virtual void setInput1(double _in1)
Definition: fxobjects.h:6224
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5183
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3756
unsigned int detectMode
detect mode, see TLD_ constants above
Definition: fxobjects.h:1809
void freqSample(int N, double A[], double h[], int symm)
calcuate the IR for an array of magnitude points using the frequency sampling method. NOTE: very old function that is all over the internet.
Definition: fxobjects.h:935
double imag
imaginary part
Definition: fxobjects.h:478
void setPitchShift(double semitones)
Definition: fxobjects.h:9224
virtual void setInput3(double _in3)
Definition: fxobjects.h:6544
distortionModel
Use this strongly typed enum to easily set the waveshaper model for the Triode objects.
Definition: fxobjects.h:5572
int peakBinsPrevious[PSM_FFT_LEN]
array of previous peak bin index values (-1 = not peak)
Definition: fxobjects.h:9593
virtual void setComponentValue_LC(double _componentValue_L, double _componentValue_C)
Definition: fxobjects.h:6485
double componentResistance
simulated resistance
Definition: fxobjects.h:6152
WdfSeriesAdaptor seriesAdaptor_L1
adaptor for L1
Definition: fxobjects.h:7945
SimpleLPFParameters getParameters()
Definition: fxobjects.h:3766
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2454
double inputLevel
input level (not in dB)
Definition: fxobjects.h:5900
bool overlapAddOnly
flag for overlap-add-only algorithms
Definition: fxobjects.h:8918
double ratio
processor I/O gain ratio
Definition: fxobjects.h:2013
int findEdgeTargetBin(double testFreq, double bin1Freq)
find bin for target frequency
Definition: fxobjects.h:622
double fc
brickwall fc
Definition: fxobjects.h:567
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:7049
OscillatorParameters parameters
object parameters
Definition: fxobjects.h:3244
double * filterIR
filter IR
Definition: fxobjects.h:9073
double componentValue_L
component value L
Definition: fxobjects.h:6550
double RL
RL value.
Definition: fxobjects.h:6553
void createWDF()
Definition: fxobjects.h:7908
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
The WdfInductor object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6251
virtual void setComponentValue_LC(double componentValue_L, double componentValue_C)
Definition: fxobjects.h:6062
virtual double getComponentValue_C()
Definition: fxobjects.h:6510
double R
value of R component
Definition: fxobjects.h:7114
double * getFilterIRTable(unsigned int FIRLength, rateConversionRatio ratio, unsigned int sampleRate)
returns the up or downsample ratio as a numeric value
Definition: fxobjects.h:9651
double atanWaveShaper(double xn, double saturation)
calculates arctangent waveshaper
Definition: fxobjects.h:383
virtual void setInput1(double _in1)
Definition: fxobjects.h:7689
The ClassATubePre object implements a simple cascade of four (4) triode tube models.
Definition: fxobjects.h:5805
BitCrusherParameters getParameters()
Definition: fxobjects.h:5963
IComponentAdaptor * getPort3_CompAdaptor()
Definition: fxobjects.h:7277
virtual double getComponentResistance()
Definition: fxobjects.h:6471
void doOverlapAdd(double *outputData=nullptr, int length=0)
perform the overlap/add on the IFFT data
Definition: fxobjects.cpp:1535
double updatedPhase
phase update value
Definition: fxobjects.h:9134
double Q
filter Q
Definition: fxobjects.h:2525
double releaseTime_mSec
release mSec
Definition: fxobjects.h:2021
void createDelayBuffers(double _sampleRate, double _bufferLength_mSec)
Definition: fxobjects.h:2896
IComponentAdaptor * port3CompAdaptor
componant or adaptor connected to port 3
Definition: fxobjects.h:7284
void setInterpolate(bool b)
Definition: fxobjects.h:2379
double getG_value()
Definition: fxobjects.h:1585
virtual void setInput(double in)
Definition: fxobjects.h:6396
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8655
virtual const SignalGenData renderAudioOutput()
Definition: fxobjects.h:3190
AudioFilter lpFilter
low-band filter
Definition: fxobjects.h:1761
unsigned int count
number of samples in output array
Definition: fxobjects.h:9762
bool hardLimitGate
threshold in dB
Definition: fxobjects.h:2016
virtual double getOutput1()
Definition: fxobjects.h:6409
virtual void setInput3(double _in3)
Definition: fxobjects.h:6424
virtual void setInput1(double _in1)
Definition: fxobjects.h:6418
WdfSeriesAdaptor seriesAdaptor_L1
adaptor for L1
Definition: fxobjects.h:7846
virtual double getComponentValue_R()
Definition: fxobjects.h:6999
virtual double getOutput1()
Definition: fxobjects.h:7406
bool calculateAnalogMagArray(AnalogMagData &magData)
calculate an arra of magnitude points from analog filter specifications
Definition: fxobjects.h:858
void setPort1_CompAdaptor(IComponentAdaptor *_port1CompAdaptor)
Definition: fxobjects.h:7154
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:9201
virtual double processAudioSample(double xn)
Definition: fxobjects.h:7898
void setCoefficients(double *coeffs)
Definition: fxobjects.h:1409
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2555
fftw_complex * getFFTData()
Definition: fxobjects.h:8849
double sampleRate
sample rate
Definition: fxobjects.h:3251
virtual double getOutput1()
Definition: fxobjects.h:6529
double normalOutput
normal
Definition: fxobjects.h:1220
virtual void setComponentValue_RC(double _componentValue_R, double _componentValue_C)
Definition: fxobjects.h:6977
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:1194
double sampleRate
sample rate
Definition: fxobjects.h:6927
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1529
unsigned int outputWriteIndex
circular buffer index: output write
Definition: fxobjects.h:8891
reverbDensity density
density setting thick or thin
Definition: fxobjects.h:4718
delayAlgorithm algorithm
delay algorithm
Definition: fxobjects.h:2691
virtual void setComponentValue_RC(double componentValue_R, double componentValue_C)
Definition: fxobjects.h:7264
bool calculateBrickwallMagArray(BrickwallMagData &magData)
calculate an arra of magnitude points from brickwall specifications
Definition: fxobjects.h:687
virtual void initializeAdaptorChain()
Definition: fxobjects.h:6019
double Q
va filter Q
Definition: fxobjects.h:5151
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8215
double windowHopCorrection
window correction including hop/overlap
Definition: fxobjects.h:8899
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2108
virtual void setInput3(double _in3)
Definition: fxobjects.h:6666
virtual void setInput2(double _in2)
Definition: fxobjects.h:6909
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4611
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8507
The WdfResistor object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6089
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:4814
void init(unsigned int lengthPowerOfTwo)
Definition: fxobjects.h:2457
The ZVAFilter object implements multpile Zavalishin VA Filters. Audio I/O:
Definition: fxobjects.h:5176
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2749
void writeDelay(double xn)
Definition: fxobjects.h:3959
The WdfParallelAdaptor object implements the parallel reflection-free (non-terminated) adaptor...
Definition: fxobjects.h:7534
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6151
double pitchShiftSemitones
pitch shift in half-steps
Definition: fxobjects.h:9165
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6585
virtual double getComponentValue()
Definition: fxobjects.h:6272
double componentResistance
simulated resistance
Definition: fxobjects.h:6314
ModulatedDelayParameters & operator=(const ModulatedDelayParameters ¶ms)
Definition: fxobjects.h:3286
virtual double getOutput()
Definition: fxobjects.h:6888
double quadPhaseOutput_neg
-90 degrees out
Definition: fxobjects.h:1223
bool enableLFO
flag to enable LFO
Definition: fxobjects.h:4178
unsigned int outputBufferLength
lenght of resampled output array
Definition: fxobjects.h:9598
double * windowBuffer
array for window
Definition: fxobjects.h:8883
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3672
unsigned int sampleRate
sample rate
Definition: fxobjects.h:9983
virtual double getComponentConductance()
Definition: fxobjects.h:6269
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8222
void setParameters(const AudioFilterParameters ¶meters)
Definition: fxobjects.h:1563
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3360
Custom parameter structure for the AudioDelay object.
Definition: fxobjects.h:2668
double getMagnitude(double re, double im)
calculates magnitude of a complex numb er
Definition: fxobjects.h:1003
virtual bool reset(double _sampleRate)=0
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2575
double lfoDepth_Pct
phaser LFO depth in %
Definition: fxobjects.h:3492
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1705
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:9221
virtual double getComponentValue_C()
Definition: fxobjects.h:7002
wdfComponent
Use this strongly typed enum to easily set the wdfComponent type.
Definition: fxobjects.h:7071
double RC
RC value.
Definition: fxobjects.h:6434
double psi
bin phase correction
Definition: fxobjects.h:9131
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6344
double outputGain_dB
make up gain
Definition: fxobjects.h:2022
unsigned int getFrameLength()
Definition: fxobjects.h:8785
double leftDelay_mSec
left delay time
Definition: fxobjects.h:2697
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_L6C6
adaptor for L6 and C6
Definition: fxobjects.h:8139
double in3
stored port 3 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7296
bool isPeak
flag for peak bins
Definition: fxobjects.h:9128
windowType
Use this strongly typed enum to easily set the windowing type for FFT algorithms that use it...
Definition: fxobjects.h:8682
double lfoMaxModulation_mSec
LFO maximum modulation time in mSec.
Definition: fxobjects.h:4181
IComponentAdaptor * getPort2_CompAdaptor()
Definition: fxobjects.h:7274
double lowShelf_fc
LSF shelf frequency.
Definition: fxobjects.h:5781
double lpf_g
LPF g coefficient (if enabled)
Definition: fxobjects.h:4176
virtual double getOutput3()
Definition: fxobjects.h:7026
double zRegister_C
storage register for C
Definition: fxobjects.h:6428
void flushBuffer()
Definition: fxobjects.h:2240
The SimpleLPF object implements a first order one-pole LPF using one coefficient "g" value...
Definition: fxobjects.h:3748
virtual void enableAuxInput(bool enableAuxInput)
Definition: fxobjects.h:1180
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8323
WdfSeriesAdaptor seriesAdaptor_L1C1
adaptor for L1 and C1
Definition: fxobjects.h:8035
double zRegister_L
storage register for L
Definition: fxobjects.h:7038
virtual double getComponentValue_C()
Definition: fxobjects.h:6879
WdfParallelAdaptor parallelAdaptor_C1
adaptor for C1
Definition: fxobjects.h:7847
virtual double getOutput2()
Definition: fxobjects.h:7511
ClassATubePreParameters getParameters()
Definition: fxobjects.h:5840
NestedDelayAPFParameters & operator=(const NestedDelayAPFParameters ¶ms)
Definition: fxobjects.h:4351
NestedDelayAPFParameters getParameters()
Definition: fxobjects.h:4489
void calculateFilterCoeffs()
Definition: fxobjects.h:5327
virtual void setInput2(double _in2)
Definition: fxobjects.h:7594
double wetLevel_dB
wet output level in dB
Definition: fxobjects.h:2692
virtual double getOutput2()
Definition: fxobjects.h:6135
double releaseTime_mSec
release time in milliseconds
Definition: fxobjects.h:1808
double bufferLength_mSec
total buffer length in mSec
Definition: fxobjects.h:4323
Custom parameter structure for the TwoBandShelvingFilter object. Used for reverb algorithms in book...
Definition: fxobjects.h:4546
double R1
input port resistance
Definition: fxobjects.h:7288
Custom parameter structure for the SimpleDelay object. Used for reverb algorithms in book...
Definition: fxobjects.h:3812
double * outputBuffer
output timeline (y)
Definition: fxobjects.h:8887
double getMagResponse(double theta, double a0, double a1, double a2, double b1, double b2)
returns the magnitude resonse of a 2nd order H(z) transfer function
Definition: fxobjects.h:443
virtual double getOutput3()
Definition: fxobjects.h:6657
virtual double getOutput2()
Definition: fxobjects.h:7621
The ModulatedDelay object implements the three basic algorithms: flanger, chorus, vibrato...
Definition: fxobjects.h:3322
Use this interface for objects that process audio input samples to produce audio output samples...
Definition: fxobjects.h:1160
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6123
void createCircularBufferPowerOfTwo(unsigned int _bufferLengthPowerOfTwo)
Definition: fxobjects.h:2314
double RL
RL value.
Definition: fxobjects.h:6676
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L3C3
adaptor for L3 and C3
Definition: fxobjects.h:8037
unsigned int inputCount
input sample counter
Definition: fxobjects.h:9074
void createDelayBuffer(double _sampleRate, double _bufferLength_mSec)
Definition: fxobjects.h:3920
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5511
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1379
double readDelayAtTime_mSec(double _delay_mSec)
Definition: fxobjects.h:3942
double sampleRate
sample rate
Definition: fxobjects.h:7050
virtual double getOutput2()
Definition: fxobjects.h:7023
WdfParallelAdaptor parallelAdaptor_L2C2
adaptor for L2 and C2
Definition: fxobjects.h:8036
double apfDelayMax_mSec
APF max delay time.
Definition: fxobjects.h:4723
PhaseShifterParameters & operator=(const PhaseShifterParameters ¶ms)
Definition: fxobjects.h:3478
double slopeIncrement
transition slope
Definition: fxobjects.h:608
void setComponent(wdfComponent componentType, double value1=0.0, double value2=0.0)
Definition: fxobjects.h:7170
The PhaseShifter object implements a six-stage phaser.
Definition: fxobjects.h:3555
void setParameters(const ZVAFilterParameters ¶ms)
Definition: fxobjects.h:5205
double coeffArray[numCoeffs]
our local copy of biquad coeffs
Definition: fxobjects.h:1595
The FastFFT provides a simple wrapper for the FFTW FFT operation - it is ultra-thin and simple to use...
Definition: fxobjects.h:8763
bool softKnee
soft knee flag
Definition: fxobjects.h:2017
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1848
rateConversionRatio
Use this strongly typed enum to easily set up or down sampling ratios.
Definition: fxobjects.h:9617
virtual double getOutput1()
Definition: fxobjects.h:7618
double modCounterQP
Quad Phase modulo counter [0.0, +1.0].
Definition: fxobjects.h:3043
LFO modLFO
LFO.
Definition: fxobjects.h:4329
double decimateAudio(DecimatorInput data)
Definition: fxobjects.h:9960
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6746
OscillatorParameters & operator=(const OscillatorParameters ¶ms)
Definition: fxobjects.h:2959
void setSourceResistance(double _sourceResistance)
Definition: fxobjects.h:7151
double Q
brickwall Q
Definition: fxobjects.h:568
void createCircularBuffer(unsigned int _bufferLength)
Definition: fxobjects.h:2306
FastConvolver convolver
the convolver
Definition: fxobjects.h:9860
void setParameters(const LRFilterBankParameters &_parameters)
Definition: fxobjects.h:1745
virtual void updateComponentResistance()
Definition: fxobjects.h:6477
WdfParallelAdaptor parallelAdaptor_L2C2
adaptor for L2 and C2
Definition: fxobjects.h:8133
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4229
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6285
double lfoRate_Hz
LFO rate in Hz, if enabled.
Definition: fxobjects.h:4179
bool mirrorMag
optionally mirror the output array
Definition: fxobjects.h:572
virtual void setComponentValue_RL(double _componentValue_R, double _componentValue_L)
Definition: fxobjects.h:6607
double Q
filter Q
Definition: fxobjects.h:8172
double lowShelfBoostCut_dB
LSF shelf gain/cut.
Definition: fxobjects.h:5782
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5696
bool polyphase
enable polyphase decomposition
Definition: fxobjects.h:9988
void initialize(unsigned int _filterImpulseLength)
Definition: fxobjects.h:8959
double RL
RL value.
Definition: fxobjects.h:6433
double lpf_g
gain value for LPF (if enabled)
Definition: fxobjects.h:4010
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5979
double highShelf_fc
high shelf fc
Definition: fxobjects.h:4735
double phi
bin phase angle
Definition: fxobjects.h:9130
double delay_Samples
current delay in samples; other objects may need to access this information
Definition: fxobjects.h:3832
double componentResistance
equivalent resistance of pair of componen
Definition: fxobjects.h:6680
double * inputBuffer
input timeline (x)
Definition: fxobjects.h:8886
The TwoBandShelvingFilter object implements two shelving filters in series in the standard "Bass and ...
Definition: fxobjects.h:4586
double ha
ha = N/4 — 75% overlap
Definition: fxobjects.h:9584
Custom output structure for interpolator; it holds an arry of interpolated output samples...
Definition: fxobjects.h:9758
Custom parameter structure for the EnvelopeFollower object.
Definition: fxobjects.h:5398
double sampleRate
sample rate
Definition: fxobjects.h:6436
BinData binDataPrevious[PSM_FFT_LEN]
array of BinData structures for previous FFT frame
Definition: fxobjects.h:9590
PSMVocoderParameters getParameters()
Definition: fxobjects.h:9557
virtual double getOutput2()
Definition: fxobjects.h:7409
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6177
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1929
virtual void setInput3(double _in3)
Definition: fxobjects.h:7403
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8445
virtual void updateComponentResistance()
Definition: fxobjects.h:6282
virtual double getComponentResistance()
Definition: fxobjects.h:6839
EnvelopeFollowerParameters & operator=(const EnvelopeFollowerParameters ¶ms)
Definition: fxobjects.h:5402
delayUpdateType
Use this strongly typed enum to easily set the delay update type; this varies depending on the design...
Definition: fxobjects.h:2654
WDFParameters & operator=(const WDFParameters ¶ms)
Definition: fxobjects.h:8158
The BitCrusher object implements a quantizing bitcrusher algorithm.
Definition: fxobjects.h:5950
Custom parameter structure for the DynamicsProcessor object. Ths struct includes all information need...
Definition: fxobjects.h:1987
virtual void setInput(double in)
Definition: fxobjects.h:6638
TriodeClassAParameters & operator=(const TriodeClassAParameters ¶ms)
Definition: fxobjects.h:5589
bool enableSidechain
enable external sidechain input to object
Definition: fxobjects.h:2018
double outputGain
outputGain level
Definition: fxobjects.h:5615
virtual void updateComponentResistance()
Definition: fxobjects.h:6200
double zRegister_C
storage register for L
Definition: fxobjects.h:6793
edgeTransition
Use this strongly typed enum to easily set the edge direction (rising or falling) of a transition ban...
Definition: fxobjects.h:588
double lfoMaxModulation_mSec
max modulation time if LFO is enabled
Definition: fxobjects.h:4380
analogFilter
Use this strongy typed enum to set the analog filter type for the AnalogMagData structure.
Definition: fxobjects.h:820
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5986
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5037
Custom parameter structure for the ZVAFilter object.
Definition: fxobjects.h:5128
Use this interface for objects in the WDF Ladder Filter library; see book for more information...
Definition: fxobjects.h:6012
bool resample(double *input, double *output, uint32_t inLength, uint32_t outLength, interpolation interpType=interpolation::kLinear, double scalar=1.0, double *outWindow=nullptr)
function that resamples an input array of length N into an output array of length M...
Definition: fxobjects.h:1060
virtual double getOutput2()
Definition: fxobjects.h:6412
double asymmetry
asymmetry level
Definition: fxobjects.h:5614
double RC
RC value.
Definition: fxobjects.h:7046
ReverbTankParameters getParameters()
Definition: fxobjects.h:4902
fftw_complex * ifft_result
array for IFFT output
Definition: fxobjects.h:8878
The LRFilterBank object implements 2 Linkwitz-Riley Filters in a parallel filter bank to split the si...
Definition: fxobjects.h:1679
void setParameters(AnalogFIRFilterParameters _parameters)
Definition: fxobjects.h:2587
void createWDF()
Definition: fxobjects.h:8013
virtual double getComponentValue_L()
Definition: fxobjects.h:6387
double doBipolarModulation(double bipolarModulatorValue, double minValue, double maxValue)
Perform bipolar modulation about a center that his halfway between the min and max values...
Definition: fxobjects.h:219
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:7243
filterCoeff
Use this enum to easily access coefficents inside of arrays.
Definition: fxobjects.h:1283
The WDFBesselBSF3 object implements a 3rd order Bessel BSF NOTE: designed with Elsie www...
Definition: fxobjects.h:7975
virtual double getComponentValue_L()
Definition: fxobjects.h:6507
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6882
bool enableLFO
flag to enable the modulated delay
Definition: fxobjects.h:4377
virtual void setComponentValue_LC(double _componentValue_L, double _componentValue_C)
Definition: fxobjects.h:6365
virtual double getOutput1()
Definition: fxobjects.h:6294
The WdfSeriesAdaptor object implements the series reflection-free (non-terminated) adaptor...
Definition: fxobjects.h:7324
fftw_complex * doInverseFFT(double *inputReal, double *inputImag)
perform the IFFT operation
Definition: fxobjects.cpp:1204
Custom parameter structure for the Biquad object. Default version defines the biquad structure used i...
Definition: fxobjects.h:9148
unsigned int wrapMaskOut
output wrap mask
Definition: fxobjects.h:8895
ComplexNumber complexMultiply(ComplexNumber c1, ComplexNumber c2)
returns the complex product of two complex numbers
Definition: fxobjects.h:489
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8264
bool calculateFilterCoeffs()
Definition: fxobjects.cpp:153
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6380
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2999
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5220
double C
value of C component
Definition: fxobjects.h:7116
double analogMatchSigma
analog matching Sigma value (see book)
Definition: fxobjects.h:5383
The AnalogFIRFilter object implements a somewhat silly algorithm that implaments an analog magnitude ...
Definition: fxobjects.h:2547
double outputLevel
output level (not in dB)
Definition: fxobjects.h:5901
virtual void updateComponentResistance()
Definition: fxobjects.h:6357
int previousPeakBin
index of peak bin in previous FFT
Definition: fxobjects.h:9133
virtual void setInput2(double _in2)
Definition: fxobjects.h:6663
WDFParameters getParameters()
Definition: fxobjects.h:8379
Custom parameter structure for the BitCrusher object.
Definition: fxobjects.h:5916
double coeffArray[numCoeffs]
Definition: fxobjects.h:1436
AnalogFIRFilterParameters getParameters()
Definition: fxobjects.h:2581
bool matchAnalogNyquistLPF
match analog gain at Nyquist
Definition: fxobjects.h:5154
unsigned int frameLength
current FFT length
Definition: fxobjects.h:8909
virtual double getComponentResistance()
Definition: fxobjects.h:6715
double wetLevel_dB
wet output level in dB
Definition: fxobjects.h:4738
double feedback_Pct
feedback in %
Definition: fxobjects.h:3302
virtual double getR2()
Definition: fxobjects.h:7439
void boundValue(double &value, double minValue, double maxValue)
Bound a value to min and max limits.
Definition: fxobjects.h:162
void calcEdgeFrequencies(double fc, double Q, double &f_Low, double &f_High)
calculagte low and high edge frequencies of BPF or BSF
Definition: fxobjects.h:511
OscillatorParameters getParameters()
Definition: fxobjects.h:3015
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6985
virtual double getComponentValue_L()
Definition: fxobjects.h:6753
virtual void initialize(double _R1)
Definition: fxobjects.h:7553
virtual double getOutput3()
Definition: fxobjects.h:6221
void initialize(unsigned int _frameLength, windowType _window)
initialize the Fast FFT object for operation
Definition: fxobjects.cpp:1082
Custom structure that holds magnitude information about a brickwall filter.
Definition: fxobjects.h:556
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2568
double fc
filter fc
Definition: fxobjects.h:8171
double lastEnvelope
output register
Definition: fxobjects.h:1946
virtual double getComponentValue()
Definition: fxobjects.h:6110
virtual double getComponentResistance()
Definition: fxobjects.h:6351
double innerAPF_g
g coefficient for inner APF
Definition: fxobjects.h:4374
double psi[PSM_FFT_LEN]
array of phase correction values for classic algorithm
Definition: fxobjects.h:9586
virtual double getOutput3()
Definition: fxobjects.h:6535
double releaseTime
release time coefficient
Definition: fxobjects.h:1944
double alpha0
input scalar, correct delay-free loop
Definition: fxobjects.h:5376
virtual double getComponentConductance()
Definition: fxobjects.h:6718
bool clampToUnityMax
clamp output to 1.0 (set false for true log detectors)
Definition: fxobjects.h:1811
ClassATubePreParameters parameters
object parameters
Definition: fxobjects.h:5896
double phaseInc
phase inc = fo/fs
Definition: fxobjects.h:3042
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7982
delayAlgorithm
Use this strongly typed enum to easily set the delay algorithm.
Definition: fxobjects.h:2638
double highShelfBoostCut_dB
HSF shelf frequency.
Definition: fxobjects.h:5784
The PhaseVocoder provides a basic phase vocoder that is initialized to N = 4096 and 75% overlap; the ...
Definition: fxobjects.h:8822
virtual double getOutput1()
Definition: fxobjects.h:6897
virtual double getOutput2()
Definition: fxobjects.h:6532
double makeUpGain_dB
stored makeup gain (dB)
Definition: fxobjects.h:5095
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6513
bool enableLPF
flag to enable LPF in structure
Definition: fxobjects.h:4175
double * windowBuff
buffer for window
Definition: fxobjects.h:9595
double sourceResistance
source impedance; OK for this to be set to 0.0 for Rs = 0
Definition: fxobjects.h:7310
double componentValue_R
component value R
Definition: fxobjects.h:6797
BitCrusherParameters & operator=(const BitCrusherParameters ¶ms)
Definition: fxobjects.h:5920
virtual double getComponentConductance()
Definition: fxobjects.h:6595
virtual double getOutput1()
Definition: fxobjects.h:7020
WdfSeriesAdaptor seriesAdaptor_R
adaptor for series R
Definition: fxobjects.h:8658
virtual double getOutput3()=0
DelayAPFParameters & operator=(const DelayAPFParameters ¶ms)
Definition: fxobjects.h:4155
windowType window
window type
Definition: fxobjects.h:8798
fftw_plan plan_backward
FFTW plan for IFFT.
Definition: fxobjects.h:8794
unsigned int startBin
starting bin for transition band
Definition: fxobjects.h:606
double RR
RR value.
Definition: fxobjects.h:6678
double fixeDelayWeight_Pct
fixed delay max weighying
Definition: fxobjects.h:4726
double g
simple LPF g value
Definition: fxobjects.h:3728
BinData & operator=(const BinData ¶ms)
Definition: fxobjects.h:9098
fftw_complex * doFFT(double *inputReal, double *inputImag=nullptr)
perform the FFT operation
Definition: fxobjects.cpp:1176
double phi[PSM_FFT_LEN]
array of phase values for classic algorithm
Definition: fxobjects.h:9585
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5957
unsigned int localPeakBin
index of peak-boss
Definition: fxobjects.h:9132
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4082
double dryLevel_dB
dry output level in dB
Definition: fxobjects.h:2693
virtual void setInput2(double _in2)
Definition: fxobjects.h:7502
virtual double getOutput()
Definition: fxobjects.h:6526
The WDFIdealRLCHPF object implements an ideal RLC HPF using the WDF library.
Definition: fxobjects.h:8316
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6926
void setParameters(const BiquadParameters &_parameters)
Definition: fxobjects.h:1405
double outerAPF_g
g coefficient for outer APF
Definition: fxobjects.h:4373
The NestedDelayAPF object implements a pair of nested Delaying APF structures. These are labled the o...
Definition: fxobjects.h:4403
PhaseShifterParameters getParameters()
Definition: fxobjects.h:3678
double ** decomposeFilter(double *filterIR, unsigned int FIRLength, unsigned int ratio)
performs a polyphase decomposition on a big FIR into a set of sub-band FIRs
Definition: fxobjects.h:9724
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2767
The WdfParallelRL object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6696
T readBuffer(double delayInFractionalSamples)
Definition: fxobjects.h:2358