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);
415 return sgn(xn)*(1.0 - exp(-fabs(saturation*xn)));
430 double wsGain =
calcWSGain(xn, saturation, asymmetry);
431 return sgn(xn)*(1.0 - exp(-fabs(wsGain*xn))) / (1.0 - exp(-wsGain));
444 inline double getMagResponse(
double theta,
double a0,
double a1,
double a2,
double b1,
double b2)
447 double num = a1*a1 + (a0 - a2)*(a0 - a2) + 2.0*a1*(a0 + a2)*cos(theta) + 4.0*a0*a2*cos(theta)*cos(theta);
448 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);
450 magSqr = num / denom;
454 double mag = pow(magSqr, 0.5);
498 return complexProduct;
514 bool arithmeticBW =
true;
515 double bandwidth = fc / Q;
521 f_Low = fc - bandwidth / 2.0;
522 f_High = fc + bandwidth / 2.0;
562 double* magArray =
nullptr;
563 unsigned int dftArrayLen = 0;
564 double sampleRate = 44100.0;
625 return (
int)(testFreq / bin1Freq);
642 double targetF1 = testFreq;
643 double targetF2 = testFreq + relax_Bins*bin1Freq;
648 int relaxBinsAbsDiff = nF2 - nF1;
656 int relaxBins = nF2 - nF1;
667 transitionData.
stopBin = relaxBins + nF1;
672 if (transitionData.
edgeType == edgeTransition::kFallingEdge)
691 double actualLength = magData.
mirrorMag ? (double)magData.dftArrayLen : (
double)magData.dftArrayLen * 2.0;
692 int dumpLength = magData.
mirrorMag ? magData.dftArrayLen / 2 : magData.dftArrayLen;
695 double bin1 = magData.sampleRate / actualLength;
698 memset(&magData.magArray[0], 0, magData.dftArrayLen *
sizeof(
double));
702 fallingEdge.
edgeType = edgeTransition::kFallingEdge;
705 risingEdge.
edgeType = edgeTransition::kRisingEdge;
710 bool relaxIt =
false;
713 if(magData.filterType == brickwallFilter::kBrickLPF)
715 else if (magData.filterType == brickwallFilter::kBrickHPF)
717 else if (magData.filterType == brickwallFilter::kBrickBPF)
722 else if (magData.filterType == brickwallFilter::kBrickBSF)
729 for (
int i = 0; i < dumpLength; i++)
731 double eval_f = i*bin1;
733 if (magData.filterType == brickwallFilter::kBrickLPF)
737 if (eval_f <= magData.
fc)
738 magData.magArray[i] = 1.0;
743 magData.magArray[i] = 1.0;
748 else if (magData.filterType == brickwallFilter::kBrickHPF)
752 if (eval_f >= magData.
fc)
753 magData.magArray[i] = 1.0;
758 magData.magArray[i] = 1.0;
763 else if (magData.filterType == brickwallFilter::kBrickBPF)
767 if (eval_f >= magData.
f_Low && eval_f <= magData.
f_High)
768 magData.magArray[i] = 1.0;
773 magData.magArray[i] = 1.0;
781 else if (magData.filterType == brickwallFilter::kBrickBSF)
783 if (!relaxIt && eval_f >= magData.
f_Low && eval_f <= magData.
f_High)
784 magData.magArray[i] = 0.0;
785 else if(!relaxIt && eval_f < magData.f_Low || eval_f > magData.
f_High)
786 magData.magArray[i] = 1.0;
799 int index = magData.dftArrayLen / 2 - 1;
800 for (
unsigned int i = magData.dftArrayLen / 2; i <magData.dftArrayLen; i++)
802 magData.magArray[i] = magData.magArray[index--];
839 double* magArray =
nullptr;
840 unsigned int dftArrayLen = 0;
841 double sampleRate = 44100.0;
847 bool mirrorMag =
true;
862 double actualLength = magData.mirrorMag ? (double)magData.dftArrayLen : (
double)magData.dftArrayLen * 2.0;
863 int dumpLength = magData.mirrorMag ? magData.dftArrayLen / 2 : magData.dftArrayLen;
865 double bin1 = magData.sampleRate / actualLength;
866 double zeta = 1.0 / (2.0*magData.Q);
867 double w_c = 2.0*
kPi*magData.fc;
870 memset(&magData.magArray[0], 0, magData.dftArrayLen *
sizeof(
double));
872 for (
int i = 0; i < dumpLength; i++)
874 double eval_w = 2.0*
kPi*i*bin1;
875 double w_o = eval_w / w_c;
877 if (magData.filterType == analogFilter::kLPF1)
879 double denXSq = 1.0 + (w_o*w_o);
880 magData.magArray[i] = 1.0 / (pow(denXSq, 0.5));
882 else if (magData.filterType == analogFilter::kHPF1)
884 double denXSq = 1.0 + (w_o*w_o);
885 magData.magArray[i] = w_o / (pow(denXSq, 0.5));
887 else if (magData.filterType == analogFilter::kLPF2)
889 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
890 magData.magArray[i] = 1.0 / (pow(denXSq, 0.5));
892 else if (magData.filterType == analogFilter::kHPF2)
894 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
895 magData.magArray[i] = (w_o*w_o) / (pow(denXSq, 0.5));
897 else if (magData.filterType == analogFilter::kBPF2)
899 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
900 magData.magArray[i] = 2.0*w_o*zeta / (pow(denXSq, 0.5));
902 else if (magData.filterType == analogFilter::kBSF2)
904 double numXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o));
905 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
906 magData.magArray[i] = (pow(numXSq, 0.5)) / (pow(denXSq, 0.5));
911 if (!magData.mirrorMag)
915 int index = magData.dftArrayLen / 2 - 1;
916 for (
unsigned int i = magData.dftArrayLen / 2; i <magData.dftArrayLen; i++)
918 magData.magArray[i] = magData.magArray[index--];
936 inline void freqSample(
int N,
double A[],
double h[],
int symm)
942 if (symm == POSITIVE)
946 for (n = 0; n<N; n++)
950 for (k = 1; k <= M; k++)
951 val += 2.0 * A[k] * cos(x*k);
957 for (n = 0; n<N; n++)
961 for (k = 1; k <= (N / 2 - 1); k++)
962 val += 2.0 * A[k] * cos(x*k);
971 for (n = 0; n<N; n++)
975 for (k = 1; k <= M; k++)
976 val += 2.0 * A[k] * sin(x*k);
982 for (n = 0; n<N; n++)
984 val = A[N / 2] * sin(
kPi * (n - M));
986 for (k = 1; k <= (N / 2 - 1); k++)
987 val += 2.0 * A[k] * sin(x*k);
1006 return sqrt((re*re) + (im*im));
1021 return atan2(im, re);
1042 enum class interpolation {kLinear, kLagrange4};
1061 inline bool resample(
double* input,
double* output, uint32_t inLength, uint32_t outLength,
1062 interpolation interpType = interpolation::kLinear,
1063 double scalar = 1.0,
double* outWindow =
nullptr)
1065 if (inLength == 0 || outLength == 0)
return false;
1066 if (!input || !output)
return false;
1068 double x[4] = { 0.0 };
1069 double y[4] = { 0.0 };
1072 double inc = (double)inLength / (
double)(outLength);
1076 output[0] = outWindow[0] * scalar * input[0];
1078 output[0] = scalar * input[0];
1080 if (interpType == interpolation::kLagrange4)
1082 for (
unsigned int i = 1; i < outLength; i++)
1085 double xInterp = i*inc;
1086 int x1 = (int)xInterp;
1087 double xbar = xInterp - x1;
1089 if (xInterp > 1 && x1 < outLength-2)
1092 y[0] = input[(int)x[0]];
1095 y[1] = input[(int)x[1]];
1098 y[2] = input[(int)x[2]];
1101 y[3] = input[(int)x[3]];
1111 if (x2 >= outLength)
1113 double y1 = input[x1];
1114 double y2 = input[x2];
1126 for (
unsigned int i = 1; i < outLength; i++)
1128 double xInterp = i*inc;
1129 int x1 = (int)xInterp;
1131 if (x2 >= outLength)
1133 double y1 = input[x1];
1134 double y2 = input[x2];
1169 virtual bool reset(
double _sampleRate) = 0;
1197 uint32_t inputChannels,
1198 uint32_t outputChannels)
1249 virtual bool reset(
double _sampleRate) = 0;
1325 enum class biquadAlgorithm { kDirect, kCanonical, kTransposeDirect, kTransposeCanonical };
1346 if (
this == ¶ms)
1384 memset(&
stateArray[0], 0,
sizeof(
double)*numStates);
1414 memcpy(&
coeffArray[0], &coeffs[0],
sizeof(
double)*numCoeffs);
1466 kLPF1P, kLPF1, kHPF1, kLPF2, kHPF2, kBPF2, kBSF2, kButterLPF2, kButterHPF2, kButterBPF2,
1467 kButterBSF2, kMMALPF2, kMMALPF2B, kLowShelf, kHiShelf, kNCQParaEQ, kCQParaEQ, kLWRLPF2, kLWRHPF2,
1468 kAPF1, kAPF2, kResonA, kResonB, kMatchLP2A, kMatchLP2B, kMatchBP2A, kMatchBP2B,
1469 kImpInvLP1, kImpInvLP2
1490 if (
this == ¶ms)
1648 if (
this == ¶ms)
1685 params.
algorithm = filterAlgorithm::kLWRLPF2;
1689 params.
algorithm = filterAlgorithm::kLWRHPF2;
1768 const unsigned int TLD_AUDIO_DETECT_MODE_PEAK = 0;
1769 const unsigned int TLD_AUDIO_DETECT_MODE_MS = 1;
1770 const unsigned int TLD_AUDIO_DETECT_MODE_RMS = 2;
1771 const double TLD_AUDIO_ENVELOPE_ANALOG_TC = -0.99967234081320612357829304641019;
1795 if (
this == ¶ms)
1857 double input = fabs(xn);
1865 double currEnvelope = 0.0;
1878 currEnvelope = fmin(currEnvelope, 1.0);
1881 currEnvelope = fmax(currEnvelope, 0.0);
1888 currEnvelope = pow(currEnvelope, 0.5);
1892 return currEnvelope;
1895 if (currEnvelope <= 0)
1901 return 20.0*log10(currEnvelope);
1948 void setAttackTime(
double attack_in_ms,
bool forceCalc =
false);
1951 void setReleaseTime(
double release_in_ms,
bool forceCalc =
false);
1992 if (
this == ¶ms)
2110 double detect_dB = 0.0;
2125 return xn * gr * makeupGain;
2138 double output_dB = 0.0;
2147 output_dB = detect_dB;
2160 output_dB = detect_dB;
2188 output_dB = detect_dB;
2192 output_dB = -1.0e34;
2201 output_dB = detect_dB;
2231 template <
typename T>
2239 void flushBuffer() { memset(&buffer[0], 0, bufferLength *
sizeof(T)); }
2246 bufferLength = _bufferLength;
2249 buffer.reset(
new T[bufferLength]);
2258 if (index >= bufferLength)
return;
2261 buffer[index] = input;
2267 if (index >= bufferLength)
return 0.0;
2270 return buffer[index];
2274 std::unique_ptr<T[]> buffer =
nullptr;
2275 unsigned int bufferLength = 1024;
2293 template <
typename T>
2301 void flushBuffer(){ memset(&buffer[0], 0, bufferLength *
sizeof(T)); }
2319 bufferLength = _bufferLengthPowerOfTwo;
2322 wrapMask = bufferLength - 1;
2325 buffer.reset(
new T[bufferLength]);
2335 buffer[writeIndex++] = input;
2338 writeIndex &= wrapMask;
2347 int readIndex = (writeIndex - 1) - delayInSamples;
2350 readIndex &= wrapMask;
2353 return buffer[readIndex];
2360 T y1 =
readBuffer((
int)delayInFractionalSamples);
2363 if (!interpolate)
return y1;
2368 T y2 =
readBuffer((
int)delayInFractionalSamples + 1);
2371 double fraction = delayInFractionalSamples - (int)delayInFractionalSamples;
2381 std::unique_ptr<T[]> buffer =
nullptr;
2382 unsigned int writeIndex = 0;
2383 unsigned int bufferLength = 1024;
2384 unsigned int wrapMask = 1023;
2385 bool interpolate =
true;
2430 double output = 0.0;
2437 for (
unsigned int i = 0; i <
length; i++)
2444 output += signal*irrrrr;
2456 void init(
unsigned int lengthPowerOfTwo)
2458 length = lengthPowerOfTwo;
2467 if (lengthPowerOfTwo !=
length)
2469 length = lengthPowerOfTwo;
2476 for (
unsigned int i = 0; i <
length; i++)
2491 const unsigned int IR_LEN = 512;
2511 if (
this == ¶ms)
2556 sampleRate = _sampleRate;
2557 convolver.
reset(_sampleRate);
2558 convolver.
init(IR_LEN);
2588 if (_parameters.
fc != parameters.
fc ||
2589 _parameters.
Q != parameters.
Q ||
2594 analogFilterData.sampleRate = sampleRate;
2595 analogFilterData.magArray = &analogMagArray[0];
2596 analogFilterData.dftArrayLen = IR_LEN;
2597 analogFilterData.mirrorMag =
false;
2599 analogFilterData.filterType = _parameters.
filterType;
2600 analogFilterData.fc = _parameters.
fc;
2601 analogFilterData.Q = _parameters.
Q;
2607 freqSample(IR_LEN, analogMagArray, irArray, POSITIVE);
2613 parameters = _parameters;
2619 double analogMagArray[IR_LEN] = { 0.0 };
2620 double irArray[IR_LEN] = { 0.0 };
2621 double sampleRate = 0.0;
2673 if (
this == ¶ms)
2729 if (sampleRate == _sampleRate)
2751 double yn = delayBuffer_L.
readBuffer(delayInSamples_L);
2754 double dn = xn + (parameters.
feedback_Pct / 100.0) * yn;
2760 double output = dryMix*xn + wetMix*yn;
2771 uint32_t inputChannels,
2772 uint32_t outputChannels)
2775 if (inputChannels == 0 || outputChannels == 0)
2779 if (parameters.
algorithm != delayAlgorithm::kNormal &&
2780 parameters.
algorithm != delayAlgorithm::kPingPong)
2784 if (outputChannels == 1)
2796 double xnL = inputFrame[0];
2799 double xnR = inputChannels > 1 ? inputFrame[1] : xnL;
2802 double ynL = delayBuffer_L.
readBuffer(delayInSamples_L);
2805 double ynR = delayBuffer_R.
readBuffer(delayInSamples_R);
2808 double dnL = xnL + (parameters.
feedback_Pct / 100.0) * ynL;
2811 double dnR = xnR + (parameters.
feedback_Pct / 100.0) * ynR;
2814 if (parameters.
algorithm == delayAlgorithm::kNormal)
2822 else if (parameters.
algorithm == delayAlgorithm::kPingPong)
2832 double outputL = dryMix*xnL + wetMix*ynL;
2835 double outputR = dryMix*xnR + wetMix*ynR;
2838 outputFrame[0] = outputL;
2841 outputFrame[1] = outputR;
2860 dryMix = pow(10.0, _parameters.
dryLevel_dB / 20.0);
2862 wetMix = pow(10.0, _parameters.
wetLevel_dB / 20.0);
2865 parameters = _parameters;
2868 if (parameters.
updateType == delayUpdateType::kLeftAndRight)
2872 double newDelayInSamples_L = parameters.
leftDelay_mSec*(samplesPerMSec);
2873 double newDelayInSamples_R = parameters.
rightDelay_mSec*(samplesPerMSec);
2876 delayInSamples_L = newDelayInSamples_L;
2877 delayInSamples_R = newDelayInSamples_R;
2879 else if (parameters.
updateType == delayUpdateType::kLeftPlusRatio)
2886 double newDelayInSamples = parameters.
leftDelay_mSec*(samplesPerMSec);
2889 delayInSamples_L = newDelayInSamples;
2890 delayInSamples_R = delayInSamples_L*delayRatio;
2898 bufferLength_mSec = _bufferLength_mSec;
2899 sampleRate = _sampleRate;
2900 samplesPerMSec = sampleRate / 1000.0;
2903 bufferLength = (
unsigned int)(bufferLength_mSec*(samplesPerMSec)) + 1;
2913 double sampleRate = 0.0;
2914 double samplesPerMSec = 0.0;
2915 double delayInSamples_L = 0.0;
2916 double delayInSamples_R = 0.0;
2917 double bufferLength_mSec = 0.0;
2918 unsigned int bufferLength = 0;
2919 double wetMix = 0.707;
2920 double dryMix = 0.707;
2960 if (
this == ¶ms)
2994 LFO() { srand(time(NULL)); }
3048 if (
phaseInc > 0 && moduloCounter >= 1.0)
3050 moduloCounter -= 1.0;
3055 if (
phaseInc < 0 && moduloCounter <= 0.0)
3057 moduloCounter += 1.0;
3071 if (
phaseInc > 0 && moduloCounter >= 1.0)
3073 moduloCounter -= 1.0;
3078 if (
phaseInc < 0 && moduloCounter <= 0.0)
3080 moduloCounter += 1.0;
3090 const double B = 4.0 /
kPi;
3091 const double C = -4.0 / (
kPi*
kPi);
3092 const double P = 0.225;
3096 double y = B * angle + C * angle * fabs(angle);
3097 y = P * (y * fabs(y) - y) + y;
3161 memset(&
stateArray[0], 0,
sizeof(
double)*numDFOStates);
3221 double n = wnT1 / wT;
3287 if (
this == ¶ms)
3333 delay.
reset(_sampleRate);
3337 lfo.
reset(_sampleRate);
3339 params.
waveform = generatorWaveform::kTriangle;
3364 uint32_t inputChannels,
3365 uint32_t outputChannels)
3368 if (inputChannels == 0 || outputChannels == 0)
3376 double minDelay_mSec = 0.0;
3377 double maxDepth_mSec = 0.0;
3380 if (parameters.
algorithm == modDelaylgorithm::kFlanger)
3382 minDelay_mSec = 0.1;
3383 maxDepth_mSec = 7.0;
3387 if (parameters.
algorithm == modDelaylgorithm::kChorus)
3389 minDelay_mSec = 10.0;
3390 maxDepth_mSec = 30.0;
3395 if (parameters.
algorithm == modDelaylgorithm::kVibrato)
3397 minDelay_mSec = 0.0;
3398 maxDepth_mSec = 7.0;
3406 double modulationMin = minDelay_mSec;
3407 double modulationMax = minDelay_mSec + maxDepth_mSec;
3410 if (parameters.
algorithm == modDelaylgorithm::kFlanger)
3412 modulationMin, modulationMax);
3424 return delay.
processAudioFrame(inputFrame, outputFrame, inputChannels, outputChannels);
3440 parameters = _parameters;
3444 if (parameters.
algorithm == modDelaylgorithm::kVibrato)
3445 lfoParams.
waveform = generatorWaveform::kSin;
3447 lfoParams.
waveform = generatorWaveform::kTriangle;
3479 if (
this == ¶ms)
3497 const unsigned int PHASER_STAGES = 6;
3498 const double apf0_minF = 16.0;
3499 const double apf0_maxF = 1600.0;
3501 const double apf1_minF = 33.0;
3502 const double apf1_maxF = 3300.0;
3504 const double apf2_minF = 48.0;
3505 const double apf2_maxF = 4800.0;
3507 const double apf3_minF = 98.0;
3508 const double apf3_maxF = 9800.0;
3510 const double apf4_minF = 160.0;
3511 const double apf4_maxF = 16000.0;
3513 const double apf5_minF = 260.0;
3514 const double apf5_maxF = 20480.0;
3538 lfoparams.
waveform = generatorWaveform::kSin;
3542 params.
algorithm = filterAlgorithm::kAPF1;
3544 for (
int i = 0; i < PHASER_STAGES; i++)
3560 for (
int i = 0; i < PHASER_STAGES; i++){
3582 double modulatorValue = lfoValue*depth;
3619 double alpha0 = 1.0 / (1.0 + K*gamma6);
3625 double u = alpha0*(xn - K*Sn);
3636 double output = 0.707*xn + 0.707*APF6;
3689 if (
this == ¶ms)
3737 return simpleLPFParameters;
3746 simpleLPFParameters = params;
3756 double g = simpleLPFParameters.
g;
3757 double yn = (1.0 - g)*xn + g*state;
3787 if (
this == ¶ms)
3832 if (sampleRate == _sampleRate)
3851 return simpleDelayParameters;
3860 simpleDelayParameters = params;
3892 bufferLength_mSec = _bufferLength_mSec;
3893 sampleRate = _sampleRate;
3894 samplesPerMSec = sampleRate / 1000.0;
3897 bufferLength = (
unsigned int)(bufferLength_mSec*(samplesPerMSec)) + 1;
3914 double _delay_Samples = _delay_mSec*(samplesPerMSec);
3917 return delayBuffer.
readBuffer(_delay_Samples);
3937 double sampleRate = 0.0;
3938 double samplesPerMSec = 0.0;
3939 double bufferLength_mSec = 0.0;
3940 unsigned int bufferLength = 0;
3964 if (
this == ¶ms)
4034 double g2 = lpf_g*(1.0 - comb_g);
4035 double filteredSignal = yn + g2*lpf_state;
4036 input = xn + comb_g*(filteredSignal);
4037 lpf_state = filteredSignal;
4041 input = xn + comb_g*yn;
4059 return combFilterParameters;
4068 combFilterParameters = params;
4077 double exponent = -3.0*delayParams.
delay_Samples*(1.0 / sampleRate);
4078 double rt60_mSec = combFilterParameters.
RT60Time_mSec / 1000.0;
4079 comb_g = pow(10.0, exponent / rt60_mSec);
4082 lpf_g = combFilterParameters.
lpf_g;
4088 sampleRate = _sampleRate;
4089 bufferLength_mSec = delay_mSec;
4097 double sampleRate = 0.0;
4098 double comb_g = 0.0;
4099 double bufferLength_mSec = 0.0;
4103 double lpf_state = 0.0;
4126 if (
this == ¶ms)
4216 minDelay = fmax(0.0, minDelay);
4221 minDelay, maxDelay);
4233 wnD = wnD*(1.0 - lpf_g) + lpf_g*
lpf_state;
4238 double wn = xn + apf_g*wnD;
4241 double yn = -apf_g*wn + wnD;
4322 if (
this == ¶ms)
4386 nestedAPF.
reset(_sampleRate);
4414 minDelay = fmax(0.0, minDelay);
4420 minDelay, maxDelay);
4432 wnD = wnD*(1.0 - lpf_g) + lpf_g*
lpf_state;
4437 double wn = xn + apf_g*wnD;
4443 double yn = -apf_g*wn + wnD;
4466 nestedAPFParameters = params;
4521 if (
this == ¶ms)
4561 params.
algorithm = filterAlgorithm::kLowShelf;
4565 params.
algorithm = filterAlgorithm::kHiShelf;
4574 lowShelfFilter.
reset(_sampleRate);
4575 highShelfFilter.
reset(_sampleRate);
4593 return filteredSignal;
4611 parameters = params;
4661 if (
this == ¶ms)
4712 const unsigned int NUM_BRANCHES = 4;
4713 const unsigned int NUM_CHANNELS = 2;
4742 sampleRate = _sampleRate;
4745 preDelay.
reset(_sampleRate);
4748 for (
int i = 0; i < NUM_BRANCHES; i++)
4750 branchDelays[i].
reset(_sampleRate);
4753 branchNestedAPFs[i].
reset(_sampleRate);
4756 branchLPFs[i].
reset(_sampleRate);
4758 for (
int i = 0; i < NUM_CHANNELS; i++)
4760 shelvingFilters[i].
reset(_sampleRate);
4776 float inputs[2] = { 0.0 };
4777 float outputs[2] = { 0.0 };
4785 uint32_t inputChannels,
4786 uint32_t outputChannels)
4788 double output = 0.0;
4791 double globFB = branchDelays[NUM_BRANCHES-1].
readDelay();
4794 double fb = parameters.
kRT*(globFB);
4797 double xnL = inputFrame[0];
4798 double xnR = inputChannels > 1 ? inputFrame[1] : 0.0;
4799 double monoXn = double(1.0 / inputChannels)*xnL + double(1.0 / inputChannels)*xnR;
4805 double input = preDelayOut + fb;
4806 for (
int i = 0; i < NUM_BRANCHES; i++)
4811 input = delayOut + preDelayOut;
4823 double weight = 0.707;
4837 if (parameters.
density == reverbDensity::kThick)
4855 double dry = pow(10.0, parameters.
dryLevel_dB / 20.0);
4856 double wet = pow(10.0, parameters.
wetLevel_dB / 20.0);
4858 if (outputChannels == 1)
4859 outputFrame[0] = dry*xnL + wet*(0.5*tankOutL + 0.5*tankOutR);
4862 outputFrame[0] = dry*xnL + wet*tankOutL;
4863 outputFrame[1] = dry*xnR + wet*tankOutR;
4894 lpfParams.
g = params.
lpf_g;
4896 for (
int i = 0; i < NUM_BRANCHES; i++)
4920 for (
int i = 0; i < NUM_BRANCHES; i++)
4939 delayParams.
delayTime_mSec = globalFixedMaxDelay*fixedDelayWeight[i];
4944 parameters = params;
4959 double apfDelayWeight[NUM_BRANCHES * 2] = { 0.317, 0.873, 0.477, 0.291, 0.993, 0.757, 0.179, 0.575 };
4960 double fixedDelayWeight[NUM_BRANCHES] = { 1.0, 0.873, 0.707, 0.667 };
4961 double sampleRate = 0.0;
5023 double output_dB = 0.0;
5026 bool softknee =
true;
5027 double kneeWidth_dB = 10.0;
5034 output_dB = detect_dB;
5044 output_dB = detect_dB;
5046 else if (2.0*(fabs(detect_dB -
threshold_dB)) <= kneeWidth_dB)
5047 output_dB = detect_dB - pow((detect_dB -
threshold_dB + (kneeWidth_dB / 2.0)), 2.0) / (2.0*kneeWidth_dB);
5049 else if (2.0*(detect_dB -
threshold_dB) > kneeWidth_dB)
5054 return pow(10.0, (output_dB - detect_dB) / 20.0);
5084 kLPF1, kHPF1, kAPF1, kSVF_LP, kSVF_HP, kSVF_BP, kSVF_BS
5105 if (
this == ¶ms)
5208 double halfPeak_dBGain =
dB2Raw(-peak_dB / 2.0);
5209 xn *= halfPeak_dBGain;
5230 double hpf = xn - lpf;
5233 double apf = lpf - hpf;
5239 if (matchAnalogNyquistLPF)
5240 return lpf +
alpha*hpf;
5265 double bsf = hpf + lpf;
5279 if (matchAnalogNyquistLPF)
5281 return filterOutputGain*lpf;
5284 return filterOutputGain*hpf;
5286 return filterOutputGain*bpf;
5288 return filterOutputGain*bsf;
5291 return filterOutputGain*lpf;
5305 double wa = (2.0 / T)*tan(wd*T / 2.0);
5306 double g = wa*T / 2.0;
5314 alpha = g / (1.0 + g);
5320 alpha0 = 1.0 / (1.0 + 2.0*R*g + g*g);
5372 if (
this == ¶ms)
5419 filterParams.
fc = 1000.0;
5429 adParams.
detectMode = TLD_AUDIO_DETECT_MODE_RMS;
5462 filterParams.
fc = params.
fc;
5463 filterParams.
Q = params.
Q;
5493 double detectValue = pow(10.0, detect_dB / 20.0);
5494 double deltaValue = detectValue - threshValue;
5500 if (deltaValue > 0.0)
5503 double modulatorValue = 0.0;
5559 if (
this == ¶ms)
5617 params.
algorithm = filterAlgorithm::kHPF1;
5621 params.
algorithm = filterAlgorithm::kLowShelf;
5653 filterParams.
algorithm = filterAlgorithm::kHPF1;
5657 filterParams.
algorithm = filterAlgorithm::kLowShelf;
5674 double output = 0.0;
5707 const unsigned int NUM_TUBES = 4;
5726 if (
this == ¶ms)
5791 tubeParams.
waveshaper = distortionModel::kFuzzAsym;
5793 for (
int i = 0; i < NUM_TUBES; i++)
5838 for (
int i = 0; i < NUM_TUBES; i++)
5890 if (
this == ¶ms)
5925 virtual bool reset(
double _sampleRate){
return true; }
5956 return QL*(int(xn /
QL));
5997 virtual void setInput1(
double _in1) = 0;
6000 virtual void setInput2(
double _in2) = 0;
6003 virtual void setInput3(
double _in3) = 0;
6015 virtual void reset(
double _sampleRate) {}
6304 WdfSeriesLC(
double _componentValue_L,
double _componentValue_C)
6366 double YC = 1.0 /
RC;
6367 double K = (1.0 -
RL*YC) / (1.0 +
RL*YC);
6424 WdfParallelLC(
double _componentValue_L,
double _componentValue_C)
6486 double YL = 1.0 /
RL;
6487 double K = (YL*
RC - 1.0) / (YL*
RC + 1.0);
6545 WdfSeriesRL(
double _componentValue_R,
double _componentValue_L)
6668 WdfParallelRL(
double _componentValue_R,
double _componentValue_L)
6792 WdfSeriesRC(
double _componentValue_R,
double _componentValue_C)
6915 WdfParallelRC(
double _componentValue_R,
double _componentValue_C)
7039 enum class wdfComponent { R, L, C, seriesLC, parallelLC, seriesRL, parallelRL, seriesRC, parallelRC };
7147 if (componentType == wdfComponent::R)
7153 else if (componentType == wdfComponent::L)
7159 else if (componentType == wdfComponent::C)
7165 else if (componentType == wdfComponent::seriesLC)
7171 else if (componentType == wdfComponent::parallelLC)
7177 else if (componentType == wdfComponent::seriesRL)
7183 else if (componentType == wdfComponent::parallelRL)
7189 else if (componentType == wdfComponent::seriesRC)
7195 else if (componentType == wdfComponent::parallelRC)
7227 wdfComponent->setComponentValue_LC(componentValue_L, componentValue_C);
7234 wdfComponent->setComponentValue_RL(componentValue_R, componentValue_L);
7241 wdfComponent->setComponentValue_RC(componentValue_R, componentValue_C);
7307 double componentResistance = 0.0;
7311 R2 =
R1 + componentResistance;
7321 double componentResistance = 0.0;
7326 B =
R1 / (
R1 + componentResistance);
7333 R3 = componentResistance;
7415 double componentResistance = 0.0;
7419 R2 =
R1 + componentResistance;
7429 double componentResistance = 0.0;
7441 R3 = componentResistance;
7454 double N3 =
in1 + N2;
7517 double componentConductance = 0.0;
7522 R2 = 1.0 / ((1.0 /
R1) + componentConductance);
7532 double G1 = 1.0 /
R1;
7533 double componentConductance = 0.0;
7538 A = G1 / (G1 + componentConductance);
7545 R3 = 1.0/ componentConductance;
7574 N1 =
in2 - A*(-
in1 + N2);
7627 double componentConductance = 0.0;
7632 R2 = 1.0 / ((1.0 /
R1) + componentConductance);
7642 double G1 = 1.0 /
R1;
7647 double componentConductance = 0.0;
7651 A1 = 2.0*G1 / (G1 + componentConductance + G2);
7659 R3 = 1.0 / componentConductance;
7673 N1 = -A1*(-
in1 + N2) + N2 - A3*N2;
7798 double L1_value = 95.49e-3;
7799 double C1_value = 0.5305e-6;
7800 double L2_value = 95.49e-3;
7909 fc_Hz = fc_Hz*(tan(arg) / arg);
7923 double L1_norm = 95.493;
7924 double C1_norm = 530.516e-6;
7925 double L2_norm = 95.493;
8134 if (
this == ¶ms)
8177 sampleRate = _sampleRate;
8250 double arg = (
kPi*fc_Hz) / sampleRate;
8251 fc_Hz = fc_Hz*(tan(arg) / arg);
8254 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8255 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8268 double sampleRate = 1.0;
8371 fc_Hz = fc_Hz*(tan(arg) / arg);
8374 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8375 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8419 sampleRate = _sampleRate;
8491 double arg = (
kPi*fc_Hz) / sampleRate;
8492 fc_Hz = fc_Hz*(tan(arg) / arg);
8495 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8496 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8510 double sampleRate = 1.0;
8613 fc_Hz = fc_Hz*(tan(arg) / arg);
8616 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8617 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8652 enum class windowType {kNoWindow, kRectWindow, kHannWindow, kBlackmanHarrisWindow, kHammingWindow };
8664 inline std::unique_ptr<double[]>
makeWindow(
unsigned int windowLength,
unsigned int hopSize,
windowType window,
double& gainCorrectionValue)
8666 std::unique_ptr<double[]> windowBuffer;
8667 windowBuffer.reset(
new double[windowLength]);
8669 if (!windowBuffer)
return nullptr;
8671 double overlap = hopSize > 0.0 ? 1.0 - (double)hopSize / (
double)windowLength : 0.0;
8672 gainCorrectionValue = 0.0;
8674 for (
int n = 0; n < windowLength; n++)
8676 if (window == windowType::kRectWindow)
8678 if (n >= 1 && n <= windowLength - 1)
8679 windowBuffer[n] = 1.0;
8681 else if (window == windowType::kHammingWindow)
8683 windowBuffer[n] = 0.54 - 0.46*cos((n*2.0*
kPi) / (windowLength));
8685 else if (window == windowType::kHannWindow)
8687 windowBuffer[n] = 0.5 * (1 - cos((n*2.0*
kPi) / (windowLength)));
8689 else if (window == windowType::kBlackmanHarrisWindow)
8691 windowBuffer[n] = (0.42323 - (0.49755*cos((n*2.0*
kPi) / (windowLength))) + 0.07922*cos((2 * n*2.0*
kPi) / (windowLength)));
8693 else if (window == windowType::kNoWindow)
8695 windowBuffer[n] = 1.0;
8698 gainCorrectionValue += windowBuffer[n];
8702 if (window != windowType::kNoWindow)
8703 gainCorrectionValue = (1.0 - overlap) / gainCorrectionValue;
8705 gainCorrectionValue = 1.0 / gainCorrectionValue;
8707 return windowBuffer;
8749 fftw_complex*
doFFT(
double* inputReal,
double* inputImag =
nullptr);
8752 fftw_complex*
doInverseFFT(
double* inputReal,
double* inputImag);
8828 void doOverlapAdd(
double* outputData =
nullptr,
int length = 0);
8960 if (!irBuffer)
return;
8978 for (
int i = 0; i < 2; i++)
8990 bool fftReady =
false;
8991 double output = 0.0;
9016 signalFFT[i][0] = product.
real;
9017 signalFFT[i][1] = product.
imag;
9049 const unsigned int PSM_FFT_LEN = 4096;
9070 if (
this == ¶ms)
9124 if (
this == ¶ms)
9173 memset(&
phi[0], 0,
sizeof(
double)*PSM_FFT_LEN);
9174 memset(&
psi[0], 0,
sizeof(
double)* PSM_FFT_LEN);
9178 for (
int i = 0; i < PSM_FFT_LEN; i++)
9197 double newAlpha = pow(2.0, semitones / 12.0);
9198 double newOutputBufferLength = round((1.0/newAlpha)*(
double)PSM_FFT_LEN);
9235 int previousPeak = -1;
9236 for (
int i = 0; i < PSM_FFT_LEN; i++)
9242 if (dist > PSM_FFT_LEN/4)
9250 else if (dist < delta)
9257 return previousPeak;
9266 double localWindow[4] = { 0.0 };
9268 for (
int i = 0; i < PSM_FFT_LEN; i++)
9272 localWindow[0] = 0.0;
9273 localWindow[1] = 0.0;
9279 localWindow[0] = 0.0;
9284 else if (i == PSM_FFT_LEN - 1)
9288 localWindow[2] = 0.0;
9289 localWindow[3] = 0.0;
9291 else if (i == PSM_FFT_LEN - 2)
9296 localWindow[3] = 0.0;
9307 if (
binData[i].magnitude > 0.00001 &&
9308 binData[i].magnitude > localWindow[0]
9309 &&
binData[i].magnitude > localWindow[1]
9310 &&
binData[i].magnitude > localWindow[2]
9311 &&
binData[i].magnitude > localWindow[3])
9330 int midBoundary = (nextPeak - (double)bossPeakBin) / 2.0 + bossPeakBin;
9334 for (
int i = 0; i < PSM_FFT_LEN; i++)
9336 if (i <= bossPeakBin)
9340 else if (i < midBoundary)
9346 bossPeakBin = nextPeak;
9348 if (nextPeak > bossPeakBin)
9349 midBoundary = (nextPeak - (double)bossPeakBin) / 2.0 + bossPeakBin;
9351 midBoundary = PSM_FFT_LEN;
9367 bool fftReady =
false;
9368 double output = 0.0;
9382 for (
int i = 0; i < PSM_FFT_LEN; i++)
9399 for (
int i = 0; i < PSM_FFT_LEN; i++)
9407 double omega_k =
kTwoPi*i / PSM_FFT_LEN;
9411 double phaseDev = phi_k -
phi[i] - omega_k*
ha;
9423 if(
binData[i].previousPeakBin < 0)
9437 for (
int i = 0; i < PSM_FFT_LEN; i++)
9455 for (
int i = 0; i < PSM_FFT_LEN; i++)
9460 fftData[i][0] = mag_k*cos(
binData[i].updatedPhase);
9461 fftData[i][1] = mag_k*sin(
binData[i].updatedPhase);
9472 for (
int i = 0; i < PSM_FFT_LEN; i++)
9474 double mag_k =
getMagnitude(fftData[i][0], fftData[i][1]);
9475 double phi_k =
getPhase(fftData[i][0], fftData[i][1]);
9480 double omega_k =
kTwoPi*i / PSM_FFT_LEN;
9484 double phaseDev = phi_k -
phi[i] - omega_k*
ha;
9496 fftData[i][0] = mag_k*cos(
psi[i]);
9497 fftData[i][1] = mag_k*sin(
psi[i]);
9509 double ifft[PSM_FFT_LEN] = { 0.0 };
9510 for (
int i = 0; i < PSM_FFT_LEN; i++)
9511 ifft[i] = inv_fftData[i][0];
9553 const double hs = PSM_FFT_LEN / 4;
9554 double ha = PSM_FFT_LEN / 4;
9555 double phi[PSM_FFT_LEN] = { 0.0 };
9556 double psi[PSM_FFT_LEN] = { 0.0 };
9588 const unsigned int maxSamplingRatio = 4;
9601 if (ratio == rateConversionRatio::k2x)
9603 else if (ratio == rateConversionRatio::k4x || ratio == rateConversionRatio::k4x)
9624 if (sampleRate != 44100 && sampleRate != 48000)
return nullptr;
9627 if (ratio == rateConversionRatio::k2x)
9629 if (sampleRate == 44100)
9631 if (FIRLength == 128)
9632 return &LPF128_882[0];
9633 else if (FIRLength == 256)
9634 return &LPF256_882[0];
9635 else if (FIRLength == 512)
9636 return &LPF512_882[0];
9637 else if (FIRLength == 1024)
9638 return &LPF1024_882[0];
9640 if (sampleRate == 48000)
9642 if (FIRLength == 128)
9643 return &LPF128_96[0];
9644 else if (FIRLength == 256)
9645 return &LPF256_96[0];
9646 else if (FIRLength == 512)
9647 return &LPF512_96[0];
9648 else if (FIRLength == 1024)
9649 return &LPF1024_96[0];
9654 if (ratio == rateConversionRatio::k4x)
9656 if (sampleRate == 44100)
9658 if (FIRLength == 128)
9659 return &LPF128_1764[0];
9660 else if (FIRLength == 256)
9661 return &LPF256_1764[0];
9662 else if (FIRLength == 512)
9663 return &LPF512_1764[0];
9664 else if (FIRLength == 1024)
9665 return &LPF1024_1764[0];
9667 if (sampleRate == 48000)
9669 if (FIRLength == 128)
9670 return &LPF128_192[0];
9671 else if (FIRLength == 256)
9672 return &LPF256_192[0];
9673 else if (FIRLength == 512)
9674 return &LPF512_192[0];
9675 else if (FIRLength == 1024)
9676 return &LPF1024_192[0];
9694 inline double**
decomposeFilter(
double* filterIR,
unsigned int FIRLength,
unsigned int ratio)
9696 unsigned int subBandLength = FIRLength / ratio;
9697 double ** polyFilterSet =
new double*[ratio];
9698 for (
unsigned int i = 0; i < ratio; i++)
9700 double* polyFilter =
new double[subBandLength];
9701 polyFilterSet[i] = polyFilter;
9705 for (
int i = 0; i < subBandLength; i++)
9707 for (
int j = ratio - 1; j >= 0; j--)
9709 double* polyFilter = polyFilterSet[j];
9710 polyFilter[i] = filterIR[m++];
9714 return polyFilterSet;
9773 unsigned int subBandLength =
FIRLength / count;
9780 if (!filterTable)
return;
9787 if (!polyPhaseFilters)
9794 for (
unsigned int i = 0; i < count; i++)
9798 delete[] polyPhaseFilters[i];
9801 delete[] polyPhaseFilters;
9811 output.
count = count;
9814 double ampCorrection = double(count);
9818 for (
unsigned int i = 0; i < count; i++)
9898 unsigned int subBandLength =
FIRLength / count;
9905 if (!filterTable)
return;
9912 if (!polyPhaseFilters)
9919 for (
unsigned int i = 0; i < count; i++)
9923 delete[] polyPhaseFilters[i];
9926 delete[] polyPhaseFilters;
9935 double output = 0.0;
9938 for (
unsigned int i = 0; i < count; i++)
virtual void setComponentValue_RC(double _componentValue_R, double _componentValue_C)
Definition: fxobjects.h:6822
DFOscillatorStates
Use this non-typed enum to easily access the direct form oscillator state registers.
Definition: fxobjects.h:3130
rateConversionRatio ratio
conversion ration
Definition: fxobjects.h:9955
EnvelopeFollowerParameters parameters
object parameters
Definition: fxobjects.h:5520
virtual void setComponentValue_RL(double _componentValue_R, double _componentValue_L)
Definition: fxobjects.h:6699
virtual double getOutput()
Definition: fxobjects.h:6180
double componentValue_L
component value L
Definition: fxobjects.h:6641
double preDelayTime_mSec
pre-delay time in mSec
Definition: fxobjects.h:4698
Custom parameter structure for the LFO and DFOscillator objects.
Definition: fxobjects.h:2954
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6118
unsigned int getFrameLength()
Definition: fxobjects.h:9034
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1552
double attackTime_mSec
attack mSec
Definition: fxobjects.h:2019
unsigned int stopBin
ending bin for transition band
Definition: fxobjects.h:608
Custom parameter structure for the ModulatedDelay object.
Definition: fxobjects.h:3281
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5780
void createWDF()
Definition: fxobjects.h:8570
SimpleDelay delay
delay
Definition: fxobjects.h:4295
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8538
void setImpulseResponse(double *irArray, unsigned int lengthPowerOfTwo)
Definition: fxobjects.h:2465
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5850
bool frequencyWarping
enable frequency warping
Definition: fxobjects.h:8148
unsigned int getFilterIRLength()
Definition: fxobjects.h:9037
AudioDetectorParameters getParameters()
Definition: fxobjects.h:1908
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:640
virtual double getComponentConductance()
Definition: fxobjects.h:6075
void setParameters(const ReverbTankParameters ¶ms)
Definition: fxobjects.h:4879
fftw_complex * fft_result
array for FFT output
Definition: fxobjects.h:8847
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6361
The WdfAdaptorBase object acts as the base class for all WDF Adaptors; the static members allow for s...
Definition: fxobjects.h:7101
double f_High
brickwall f_high
Definition: fxobjects.h:571
virtual double getComponentResistance()
Definition: fxobjects.h:6234
virtual double getOutput1()
Definition: fxobjects.h:6619
virtual double getOutput2()
Definition: fxobjects.h:6186
vaFilterAlgorithm
Use this strongly typed enum to easily set the virtual analog filter algorithm.
Definition: fxobjects.h:5083
double windowCorrection
window correction value
Definition: fxobjects.h:9567
virtual double getOutput3()
Definition: fxobjects.h:6871
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4253
virtual double getOutput3()
Definition: fxobjects.h:6383
void setParameters(const SimpleDelayParameters ¶ms)
Definition: fxobjects.h:3858
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:8664
double zRegister_L
storage register for L
Definition: fxobjects.h:6760
TwoBandShelvingFilterParameters & operator=(const TwoBandShelvingFilterParameters ¶ms)
Definition: fxobjects.h:4519
PSMVocoderParameters parameters
object parameters
Definition: fxobjects.h:9548
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6202
virtual void setInput(double in)
Definition: fxobjects.h:6853
SimpleLPFParameters & operator=(const SimpleLPFParameters ¶ms)
Definition: fxobjects.h:3687
void setBeta(double _beta)
Definition: fxobjects.h:5331
void writeBuffer(unsigned int index, T input)
Definition: fxobjects.h:2256
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2428
virtual void setInput3(double _in3)
Definition: fxobjects.h:6277
bool detect_dB
detect in dB DEFAULT = false (linear NOT log)
Definition: fxobjects.h:1809
void initialize(unsigned int _FIRLength, rateConversionRatio _ratio, unsigned int _sampleRate, bool _polyphase=true)
Definition: fxobjects.h:9766
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6243
double RL
RL value.
Definition: fxobjects.h:7013
AudioFilterParameters & operator=(const AudioFilterParameters ¶ms)
Definition: fxobjects.h:1488
virtual void setInput3(double _in3)
Definition: fxobjects.h:7694
double L
value of L component
Definition: fxobjects.h:7083
void setOpenTerminalResistance(bool _openTerminalResistance=true)
Definition: fxobjects.h:7114
double processAudioSample(double input)
Definition: fxobjects.h:8988
double audioData[maxSamplingRatio]
array of interpolated output samples
Definition: fxobjects.h:9731
wdfComponent componentType
selected component type
Definition: fxobjects.h:7085
bool interpolate
interpolate flag (diagnostics)
Definition: fxobjects.h:4146
fftw_complex * filterFFT
filterFFT output arrays
Definition: fxobjects.h:9042
Custom parameter structure for the LRFilterBank object which splits the input signal into multiple ba...
Definition: fxobjects.h:1642
unsigned int inputWriteIndex
circular buffer index: input write
Definition: fxobjects.h:8860
virtual double getOutput3()
Definition: fxobjects.h:6106
Custom parameter structure for the PhaseShifter object.
Definition: fxobjects.h:3473
AudioFilter apf[PHASER_STAGES]
six APF objects
Definition: fxobjects.h:3668
double sensitivity
detector sensitivity
Definition: fxobjects.h:5391
double RR
RR value.
Definition: fxobjects.h:6769
void setParameters(const DynamicsProcessorParameters &_parameters)
Definition: fxobjects.h:2087
Structure to hold a complex value.
Definition: fxobjects.h:469
double highShelfBoostCut_dB
high shelf gain
Definition: fxobjects.h:4535
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6707
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6771
double readDelay()
Definition: fxobjects.h:3904
double sampleRate
sample rate
Definition: fxobjects.h:3037
ModulatedDelayParameters getParameters()
Definition: fxobjects.h:3431
virtual double getComponentValue_R()
Definition: fxobjects.h:6724
generatorWaveform
Use this strongly typed enum to easily set the oscillator waveform.
Definition: fxobjects.h:2941
InterpolatorOutput interpolateAudio(double xn)
Definition: fxobjects.h:9805
void setParameters(AudioDelayParameters _parameters)
Definition: fxobjects.h:2856
double lowShelfBoostCut_dB
low shelf gain
Definition: fxobjects.h:4703
ZVAFilter filter
filter to modulate
Definition: fxobjects.h:5523
virtual double getComponentResistance()
Definition: fxobjects.h:6152
void setParameters(ModulatedDelayParameters _parameters)
Definition: fxobjects.h:3437
filterAlgorithm
Use this strongly typed enum to easily set the filter algorithm for the AudioFilter object or any oth...
Definition: fxobjects.h:1465
ClassATubePreParameters & operator=(const ClassATubePreParameters ¶ms)
Definition: fxobjects.h:5724
TriodeClassAParameters getParameters()
Definition: fxobjects.h:5642
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1178
double RL
RL value.
Definition: fxobjects.h:6890
virtual double getOutput1()
Definition: fxobjects.h:6742
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L2
adaptor for L2
Definition: fxobjects.h:7921
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6583
Custom parameter structure for the Biquad object. Default version defines the biquad structure used i...
Definition: fxobjects.h:1339
double fc
filter fc
Definition: fxobjects.h:5386
double componentValue_R
component value R
Definition: fxobjects.h:6887
virtual void setInput3(double _in3)
Definition: fxobjects.h:6198
double out2
stored port 2 output; it is y(n) for this library
Definition: fxobjects.h:7276
double Q
filter Q
Definition: fxobjects.h:1503
virtual void setInput3(double _in3)
Definition: fxobjects.h:7003
unsigned int getHopSize()
Definition: fxobjects.h:8834
double alphaStretchRatio
alpha stretch ratio = hs/ha
Definition: fxobjects.h:9550
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3763
double highShelfBoostCut_dB
high shelf gain
Definition: fxobjects.h:4705
virtual void setInput2(double _in2)
Definition: fxobjects.h:6274
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3572
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1696
reverbDensity
Use this strongly typed enum to easily set the density in the reverb object.
Definition: fxobjects.h:4642
double parabolicSine(double angle)
Definition: fxobjects.h:3094
WdfSeriesAdaptor seriesAdaptor_L1C1
adaptor for L1 and C1
Definition: fxobjects.h:8106
LFO lfo
the one and only LFO
Definition: fxobjects.h:3669
virtual void updateComponentResistance()
Definition: fxobjects.h:6813
double overlap
overlap as raw value (75% = 0.75)
Definition: fxobjects.h:8884
virtual double getOutput1()=0
double getS_value()
Definition: fxobjects.h:1435
The ImpulseConvolver object implements a linear conovlver. NOTE: compile in Release mode or you may e...
Definition: fxobjects.h:2407
double alpha
alpha is (wcT/2)
Definition: fxobjects.h:5345
virtual void updateComponentResistance()
Definition: fxobjects.h:6566
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:2769
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8309
The DelayAPF object implements a delaying APF with optional LPF and optional modulated delay time wit...
Definition: fxobjects.h:4171
bool invertOutput
invertOutput - triodes invert output
Definition: fxobjects.h:5585
The WdfSeriesRL object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6541
T readBuffer(unsigned int index)
Definition: fxobjects.h:2265
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5015
unsigned int wrapMask
input wrap mask
Definition: fxobjects.h:8864
double sampleRate
sample rate storage
Definition: fxobjects.h:8390
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:1228
virtual double getOutput2()=0
double highShelf_fc
HSF shelf frequency.
Definition: fxobjects.h:5751
virtual double getOutput2()
Definition: fxobjects.h:6868
double tanhWaveShaper(double xn, double saturation)
calculates hyptan waveshaper
Definition: fxobjects.h:397
void setParameters(const ClassATubePreParameters ¶ms)
Definition: fxobjects.h:5814
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_L
adaptor for L
Definition: fxobjects.h:8388
bool enablePeakTracking
flag to enable peak tracking
Definition: fxobjects.h:9137
The LFO object implements a mathematically perfect LFO generator for modulation uses only...
Definition: fxobjects.h:2991
virtual double getOutput2()
Definition: fxobjects.h:7700
virtual void updateComponentResistance()
Definition: fxobjects.h:6689
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1389
double saturation
input level in dB
Definition: fxobjects.h:5744
dynamicsProcessorType
Use this strongly typed enum to set the dynamics processor type.
Definition: fxobjects.h:1972
virtual const SignalGenData renderAudioOutput()=0
double delayTime_mSec
delay time in mSec
Definition: fxobjects.h:3976
virtual void setInput(double in)
Definition: fxobjects.h:6976
double QL
the quantization level
Definition: fxobjects.h:5961
The PeakLimiter object implements a simple peak limiter; it is really a simplified and hard-wired ver...
Definition: fxobjects.h:4984
WdfSeriesAdaptor seriesAdaptor_RC
adaptor for RC
Definition: fxobjects.h:8387
double fc
filter fc
Definition: fxobjects.h:2523
double sampleRate
sample rate
Definition: fxobjects.h:6524
virtual double getComponentResistance()
Definition: fxobjects.h:6930
double boostCut_dB
filter gain; note not used in all types
Definition: fxobjects.h:1504
const double hs
hs = N/4 — 75% overlap
Definition: fxobjects.h:9553
The EnvelopeFollower object implements a traditional envelope follower effect modulating a LPR fc val...
Definition: fxobjects.h:5412
virtual void setInput1(double _in1)
Definition: fxobjects.h:6271
virtual double getOutput3()
Definition: fxobjects.h:7703
double inputLevel_dB
input level in dB
Definition: fxobjects.h:5743
double sampleRate
stored sample rate
Definition: fxobjects.h:1944
fftw_complex * getIFFTData()
Definition: fxobjects.h:8822
double lpf_g
LPF g coefficient.
Definition: fxobjects.h:4699
void setParameters(const TwoBandShelvingFilterParameters ¶ms)
Definition: fxobjects.h:4609
double zRegister_L
storage register for L
Definition: fxobjects.h:6637
double magnitude
bin magnitude angle
Definition: fxobjects.h:9099
void setParameters(const AudioDetectorParameters ¶meters)
Definition: fxobjects.h:1917
virtual double getComponentValue_R()
Definition: fxobjects.h:6844
virtual void updateComponentResistance()
Definition: fxobjects.h:6936
double lpf_state
LPF state register (z^-1)
Definition: fxobjects.h:4301
void flushBuffer()
Definition: fxobjects.h:2301
virtual double processAudioSample(double xn)
Definition: fxobjects.h:7977
void destroyFFTW()
destroys the FFTW arrays and plans.
Definition: fxobjects.cpp:1028
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1839
virtual double getComponentConductance()
Definition: fxobjects.h:6322
double zRegister_C
storage register for C
Definition: fxobjects.h:7007
double dB2Raw(double dB)
converts dB to raw value
Definition: fxobjects.h:282
void setParameters(const PhaseShifterParameters ¶ms)
Definition: fxobjects.h:3653
virtual double processAuxInputAudioSample(double xn)
Definition: fxobjects.h:1185
double componentValue_L
component value L
Definition: fxobjects.h:6764
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4025
void setParameters(const PSMVocoderParameters ¶ms)
Definition: fxobjects.h:9536
virtual void setInput(double in)
Definition: fxobjects.h:6177
double RC
RC value.
Definition: fxobjects.h:6768
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6960
double RL
RL value.
Definition: fxobjects.h:6767
double RC
RC value.
Definition: fxobjects.h:6645
The WdfSeriesTerminatedAdaptor object implements the series terminated (non-reflection-free) adaptor...
Definition: fxobjects.h:7406
AudioDetector detector
detector to track input signal
Definition: fxobjects.h:5524
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5438
double componentValue_C
component value C
Definition: fxobjects.h:6888
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7851
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8600
Custom parameter structure calculating analog magnitude response arrays with calculateAnalogMagArray(...
Definition: fxobjects.h:834
bool advanceAndCheckWrapModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3065
biquadAlgorithm biquadCalcType
biquad structure to use
Definition: fxobjects.h:1353
virtual double getOutput3()
Definition: fxobjects.h:6268
WdfParallelAdaptor parallelAdaptor_C1
adaptor for C1
Definition: fxobjects.h:7920
void createWDF()
Definition: fxobjects.h:8077
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8316
unsigned int countForRatio(rateConversionRatio ratio)
returns the up or downsample ratio as a numeric value
Definition: fxobjects.h:9599
WDFParameters getParameters()
Definition: fxobjects.h:8232
The WdfParallelTerminatedAdaptor object implements the parallel terminated (non-reflection-free) adap...
Definition: fxobjects.h:7618
The WDFConstKBPF6 object implements a 6th order constant K BPF NOTE: designed with Elsie www...
Definition: fxobjects.h:8033
fftw_plan plan_backward
FFTW plan for IFFT.
Definition: fxobjects.h:8850
double beta
beta value, not used
Definition: fxobjects.h:5348
double storageComponent
Definition: fxobjects.h:1448
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6227
virtual double getComponentConductance()
Definition: fxobjects.h:6810
double getS_value()
Definition: fxobjects.h:1587
double gainReduction
output value for gain reduction that occurred
Definition: fxobjects.h:2024
double asymmetry
input level in dB
Definition: fxobjects.h:5745
double out1
stored port 1 output; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7275
double lfoDepth
LFO deoth (not in %) if enabled.
Definition: fxobjects.h:4149
const double kTwoPi
2pi to 80 decimal places
Definition: guiconstants.h:173
void createWDF()
Definition: fxobjects.h:8449
Custom parameter structure for the AudioDetector object. NOTE: this object uses constant defintions: ...
Definition: fxobjects.h:1789
virtual double getComponentConductance()
Definition: fxobjects.h:6155
double threshold_dB
threshold in dB
Definition: fxobjects.h:2013
The Biquad object implements a first or second order H(z) transfer function using one of four standar...
Definition: fxobjects.h:1373
double apf_g
APF g coefficient.
Definition: fxobjects.h:4143
bool enableLPF
enable LPF flag
Definition: fxobjects.h:3978
virtual void setInput2(double _in2)
Definition: fxobjects.h:6389
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6800
double f_Low
brickwall f_low
Definition: fxobjects.h:570
virtual void setInput2(double _in2)
Definition: fxobjects.h:7000
double doWhiteNoise()
calculates a random value between -1.0 and +1.0
Definition: fxobjects.h:324
ZVAFilterParameters zvaFilterParameters
object parameters
Definition: fxobjects.h:5337
virtual void setInput1(double _in1)=0
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6923
double fc
filter cutoff or center frequency (Hz)
Definition: fxobjects.h:1502
virtual void setInput2(double _in2)
Definition: fxobjects.h:6112
void createWDF()
Definition: fxobjects.h:7795
virtual void setInput2(double _in2)
Definition: fxobjects.h:6754
unsigned int getFrameLength()
Definition: fxobjects.h:8831
virtual void setInput2(double _in2)
Definition: fxobjects.h:7356
double zRegister_C
storage register for C
Definition: fxobjects.h:6884
virtual double getOutput3()
Definition: fxobjects.h:7598
virtual void reset(double _sampleRate)
Definition: fxobjects.h:7134
virtual double getOutput3()
Definition: fxobjects.h:7386
bool quadPhaseLFO
quad phase LFO flag
Definition: fxobjects.h:3493
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8430
double saturation
saturation level
Definition: fxobjects.h:5581
void setPort2_CompAdaptor(IComponentAdaptor *_port2CompAdaptor)
Definition: fxobjects.h:7128
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4380
fftw_complex * ifft_input
array for IFFT input
Definition: fxobjects.h:8761
CircularBuffer< double > signalBuffer
circulat buffer for the signal
Definition: fxobjects.h:2484
virtual double getComponentValue()
Definition: fxobjects.h:6158
double delayRatio_Pct
dela ratio: right length = (delayRatio)*(left length)
Definition: fxobjects.h:2698
virtual void setComponentValue_RC(double componentValue_R, double componentValue_C)
Definition: fxobjects.h:6036
double R2
output port resistance
Definition: fxobjects.h:7263
The WdfCapacitor object implements the reflection coefficient and signal flow through a WDF simulated...
Definition: fxobjects.h:6137
virtual void setInput3(double _in3)
Definition: fxobjects.h:6880
The AudioDelay object implements a stereo audio delay with multiple delay algorithms.
Definition: fxobjects.h:2718
double attackTime
attack time coefficient
Definition: fxobjects.h:1942
virtual double getR2()
Definition: fxobjects.h:7625
double zRegister_C
storage register for C
Definition: fxobjects.h:6516
double lfoRate_Hz
mod delay LFO rate in Hz
Definition: fxobjects.h:3299
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1542
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2065
double threshold_dB
detector threshold in dB
Definition: fxobjects.h:5390
TwoBandShelvingFilterParameters getParameters()
Definition: fxobjects.h:4600
double in2
stored port 2 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7269
double rightDelay_mSec
right delay time
Definition: fxobjects.h:2697
bool interpolate
interpolation flag (diagnostics)
Definition: fxobjects.h:3980
bool enableHPF
HPF simulates DC blocking cap on output.
Definition: fxobjects.h:5586
double getPhase(double re, double im)
calculates phase of a complex numb er
Definition: fxobjects.h:1019
virtual void setComponentValue_LC(double componentValue_L, double componentValue_C)
Definition: fxobjects.h:7224
double sampleRate
sample rate
Definition: fxobjects.h:6121
double sampleRate
sample rate
Definition: fxobjects.h:6283
void createDelayBuffers(double _sampleRate, double delay_mSec, double nestedAPFDelay_mSec)
Definition: fxobjects.h:4490
double * getStateArray()
Definition: fxobjects.h:1425
WdfSeriesAdaptor seriesAdaptor_LC
adaptor for LC
Definition: fxobjects.h:8507
AnalogFIRFilterParameters & operator=(const AnalogFIRFilterParameters ¶ms)
Definition: fxobjects.h:2509
ReverbTankParameters & operator=(const ReverbTankParameters ¶ms)
Definition: fxobjects.h:4659
fftw_plan plan_forward
FFTW plan for FFT.
Definition: fxobjects.h:8763
AudioDetectorParameters audioDetectorParameters
parameters for object
Definition: fxobjects.h:1941
AudioFilter hpFilter
high-band filter
Definition: fxobjects.h:1761
virtual double getOutput3()
Definition: fxobjects.h:7488
The ReverbTank object implements the cyclic reverb tank in the FX book listed below.
Definition: fxobjects.h:4732
double modCounter
modulo counter [0.0, +1.0]
Definition: fxobjects.h:3040
virtual double getComponentConductance()
Definition: fxobjects.h:6933
double zRegister_L
storage register for L
Definition: fxobjects.h:6883
WDFParameters getParameters()
Definition: fxobjects.h:8594
double LFOut
low frequency output sample
Definition: fxobjects.h:1622
DelayAPFParameters delayAPFParameters
obeject parameters
Definition: fxobjects.h:4290
virtual double processAudioSample(double xn)
Definition: fxobjects.h:1854
PSMVocoderParameters & operator=(const PSMVocoderParameters ¶ms)
Definition: fxobjects.h:9122
void createDelayBuffer(double _sampleRate, double delay_mSec)
Definition: fxobjects.h:4086
unsigned int fftCounter
FFT sample counter.
Definition: fxobjects.h:8880
double sampleRate
sample rate storage
Definition: fxobjects.h:8631
void createWDF()
Definition: fxobjects.h:8208
modDelaylgorithm
Use this strongly typed enum to easily set modulated delay algorithm.
Definition: fxobjects.h:3267
double feedback_Pct
feedback as a % value
Definition: fxobjects.h:2693
virtual double getOutput()
Definition: fxobjects.h:6259
void setParameters(const OscillatorParameters ¶ms)
Definition: fxobjects.h:3179
unsigned int inputReadIndex
circular buffer index: input read
Definition: fxobjects.h:8862
unsigned int frameLength
current FFT length
Definition: fxobjects.h:8769
unsigned int hopSize
hop: ha = hs
Definition: fxobjects.h:8883
double componentValue_R
component value R
Definition: fxobjects.h:6642
The DynamicsProcessor object implements a dynamics processor suite: compressor, limiter, downward expander, gate.
Definition: fxobjects.h:2045
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6201
double sidechainInputSample
storage for sidechain sample
Definition: fxobjects.h:2133
double RC
RC value.
Definition: fxobjects.h:6522
void setTerminalResistance(double _terminalResistance)
Definition: fxobjects.h:7111
Custom parameter structure for the ClassATubePre object.
Definition: fxobjects.h:5720
AudioDetectorParameters & operator=(const AudioDetectorParameters ¶ms)
Definition: fxobjects.h:1793
virtual double getOutput()
Definition: fxobjects.h:6374
DFOscillatorCoeffs
Use this non-typed enum to easily access the direct form oscillator coefficients. ...
Definition: fxobjects.h:3115
IComponentAdaptor * getPort1_CompAdaptor()
Definition: fxobjects.h:7245
The CombFilter object implements a comb filter with optional LPF in feedback loop. Used for reverb algorithms in book.
Definition: fxobjects.h:4001
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6461
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5629
bool enableLSF
LSF simulates shelf due to cathode self biasing.
Definition: fxobjects.h:5587
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:6727
virtual void initialize(double _R1)
Definition: fxobjects.h:7637
void advanceModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3088
DynamicsProcessorParameters getParameters()
Definition: fxobjects.h:2081
virtual double getComponentValue_C()
Definition: fxobjects.h:6358
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4739
double fuzzExp1WaveShaper(double xn, double saturation, double asymmetry)
calculates fuzz exp1 waveshaper
Definition: fxobjects.h:427
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7970
static void connectAdaptors(WdfAdaptorBase *upstreamAdaptor, WdfAdaptorBase *downstreamAdaptor)
Definition: fxobjects.h:7204
Custom parameter structure for the NestedDelayAPF object. Used for reverb algorithms in book...
Definition: fxobjects.h:4316
LRFilterBankParameters parameters
parameters for the object
Definition: fxobjects.h:1764
virtual double processAuxInputAudioSample(double xn)
Definition: fxobjects.h:2071
virtual double processAudioSample(double xn)
Definition: fxobjects.h:7785
double processAudioSample(double input, bool &fftReady)
process one input sample throug the vocoder to produce one output sample
Definition: fxobjects.cpp:1453
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4991
virtual void setInput3(double _in3)
Definition: fxobjects.h:7589
double lfoDepth_Pct
mod delay LFO depth in %
Definition: fxobjects.h:3300
unsigned int length
length of convolution (buffer)
Definition: fxobjects.h:2487
void setParameters(const OscillatorParameters ¶ms)
Definition: fxobjects.h:3020
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4009
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2053
virtual void setInput(double in)
Definition: fxobjects.h:6484
void createLinearBuffer(unsigned int _bufferLength)
Definition: fxobjects.h:2243
The AudioFilter object implements all filters in Designing Audio Effects Plugins in C++ 2nd Ed...
Definition: fxobjects.h:1524
double HFOut
high frequency output sample
Definition: fxobjects.h:1623
double terminalResistance
value of terminal (load) resistance
Definition: fxobjects.h:7280
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6341
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3350
dynamicsProcessorType calculation
processor calculation type
Definition: fxobjects.h:2018
void reset()
Definition: fxobjects.h:9086
WdfSeriesAdaptor seriesAdaptor_L5C5
adaptor for L5 and C5
Definition: fxobjects.h:8112
PhaseShifterParameters parameters
the object parameters
Definition: fxobjects.h:3667
double lfoRate_Hz
LFO rate in Hz (if enabled)
Definition: fxobjects.h:4347
delayUpdateType updateType
update algorithm
Definition: fxobjects.h:2695
virtual void setComponentValue_RL(double componentValue_R, double componentValue_L)
Definition: fxobjects.h:6033
TwoBandShelvingFilter shelvingFilter
shelving filters
Definition: fxobjects.h:5866
virtual void initialize(double _R1)
Definition: fxobjects.h:7424
bool needInverseFFT
internal flag to signal IFFT required
Definition: fxobjects.h:8872
double stateArray[numDFOStates]
array of state registers
Definition: fxobjects.h:3246
virtual double getOutput()
Definition: fxobjects.h:6609
virtual void setInput1(double _in1)
Definition: fxobjects.h:7445
void initialize(unsigned int _FIRLength, rateConversionRatio _ratio, unsigned int _sampleRate, bool _polyphase=true)
Definition: fxobjects.h:9891
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6830
unsigned int outputReadIndex
circular buffer index: output read
Definition: fxobjects.h:8863
Custom structure that holds transition band information for FIR filter calculations.
Definition: fxobjects.h:602
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8065
double filterOutputGain_dB
va filter gain (normally unused)
Definition: fxobjects.h:5123
bool openTerminalResistance
flag for open circuit load
Definition: fxobjects.h:7281
void setParameters(const CombFilterParameters ¶ms)
Definition: fxobjects.h:4066
WdfSeriesAdaptor seriesAdaptor_RL
adaptor for series RL
Definition: fxobjects.h:8265
WdfSeriesAdaptor seriesAdaptor_L3C3
adaptor for L3 and C3
Definition: fxobjects.h:8109
double sampleRate
current sample rate
Definition: fxobjects.h:1598
double componentValue_C
component value C
Definition: fxobjects.h:6519
virtual void enableAuxInput(bool enableAuxInput)
Definition: fxobjects.h:2068
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:7765
biquadAlgorithm
Use this strongly typed enum to easily set the biquad calculation type.
Definition: fxobjects.h:1325
bool useFrequencyWarping
flag for freq warping
Definition: fxobjects.h:7927
virtual void setInput3(double _in3)=0
rateConversionRatio ratio
conversion ration
Definition: fxobjects.h:9835
ZVAFilterParameters getParameters()
Definition: fxobjects.h:5167
double sampleRate
sample rate
Definition: fxobjects.h:6204
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4587
void writeBuffer(T input)
Definition: fxobjects.h:2332
fftw_complex * fft_result
array for FFT output
Definition: fxobjects.h:8760
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:5937
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3330
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6590
double intensity_Pct
phaser feedback in %
Definition: fxobjects.h:3492
void setParameters(const EnvelopeFollowerParameters ¶ms)
Definition: fxobjects.h:5455
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6065
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:1241
double RR
RR value.
Definition: fxobjects.h:6892
OscillatorParameters getParameters()
Definition: fxobjects.h:3170
double frequency_Hz
oscillator frequency
Definition: fxobjects.h:2970
void setAttackTime(double attack_in_ms, bool forceCalc=false)
sets the new attack time and re-calculates the time constant
Definition: fxobjects.cpp:935
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3754
vaFilterAlgorithm filterAlgorithm
va filter algorithm
Definition: fxobjects.h:5120
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8040
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:6762
modDelaylgorithm algorithm
mod delay algorithm
Definition: fxobjects.h:3298
double sgn(double xn)
calculates sgn( ) of input
Definition: fxobjects.h:353
double componentValue_C
component value C
Definition: fxobjects.h:7010
double threshold_dB
stored threshold (dB)
Definition: fxobjects.h:5065
virtual double getComponentResistance()
Definition: fxobjects.h:6018
WdfParallelAdaptor parallelAdaptor_L4C4
adaptor for L4 and C4
Definition: fxobjects.h:8110
The WdfParallelLC object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6420
TriodeClassA triodes[NUM_TUBES]
array of triode tube objects
Definition: fxobjects.h:5865
double hpf_Fc
fc of DC blocking cap
Definition: fxobjects.h:5589
void findPeaksAndRegionsOfInfluence()
Definition: fxobjects.h:9261
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:8147
virtual double getR2()
Definition: fxobjects.h:7515
int findPreviousNearestPeak(int peakIndex)
Definition: fxobjects.h:9229
const uint32_t ENVELOPE_DETECT_MODE_PEAK
|x|
Definition: guiconstants.h:181
virtual double processAudioSample(double xn)
process one sample through the biquad
Definition: fxobjects.cpp:38
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5843
double splitFrequency
LF/HF split frequency.
Definition: fxobjects.h:1655
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8558
double delayTime_mSec
delay tine in mSec
Definition: fxobjects.h:3797
Biquad biquad
the biquad object
Definition: fxobjects.h:1591
The AudioDetector object implements the audio detector defined in the book source below...
Definition: fxobjects.h:1831
double windowGainCorrection
window gain correction
Definition: fxobjects.h:8767
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6280
AudioFilterParameters audioFilterParameters
parameters
Definition: fxobjects.h:1597
The WdfParallelRC object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6911
virtual double getComponentValue()
Definition: fxobjects.h:6039
AudioFilter outputHPF
HPF to simulate output DC blocking cap.
Definition: fxobjects.h:5703
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4396
double attackTime_mSec
attack time in milliseconds
Definition: fxobjects.h:1806
Custom parameter structure for the WDF filter examples.
Definition: fxobjects.h:8128
virtual void setInput1(double _in1)
Definition: fxobjects.h:6506
double outerAPFdelayTime_mSec
delay time for outer APF
Definition: fxobjects.h:4340
double in1
stored port 1 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7268
virtual void setInput2(double _in2)
Definition: fxobjects.h:6509
double componentValue_R
component value R
Definition: fxobjects.h:7011
double sampleRate
current sample rate
Definition: fxobjects.h:4291
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4767
double RC
RC value.
Definition: fxobjects.h:6891
double kneeWidth_dB
knee width in dB for soft-knee operation
Definition: fxobjects.h:2014
double zRegister_L
storage register for L
Definition: fxobjects.h:6395
virtual double getOutput()
Definition: fxobjects.h:5993
The WDFButterLPF3 object implements a 3rd order Butterworth ladder filter. NOTE: designed with Elsie ...
Definition: fxobjects.h:7758
virtual double getOutput2()
Definition: fxobjects.h:6265
DelayAPFParameters getParameters()
Definition: fxobjects.h:4259
The FastConvolver provides a fast convolver - the user supplies the filter IR and the object snapshot...
Definition: fxobjects.h:8911
virtual void setInput1(double _in1)
Definition: fxobjects.h:6997
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6174
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8058
double lowShelf_fc
low shelf fc
Definition: fxobjects.h:4702
double getG_value()
Definition: fxobjects.h:1432
distortionModel waveshaper
waveshaper
Definition: fxobjects.h:5579
double getOverlap()
Definition: fxobjects.h:8837
bool needOverlapAdd
internal flag to signal overlap/add required
Definition: fxobjects.h:8873
double fixeDelayMax_mSec
fixed delay max time
Definition: fxobjects.h:4694
The WDFIdealRLCBSF object implements an ideal RLC BSF using the WDF library.
Definition: fxobjects.h:8531
virtual void setInput(double in)
Definition: fxobjects.h:6730
void setParameters(const SimpleLPFParameters ¶ms)
Definition: fxobjects.h:3744
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_R
adaptor for R
Definition: fxobjects.h:8508
virtual double getOutput1()
Definition: fxobjects.h:7482
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2726
Custom structure to hold component information.
Definition: fxobjects.h:7052
virtual double getOutput1()
Definition: fxobjects.h:6100
double real
real part
Definition: fxobjects.h:478
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_C
adaptopr for parallel C
Definition: fxobjects.h:8266
void updateDFO()
Definition: fxobjects.h:3206
double rho
p = 2R + g (feedback)
Definition: fxobjects.h:5346
double gainReduction_dB
output value for gain reduction that occurred in dB
Definition: fxobjects.h:2025
double delayTime_mSec
APF delay time.
Definition: fxobjects.h:4142
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6603
virtual double getComponentConductance()
Definition: fxobjects.h:6442
LRFilterBankParameters getParameters()
Definition: fxobjects.h:1735
The WDFIdealRLCBPF object implements an ideal RLC BPF using the WDF library.
Definition: fxobjects.h:8410
double componentValue_L
component value L
Definition: fxobjects.h:6398
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5195
double releaseTime_mSec
detector release time
Definition: fxobjects.h:5389
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6973
void setFilterFc(double fc_Hz)
Definition: fxobjects.h:7904
virtual double getOutput1()
Definition: fxobjects.h:6183
BiquadParameters parameters
Definition: fxobjects.h:1445
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3870
AudioDetector detector
the detector object
Definition: fxobjects.h:5064
double lfoDepth
LFO depth (not in %) (if enabled)
Definition: fxobjects.h:4348
BiquadParameters getParameters()
Definition: fxobjects.h:1402
virtual double processAudioSample(double xn)
Definition: fxobjects.h:1711
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8504
double RT60Time_mSec
RT 60 time ini mSec.
Definition: fxobjects.h:3977
IComponentAdaptor * wdfComponent
WDF componant connected to port 3 (default operation)
Definition: fxobjects.h:7259
fftw_plan plan_forward
FFTW plan for FFT.
Definition: fxobjects.h:8849
double softClipWaveShaper(double xn, double saturation)
calculates hyptan waveshaper
Definition: fxobjects.h:411
Custom parameter structure for the ReverbTank object.
Definition: fxobjects.h:4655
double invertedOutput
inverted
Definition: fxobjects.h:1222
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6403
The Decimator object implements a sample rate decimator. Ana array of M input samples is decimated to...
Definition: fxobjects.h:9878
double computeGain(double detect_dB)
Definition: fxobjects.h:5021
virtual double getOutput1()
Definition: fxobjects.h:7697
virtual void setInput(double in)
Definition: fxobjects.h:6256
DynamicsProcessorParameters & operator=(const DynamicsProcessorParameters ¶ms)
Definition: fxobjects.h:1990
void setParameters(const TriodeClassAParameters ¶ms)
Definition: fxobjects.h:5648
double stateArray[numStates]
Definition: fxobjects.h:1442
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3829
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8437
virtual void setInput2(double _in2)
Definition: fxobjects.h:7691
double quantizedBitDepth
bid depth of quantizer
Definition: fxobjects.h:5898
const double kPi
pi to 80 decimal places
Definition: guiconstants.h:166
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6837
ZVAFilterParameters & operator=(const ZVAFilterParameters ¶ms)
Definition: fxobjects.h:5103
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:3362
void destroyFFTW()
destroys the FFTW arrays and plans.
Definition: fxobjects.cpp:1202
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4572
EnvelopeFollowerParameters getParameters()
Definition: fxobjects.h:5449
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7778
bool addZeroPad(unsigned int count)
zero pad the input timeline
Definition: fxobjects.cpp:1369
CombFilterParameters getParameters()
Definition: fxobjects.h:4057
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_LC
adaptor for parallel LC
Definition: fxobjects.h:8629
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6027
SimpleDelayParameters & operator=(const SimpleDelayParameters ¶ms)
Definition: fxobjects.h:3785
BitCrusherParameters parameters
object parameters
Definition: fxobjects.h:5960
virtual double getComponentResistance()
Definition: fxobjects.h:6560
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:2294
The PSMVocoder object implements a phase vocoder pitch shifter. Phase locking and peak tracking are o...
Definition: fxobjects.h:9158
double * getCoefficients()
Definition: fxobjects.h:1418
double highShelf_fc
fc for high shelf
Definition: fxobjects.h:4534
PhaseVocoder vocoder
vocoder object
Definition: fxobjects.h:9040
double Q
filter Q
Definition: fxobjects.h:5387
double integrator_z[2]
state variables
Definition: fxobjects.h:5341
double componentResistance
simulated resistance
Definition: fxobjects.h:6203
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6281
Custom structure that holds information about each FFT bin. This includes all information needed to p...
Definition: fxobjects.h:9064
virtual double getOutput()
Definition: fxobjects.h:6097
virtual void initialize(double _R1)
Definition: fxobjects.h:5984
virtual void setInput2(double _in2)=0
void setThreshold_dB(double _threshold_dB)
Definition: fxobjects.h:5058
virtual void setComponentValue_RL(double componentValue_R, double componentValue_L)
Definition: fxobjects.h:7231
double sampleRate
sample rate
Definition: fxobjects.h:6649
virtual double getComponentConductance()
Definition: fxobjects.h:6021
double getBeta()
Definition: fxobjects.h:5334
void setOverlapAddOnly(bool b)
Definition: fxobjects.h:8842
double lfoRate_Hz
phaser LFO rate in Hz
Definition: fxobjects.h:3490
virtual double processAudioSample(double xn)=0
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8175
IComponentAdaptor * port2CompAdaptor
componant or adaptor connected to port 2
Definition: fxobjects.h:7257
virtual void updateComponentResistance()
Definition: fxobjects.h:6088
void doInverseFFT()
perform the inverse FFT on the processed data
Definition: fxobjects.cpp:1493
Custom parameter structure for the SimpleLPFP object. Used for reverb algorithms in book...
Definition: fxobjects.h:3683
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6015
double fc
va filter fc
Definition: fxobjects.h:5121
double * outputBuff
buffer for resampled output
Definition: fxobjects.h:9566
virtual double getOutput2()
Definition: fxobjects.h:6622
The TriodeClassA object simulates a triode in class A configuration. This is a very simple and basic ...
Definition: fxobjects.h:5612
BiquadParameters & operator=(const BiquadParameters ¶ms)
Definition: fxobjects.h:1344
double RR
RR value.
Definition: fxobjects.h:7015
void createDelayBuffer(double _sampleRate, double delay_mSec)
Definition: fxobjects.h:4279
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6432
virtual void initializeAdaptorChain()
Definition: fxobjects.h:7211
Custom parameter structure for the DelayAPF object. Used for reverb algorithms in book...
Definition: fxobjects.h:4120
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8384
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3886
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7865
void setReleaseTime(double release_in_ms, bool forceCalc=false)
sets the new release time and re-calculates the time constant
Definition: fxobjects.cpp:951
void setMakeUpGain_dB(double _makeUpGain_dB)
Definition: fxobjects.h:5061
void setUsePostWarping(bool b)
Definition: fxobjects.h:7901
virtual void setInput1(double _in1)
Definition: fxobjects.h:7549
bool advanceAndCheckFFT()
advance the sample counter and check to see if we need to do the FFT.
Definition: fxobjects.cpp:1399
virtual void initialize(double _R1)
Definition: fxobjects.h:7316
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3554
virtual double getComponentValue_L()
Definition: fxobjects.h:6597
The WDFIdealRLCLPF object implements an ideal RLC LPF using the WDF library.
Definition: fxobjects.h:8168
The Interpolator object implements a sample rate interpolator. One input sample yields N output sampl...
Definition: fxobjects.h:9753
AudioDelayParameters getParameters()
Definition: fxobjects.h:2850
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6161
FastFFT filterFastFFT
FastFFT object.
Definition: fxobjects.h:9041
double attackTime_mSec
detector attack time
Definition: fxobjects.h:5388
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5671
double quadPhaseOutput_pos
90 degrees out
Definition: fxobjects.h:1223
double componentValue_C
component value C
Definition: fxobjects.h:6399
virtual void setInput(double in)
Definition: fxobjects.h:6094
double dryLevel_dB
dry output level in dB
Definition: fxobjects.h:4708
virtual double processAudioSample(double input)
Definition: fxobjects.h:9365
double sampleRate
stored sample rate
Definition: fxobjects.h:7928
SimpleDelayParameters getParameters()
Definition: fxobjects.h:3849
AudioDelayParameters & operator=(const AudioDelayParameters ¶ms)
Definition: fxobjects.h:2671
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4774
FastConvolver convolver
fast convolver
Definition: fxobjects.h:9950
virtual const SignalGenData renderAudioOutput()
generates the oscillator output for one sample interval; note that there are multiple outputs...
Definition: fxobjects.cpp:963
LRFilterBankParameters & operator=(const LRFilterBankParameters ¶ms)
Definition: fxobjects.h:1646
int peakBins[PSM_FFT_LEN]
array of current peak bin index values (-1 = not peak)
Definition: fxobjects.h:9562
AudioDetector detector
the sidechain audio detector
Definition: fxobjects.h:2130
double readDelayAtPercentage(double delayPercent)
Definition: fxobjects.h:3921
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6676
bool interpolate
interpolation flag (diagnostics usually)
Definition: fxobjects.h:3798
virtual double getComponentValue_R()
Definition: fxobjects.h:6600
AudioFilter outputLSF
LSF to simulate shelf caused by cathode self-biasing cap.
Definition: fxobjects.h:5704
virtual double processAudioSample(double xn)
process one sample through the audio filter
Definition: fxobjects.cpp:921
filterAlgorithm algorithm
filter algorithm
Definition: fxobjects.h:1501
double sampleRate
current sample rate
Definition: fxobjects.h:5338
Custom parameter structure for the CombFilter object. Used for reverb algorithms in book...
Definition: fxobjects.h:3958
bool polyphase
enable polyphase decomposition
Definition: fxobjects.h:9838
virtual void setInput1(double _in1)
Definition: fxobjects.h:6874
virtual void setInput3(double _in3)
Definition: fxobjects.h:7479
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3158
brickwallFilter
Use this strongly typed enum to easily set brickwall filter type for functions that need it...
Definition: fxobjects.h:544
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6468
virtual void setInput3(double _in3)
Definition: fxobjects.h:6115
Custom output structure for filter bank objects that split the inptu into multiple frequency channels...
Definition: fxobjects.h:1617
virtual void setInput1(double _in1)
Definition: fxobjects.h:7337
double computeGain(double detect_dB)
Definition: fxobjects.h:2136
void setFilterIR(double *irBuffer)
Definition: fxobjects.h:8958
AudioFilterParameters getParameters()
Definition: fxobjects.h:1559
virtual void updateComponentResistance()
Definition: fxobjects.h:6024
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:6515
void setParameters(const NestedDelayAPFParameters ¶ms)
Definition: fxobjects.h:4464
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:6745
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5486
The SimpleDelay object implements a basic delay line without feedback.
Definition: fxobjects.h:3821
double * windowBuffer
buffer for window (naked)
Definition: fxobjects.h:8766
generatorWaveform waveform
the current waveform
Definition: fxobjects.h:2969
virtual double getOutput()
Definition: fxobjects.h:6979
bool selfOscillate
enable selfOscillation
Definition: fxobjects.h:5126
analogFilter filterType
filter type
Definition: fxobjects.h:2522
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8551
double lowShelf_fc
fc for low shelf
Definition: fxobjects.h:4532
double innerAPFdelayTime_mSec
delay time for inner APF
Definition: fxobjects.h:4341
unsigned int FIRLength
FIR length.
Definition: fxobjects.h:9954
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:5591
double coeffArray[numDFOCoeffs]
array of coefficients
Definition: fxobjects.h:3247
Custom parameter structure for the TriodeClassA object.
Definition: fxobjects.h:5553
unsigned int sampleRate
sample rate
Definition: fxobjects.h:9833
virtual double getOutput3()
Definition: fxobjects.h:6748
virtual double getComponentResistance()
Definition: fxobjects.h:6072
double kRT
reverb time, 0 to 1
Definition: fxobjects.h:4700
TriodeClassAParameters parameters
object parameters
Definition: fxobjects.h:5702
unsigned int filterImpulseLength
IR length.
Definition: fxobjects.h:9045
bool enableGainComp
enable gain compensation (see book)
Definition: fxobjects.h:5124
WDFParameters getParameters()
Definition: fxobjects.h:8473
The LinearBuffer object implements a linear buffer of type T. It allows easy wrapping of a smart poin...
Definition: fxobjects.h:2232
CombFilterParameters & operator=(const CombFilterParameters ¶ms)
Definition: fxobjects.h:3962
The DFOscillator object implements generates a very pure sinusoidal oscillator by placing poles direc...
Definition: fxobjects.h:3151
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8262
The WdfSeriesLC object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6300
void setPort3_CompAdaptor(IComponentAdaptor *_port3CompAdaptor)
Definition: fxobjects.h:7131
double zRegister_C
storage register for C (not used)
Definition: fxobjects.h:6638
virtual void setInput1(double _in1)
Definition: fxobjects.h:6109
The WdfSeriesRC object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6788
virtual double getR2()
Definition: fxobjects.h:7305
virtual void setInput1(double _in1)
Definition: fxobjects.h:6751
Custom parameter structure for the AnalogFIRFilter object. This is a somewhat silly object that impla...
Definition: fxobjects.h:2505
double out3
stored port 3 output; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7277
double lsf_Fshelf
shelf fc from self bias cap
Definition: fxobjects.h:5590
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6081
fftw_complex * fft_input
array for FFT input
Definition: fxobjects.h:8846
virtual bool reset(double _sampleRate)=0
bool checkAndWrapModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3045
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6523
double sampleRate
sample rate
Definition: fxobjects.h:6772
double apfDelayWeight_Pct
APF max delay weighying.
Definition: fxobjects.h:4693
double principalArg(double phaseIn)
calculates proncipal argument of a phase value; this is the wrapped value on the range of [-pi...
Definition: fxobjects.h:1034
OscillatorParameters lfoParameters
obejcgt parameters
Definition: fxobjects.h:3034
unsigned int relaxationBins
relaxation bins for FIR specification
Definition: fxobjects.h:572
unsigned int FIRLength
FIR length.
Definition: fxobjects.h:9834
This is the output structure for audio generator objects that can render up to four outputs...
Definition: fxobjects.h:1217
edgeTransition edgeType
edge type
Definition: fxobjects.h:606
FastConvolver polyPhaseConvolvers[maxSamplingRatio]
a set of sub-band convolvers for polyphase operation
Definition: fxobjects.h:9959
virtual void setInput(double _in)
Definition: fxobjects.h:5990
Custom parameter structure for the AudioFilter object.
Definition: fxobjects.h:1484
bool enablePeakPhaseLocking
flag to enable phase lock
Definition: fxobjects.h:9136
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L2
adaptor for L2
Definition: fxobjects.h:7822
bool enableNLP
enable non linear processing (use oversampling for best results)
Definition: fxobjects.h:5127
LinearBuffer< double > irBuffer
linear buffer for the IR
Definition: fxobjects.h:2485
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:1308
PhaseVocoder vocoder
vocoder to perform PSM
Definition: fxobjects.h:9549
virtual void setInput3(double _in3)
Definition: fxobjects.h:6757
virtual double getOutput()
Definition: fxobjects.h:6733
globally utilized constants and enumerations
virtual bool canProcessAudioFrame()=0
IComponentAdaptor * port1CompAdaptor
componant or adaptor connected to port 1
Definition: fxobjects.h:7256
double outputLevel_dB
input level in dB
Definition: fxobjects.h:5746
The WDFTunableButterLPF3 object implements a tunable 3rd order Butterworth ladder filter...
Definition: fxobjects.h:7844
FilterBankOutput processFilterBank(double xn)
Definition: fxobjects.h:1717
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8358
double raw2dB(double raw)
calculates dB for given input
Definition: fxobjects.h:268
windowType window
window type
Definition: fxobjects.h:8876
virtual void setInput2(double _in2)
Definition: fxobjects.h:6195
DynamicsProcessorParameters parameters
object parameters
Definition: fxobjects.h:2129
T readBuffer(int delayInSamples)
Definition: fxobjects.h:2342
double lowShelfBoostCut_dB
low shelf gain
Definition: fxobjects.h:4533
fftw_complex * fft_input
array for FFT input
Definition: fxobjects.h:8759
fftw_complex * ifft_result
array for IFFT output
Definition: fxobjects.h:8762
double R3
component resistance
Definition: fxobjects.h:7264
virtual void setInput1(double _in1)
Definition: fxobjects.h:6628
void setParameters(const DelayAPFParameters ¶ms)
Definition: fxobjects.h:4268
BinData binData[PSM_FFT_LEN]
array of BinData structures for current FFT frame
Definition: fxobjects.h:9559
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2416
void createWDF()
Definition: fxobjects.h:8328
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4179
FastConvolver polyPhaseConvolvers[maxSamplingRatio]
a set of sub-band convolvers for polyphase operation
Definition: fxobjects.h:9839
virtual void setInput1(double _in1)
Definition: fxobjects.h:6192
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5154
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3725
unsigned int detectMode
detect mode, see TLD_ constants above
Definition: fxobjects.h:1808
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:936
double imag
imaginary part
Definition: fxobjects.h:479
void setPitchShift(double semitones)
Definition: fxobjects.h:9194
virtual void setInput3(double _in3)
Definition: fxobjects.h:6512
distortionModel
Use this strongly typed enum to easily set the waveshaper model for the Triode objects.
Definition: fxobjects.h:5540
int peakBinsPrevious[PSM_FFT_LEN]
array of previous peak bin index values (-1 = not peak)
Definition: fxobjects.h:9563
virtual void setComponentValue_LC(double _componentValue_L, double _componentValue_C)
Definition: fxobjects.h:6453
double componentResistance
simulated resistance
Definition: fxobjects.h:6120
WdfSeriesAdaptor seriesAdaptor_L1
adaptor for L1
Definition: fxobjects.h:7919
SimpleLPFParameters getParameters()
Definition: fxobjects.h:3735
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2453
double inputLevel
input level (not in dB)
Definition: fxobjects.h:5868
bool overlapAddOnly
flag for overlap-add-only algorithms
Definition: fxobjects.h:8888
double ratio
processor I/O gain ratio
Definition: fxobjects.h:2012
int findEdgeTargetBin(double testFreq, double bin1Freq)
find bin for target frequency
Definition: fxobjects.h:623
double fc
brickwall fc
Definition: fxobjects.h:568
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:7017
OscillatorParameters parameters
object parameters
Definition: fxobjects.h:3243
double * filterIR
filter IR
Definition: fxobjects.h:9043
double componentValue_L
component value L
Definition: fxobjects.h:6518
double RL
RL value.
Definition: fxobjects.h:6521
void createWDF()
Definition: fxobjects.h:7882
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:6219
virtual void setComponentValue_LC(double componentValue_L, double componentValue_C)
Definition: fxobjects.h:6030
virtual double getComponentValue_C()
Definition: fxobjects.h:6478
double R
value of R component
Definition: fxobjects.h:7082
double * getFilterIRTable(unsigned int FIRLength, rateConversionRatio ratio, unsigned int sampleRate)
returns the up or downsample ratio as a numeric value
Definition: fxobjects.h:9621
double atanWaveShaper(double xn, double saturation)
calculates arctangent waveshaper
Definition: fxobjects.h:383
virtual void setInput1(double _in1)
Definition: fxobjects.h:7663
The ClassATubePre object implements a simple cascade of four (4) triode tube models.
Definition: fxobjects.h:5773
BitCrusherParameters getParameters()
Definition: fxobjects.h:5931
IComponentAdaptor * getPort3_CompAdaptor()
Definition: fxobjects.h:7251
virtual double getComponentResistance()
Definition: fxobjects.h:6439
void doOverlapAdd(double *outputData=nullptr, int length=0)
perform the overlap/add on the IFFT data
Definition: fxobjects.cpp:1512
double updatedPhase
phase update value
Definition: fxobjects.h:9104
double Q
filter Q
Definition: fxobjects.h:2524
double releaseTime_mSec
release mSec
Definition: fxobjects.h:2020
void createDelayBuffers(double _sampleRate, double _bufferLength_mSec)
Definition: fxobjects.h:2895
IComponentAdaptor * port3CompAdaptor
componant or adaptor connected to port 3
Definition: fxobjects.h:7258
void setInterpolate(bool b)
Definition: fxobjects.h:2378
double getG_value()
Definition: fxobjects.h:1584
virtual void setInput(double in)
Definition: fxobjects.h:6364
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8625
virtual const SignalGenData renderAudioOutput()
Definition: fxobjects.h:3189
AudioFilter lpFilter
low-band filter
Definition: fxobjects.h:1760
unsigned int count
number of samples in output array
Definition: fxobjects.h:9732
bool hardLimitGate
threshold in dB
Definition: fxobjects.h:2015
virtual double getOutput1()
Definition: fxobjects.h:6377
virtual void setInput3(double _in3)
Definition: fxobjects.h:6392
virtual void setInput1(double _in1)
Definition: fxobjects.h:6386
WdfSeriesAdaptor seriesAdaptor_L1
adaptor for L1
Definition: fxobjects.h:7820
virtual double getComponentValue_R()
Definition: fxobjects.h:6967
virtual double getOutput1()
Definition: fxobjects.h:7380
bool calculateAnalogMagArray(AnalogMagData &magData)
calculate an arra of magnitude points from analog filter specifications
Definition: fxobjects.h:859
void setPort1_CompAdaptor(IComponentAdaptor *_port1CompAdaptor)
Definition: fxobjects.h:7125
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:9171
virtual double processAudioSample(double xn)
Definition: fxobjects.h:7872
void setCoefficients(double *coeffs)
Definition: fxobjects.h:1412
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2554
fftw_complex * getFFTData()
Definition: fxobjects.h:8819
double sampleRate
sample rate
Definition: fxobjects.h:3250
virtual double getOutput1()
Definition: fxobjects.h:6497
double normalOutput
normal
Definition: fxobjects.h:1221
virtual void setComponentValue_RC(double _componentValue_R, double _componentValue_C)
Definition: fxobjects.h:6945
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:1195
double sampleRate
sample rate
Definition: fxobjects.h:6895
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1532
unsigned int outputWriteIndex
circular buffer index: output write
Definition: fxobjects.h:8861
reverbDensity density
density setting thick or thin
Definition: fxobjects.h:4687
delayAlgorithm algorithm
delay algorithm
Definition: fxobjects.h:2690
virtual void setComponentValue_RC(double componentValue_R, double componentValue_C)
Definition: fxobjects.h:7238
bool calculateBrickwallMagArray(BrickwallMagData &magData)
calculate an arra of magnitude points from brickwall specifications
Definition: fxobjects.h:688
virtual void initializeAdaptorChain()
Definition: fxobjects.h:5987
double Q
va filter Q
Definition: fxobjects.h:5122
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8189
double windowHopCorrection
window correction including hop/overlap
Definition: fxobjects.h:8869
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2107
virtual void setInput3(double _in3)
Definition: fxobjects.h:6634
virtual void setInput2(double _in2)
Definition: fxobjects.h:6877
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4580
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8479
The WdfResistor object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6057
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:4783
void init(unsigned int lengthPowerOfTwo)
Definition: fxobjects.h:2456
The ZVAFilter object implements multpile Zavalishin VA Filters. Audio I/O:
Definition: fxobjects.h:5147
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2748
void writeDelay(double xn)
Definition: fxobjects.h:3928
The WdfParallelAdaptor object implements the parallel reflection-free (non-terminated) adaptor...
Definition: fxobjects.h:7508
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6119
double pitchShiftSemitones
pitch shift in half-steps
Definition: fxobjects.h:9135
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6553
virtual double getComponentValue()
Definition: fxobjects.h:6240
double componentResistance
simulated resistance
Definition: fxobjects.h:6282
ModulatedDelayParameters & operator=(const ModulatedDelayParameters ¶ms)
Definition: fxobjects.h:3285
virtual double getOutput()
Definition: fxobjects.h:6856
double quadPhaseOutput_neg
-90 degrees out
Definition: fxobjects.h:1224
bool enableLFO
flag to enable LFO
Definition: fxobjects.h:4147
unsigned int outputBufferLength
lenght of resampled output array
Definition: fxobjects.h:9568
double * windowBuffer
array for window
Definition: fxobjects.h:8853
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3641
unsigned int sampleRate
sample rate
Definition: fxobjects.h:9953
virtual double getComponentConductance()
Definition: fxobjects.h:6237
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8196
void setParameters(const AudioFilterParameters ¶meters)
Definition: fxobjects.h:1562
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3359
Custom parameter structure for the AudioDelay object.
Definition: fxobjects.h:2667
double getMagnitude(double re, double im)
calculates magnitude of a complex numb er
Definition: fxobjects.h:1004
virtual bool reset(double _sampleRate)=0
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2574
double lfoDepth_Pct
phaser LFO depth in %
Definition: fxobjects.h:3491
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1704
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:9191
virtual double getComponentValue_C()
Definition: fxobjects.h:6970
wdfComponent
Use this strongly typed enum to easily set the wdfComponent type.
Definition: fxobjects.h:7039
double RC
RC value.
Definition: fxobjects.h:6402
double psi
bin phase correction
Definition: fxobjects.h:9101
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6312
double outputGain_dB
make up gain
Definition: fxobjects.h:2021
unsigned int getFrameLength()
Definition: fxobjects.h:8755
double leftDelay_mSec
left delay time
Definition: fxobjects.h:2696
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_L6C6
adaptor for L6 and C6
Definition: fxobjects.h:8113
double in3
stored port 3 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7270
bool isPeak
flag for peak bins
Definition: fxobjects.h:9098
windowType
Use this strongly typed enum to easily set the windowing type for FFT algorithms that use it...
Definition: fxobjects.h:8652
double lfoMaxModulation_mSec
LFO maximum modulation time in mSec.
Definition: fxobjects.h:4150
IComponentAdaptor * getPort2_CompAdaptor()
Definition: fxobjects.h:7248
double lowShelf_fc
LSF shelf frequency.
Definition: fxobjects.h:5749
double lpf_g
LPF g coefficient (if enabled)
Definition: fxobjects.h:4145
virtual double getOutput3()
Definition: fxobjects.h:6994
double zRegister_C
storage register for C
Definition: fxobjects.h:6396
void flushBuffer()
Definition: fxobjects.h:2239
The SimpleLPF object implements a first order one-pole LPF using one coefficient "g" value...
Definition: fxobjects.h:3717
virtual void enableAuxInput(bool enableAuxInput)
Definition: fxobjects.h:1181
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8296
WdfSeriesAdaptor seriesAdaptor_L1C1
adaptor for L1 and C1
Definition: fxobjects.h:8009
double zRegister_L
storage register for L
Definition: fxobjects.h:7006
virtual double getComponentValue_C()
Definition: fxobjects.h:6847
WdfParallelAdaptor parallelAdaptor_C1
adaptor for C1
Definition: fxobjects.h:7821
virtual double getOutput2()
Definition: fxobjects.h:7485
ClassATubePreParameters getParameters()
Definition: fxobjects.h:5808
NestedDelayAPFParameters & operator=(const NestedDelayAPFParameters ¶ms)
Definition: fxobjects.h:4320
NestedDelayAPFParameters getParameters()
Definition: fxobjects.h:4458
void calculateFilterCoeffs()
Definition: fxobjects.h:5295
virtual void setInput2(double _in2)
Definition: fxobjects.h:7568
double wetLevel_dB
wet output level in dB
Definition: fxobjects.h:2691
virtual double getOutput2()
Definition: fxobjects.h:6103
double releaseTime_mSec
release time in milliseconds
Definition: fxobjects.h:1807
double bufferLength_mSec
total buffer length in mSec
Definition: fxobjects.h:4292
Custom parameter structure for the TwoBandShelvingFilter object. Used for reverb algorithms in book...
Definition: fxobjects.h:4515
double R1
input port resistance
Definition: fxobjects.h:7262
Custom parameter structure for the SimpleDelay object. Used for reverb algorithms in book...
Definition: fxobjects.h:3781
double * outputBuffer
output timeline (y)
Definition: fxobjects.h:8857
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:444
virtual double getOutput3()
Definition: fxobjects.h:6625
virtual double getOutput2()
Definition: fxobjects.h:7595
The ModulatedDelay object implements the three basic algorithms: flanger, chorus, vibrato...
Definition: fxobjects.h:3321
Use this interface for objects that process audio input samples to produce audio output samples...
Definition: fxobjects.h:1161
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6091
void createCircularBufferPowerOfTwo(unsigned int _bufferLengthPowerOfTwo)
Definition: fxobjects.h:2313
double RL
RL value.
Definition: fxobjects.h:6644
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L3C3
adaptor for L3 and C3
Definition: fxobjects.h:8011
unsigned int inputCount
input sample counter
Definition: fxobjects.h:9044
void createDelayBuffer(double _sampleRate, double _bufferLength_mSec)
Definition: fxobjects.h:3889
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5479
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1382
double readDelayAtTime_mSec(double _delay_mSec)
Definition: fxobjects.h:3911
double sampleRate
sample rate
Definition: fxobjects.h:7018
virtual double getOutput2()
Definition: fxobjects.h:6991
WdfParallelAdaptor parallelAdaptor_L2C2
adaptor for L2 and C2
Definition: fxobjects.h:8010
double apfDelayMax_mSec
APF max delay time.
Definition: fxobjects.h:4692
PhaseShifterParameters & operator=(const PhaseShifterParameters ¶ms)
Definition: fxobjects.h:3477
double slopeIncrement
transition slope
Definition: fxobjects.h:609
void setComponent(wdfComponent componentType, double value1=0.0, double value2=0.0)
Definition: fxobjects.h:7141
The PhaseShifter object implements a six-stage phaser.
Definition: fxobjects.h:3533
void setParameters(const ZVAFilterParameters ¶ms)
Definition: fxobjects.h:5176
double coeffArray[numCoeffs]
our local copy of biquad coeffs
Definition: fxobjects.h:1594
The FastFFT provides a simple wrapper for the FFTW FFT operation - it is ultra-thin and simple to use...
Definition: fxobjects.h:8733
bool softKnee
soft knee flag
Definition: fxobjects.h:2016
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1847
rateConversionRatio
Use this strongly typed enum to easily set up or down sampling ratios.
Definition: fxobjects.h:9587
virtual double getOutput1()
Definition: fxobjects.h:7592
double modCounterQP
Quad Phase modulo counter [0.0, +1.0].
Definition: fxobjects.h:3042
LFO modLFO
LFO.
Definition: fxobjects.h:4298
double decimateAudio(DecimatorInput data)
Definition: fxobjects.h:9930
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6714
OscillatorParameters & operator=(const OscillatorParameters ¶ms)
Definition: fxobjects.h:2958
void setSourceResistance(double _sourceResistance)
Definition: fxobjects.h:7122
double Q
brickwall Q
Definition: fxobjects.h:569
void createCircularBuffer(unsigned int _bufferLength)
Definition: fxobjects.h:2305
FastConvolver convolver
the convolver
Definition: fxobjects.h:9830
void setParameters(const LRFilterBankParameters &_parameters)
Definition: fxobjects.h:1744
virtual void updateComponentResistance()
Definition: fxobjects.h:6445
WdfParallelAdaptor parallelAdaptor_L2C2
adaptor for L2 and C2
Definition: fxobjects.h:8107
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4198
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6253
double lfoRate_Hz
LFO rate in Hz, if enabled.
Definition: fxobjects.h:4148
bool mirrorMag
optionally mirror the output array
Definition: fxobjects.h:573
virtual void setComponentValue_RL(double _componentValue_R, double _componentValue_L)
Definition: fxobjects.h:6575
double Q
filter Q
Definition: fxobjects.h:8146
double lowShelfBoostCut_dB
LSF shelf gain/cut.
Definition: fxobjects.h:5750
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5664
bool polyphase
enable polyphase decomposition
Definition: fxobjects.h:9958
void initialize(unsigned int _filterImpulseLength)
Definition: fxobjects.h:8929
double RL
RL value.
Definition: fxobjects.h:6401
double lpf_g
gain value for LPF (if enabled)
Definition: fxobjects.h:3979
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5947
double highShelf_fc
high shelf fc
Definition: fxobjects.h:4704
double phi
bin phase angle
Definition: fxobjects.h:9100
double delay_Samples
current delay in samples; other objects may need to access this information
Definition: fxobjects.h:3801
double componentResistance
equivalent resistance of pair of componen
Definition: fxobjects.h:6648
double * inputBuffer
input timeline (x)
Definition: fxobjects.h:8856
The TwoBandShelvingFilter object implements two shelving filters in series in the standard "Bass and ...
Definition: fxobjects.h:4555
double ha
ha = N/4 — 75% overlap
Definition: fxobjects.h:9554
Custom output structure for interpolator; it holds an arry of interpolated output samples...
Definition: fxobjects.h:9728
Custom parameter structure for the EnvelopeFollower object.
Definition: fxobjects.h:5366
double sampleRate
sample rate
Definition: fxobjects.h:6404
BinData binDataPrevious[PSM_FFT_LEN]
array of BinData structures for previous FFT frame
Definition: fxobjects.h:9560
PSMVocoderParameters getParameters()
Definition: fxobjects.h:9527
virtual double getOutput2()
Definition: fxobjects.h:7383
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6145
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1928
virtual void setInput3(double _in3)
Definition: fxobjects.h:7377
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8417
virtual void updateComponentResistance()
Definition: fxobjects.h:6250
virtual double getComponentResistance()
Definition: fxobjects.h:6807
EnvelopeFollowerParameters & operator=(const EnvelopeFollowerParameters ¶ms)
Definition: fxobjects.h:5370
delayUpdateType
Use this strongly typed enum to easily set the delay update type; this varies depending on the design...
Definition: fxobjects.h:2653
WDFParameters & operator=(const WDFParameters ¶ms)
Definition: fxobjects.h:8132
The BitCrusher object implements a quantizing bitcrusher algorithm.
Definition: fxobjects.h:5918
Custom parameter structure for the DynamicsProcessor object. Ths struct includes all information need...
Definition: fxobjects.h:1986
virtual void setInput(double in)
Definition: fxobjects.h:6606
TriodeClassAParameters & operator=(const TriodeClassAParameters ¶ms)
Definition: fxobjects.h:5557
bool enableSidechain
enable external sidechain input to object
Definition: fxobjects.h:2017
double outputGain
outputGain level
Definition: fxobjects.h:5583
virtual void updateComponentResistance()
Definition: fxobjects.h:6168
double zRegister_C
storage register for L
Definition: fxobjects.h:6761
edgeTransition
Use this strongly typed enum to easily set the edge direction (rising or falling) of a transition ban...
Definition: fxobjects.h:589
double lfoMaxModulation_mSec
max modulation time if LFO is enabled
Definition: fxobjects.h:4349
analogFilter
Use this strongy typed enum to set the analog filter type for the AnalogMagData structure.
Definition: fxobjects.h:821
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5954
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5008
Custom parameter structure for the ZVAFilter object.
Definition: fxobjects.h:5099
Use this interface for objects in the WDF Ladder Filter library; see book for more information...
Definition: fxobjects.h:5980
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:1061
virtual double getOutput2()
Definition: fxobjects.h:6380
double asymmetry
asymmetry level
Definition: fxobjects.h:5582
double RC
RC value.
Definition: fxobjects.h:7014
ReverbTankParameters getParameters()
Definition: fxobjects.h:4873
fftw_complex * ifft_result
array for IFFT output
Definition: fxobjects.h:8848
The LRFilterBank object implements 2 Linkwitz-Riley Filters in a parallel filter bank to split the si...
Definition: fxobjects.h:1678
void setParameters(AnalogFIRFilterParameters _parameters)
Definition: fxobjects.h:2586
void createWDF()
Definition: fxobjects.h:7987
virtual double getComponentValue_L()
Definition: fxobjects.h:6355
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:7217
filterCoeff
Use this enum to easily access coefficents inside of arrays.
Definition: fxobjects.h:1286
The WDFBesselBSF3 object implements a 3rd order Bessel BSF NOTE: designed with Elsie www...
Definition: fxobjects.h:7949
virtual double getComponentValue_L()
Definition: fxobjects.h:6475
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6850
bool enableLFO
flag to enable the modulated delay
Definition: fxobjects.h:4346
virtual void setComponentValue_LC(double _componentValue_L, double _componentValue_C)
Definition: fxobjects.h:6333
virtual double getOutput1()
Definition: fxobjects.h:6262
The WdfSeriesAdaptor object implements the series reflection-free (non-terminated) adaptor...
Definition: fxobjects.h:7298
fftw_complex * doInverseFFT(double *inputReal, double *inputImag)
perform the IFFT operation
Definition: fxobjects.cpp:1181
Custom parameter structure for the Biquad object. Default version defines the biquad structure used i...
Definition: fxobjects.h:9118
unsigned int wrapMaskOut
output wrap mask
Definition: fxobjects.h:8865
ComplexNumber complexMultiply(ComplexNumber c1, ComplexNumber c2)
returns the complex product of two complex numbers
Definition: fxobjects.h:490
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8238
bool calculateFilterCoeffs()
Definition: fxobjects.cpp:130
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6348
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2998
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5188
double C
value of C component
Definition: fxobjects.h:7084
double analogMatchSigma
analog matching Sigma value (see book)
Definition: fxobjects.h:5351
The AnalogFIRFilter object implements a somewhat silly algorithm that implaments an analog magnitude ...
Definition: fxobjects.h:2546
double outputLevel
output level (not in dB)
Definition: fxobjects.h:5869
virtual void updateComponentResistance()
Definition: fxobjects.h:6325
int previousPeakBin
index of peak bin in previous FFT
Definition: fxobjects.h:9103
virtual void setInput2(double _in2)
Definition: fxobjects.h:6631
WDFParameters getParameters()
Definition: fxobjects.h:8352
Custom parameter structure for the BitCrusher object.
Definition: fxobjects.h:5884
double coeffArray[numCoeffs]
Definition: fxobjects.h:1439
AnalogFIRFilterParameters getParameters()
Definition: fxobjects.h:2580
bool matchAnalogNyquistLPF
match analog gain at Nyquist
Definition: fxobjects.h:5125
unsigned int frameLength
current FFT length
Definition: fxobjects.h:8879
virtual double getComponentResistance()
Definition: fxobjects.h:6683
double wetLevel_dB
wet output level in dB
Definition: fxobjects.h:4707
double feedback_Pct
feedback in %
Definition: fxobjects.h:3301
virtual double getR2()
Definition: fxobjects.h:7413
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:512
OscillatorParameters getParameters()
Definition: fxobjects.h:3014
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6953
virtual double getComponentValue_L()
Definition: fxobjects.h:6721
virtual void initialize(double _R1)
Definition: fxobjects.h:7527
virtual double getOutput3()
Definition: fxobjects.h:6189
void initialize(unsigned int _frameLength, windowType _window)
initialize the Fast FFT object for operation
Definition: fxobjects.cpp:1059
Custom structure that holds magnitude information about a brickwall filter.
Definition: fxobjects.h:557
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2567
double fc
filter fc
Definition: fxobjects.h:8145
double lastEnvelope
output register
Definition: fxobjects.h:1945
virtual double getComponentValue()
Definition: fxobjects.h:6078
virtual double getComponentResistance()
Definition: fxobjects.h:6319
double innerAPF_g
g coefficient for inner APF
Definition: fxobjects.h:4343
double psi[PSM_FFT_LEN]
array of phase correction values for classic algorithm
Definition: fxobjects.h:9556
virtual double getOutput3()
Definition: fxobjects.h:6503
double releaseTime
release time coefficient
Definition: fxobjects.h:1943
double alpha0
input scalar, correct delay-free loop
Definition: fxobjects.h:5344
virtual double getComponentConductance()
Definition: fxobjects.h:6686
bool clampToUnityMax
clamp output to 1.0 (set false for true log detectors)
Definition: fxobjects.h:1810
ClassATubePreParameters parameters
object parameters
Definition: fxobjects.h:5864
double phaseInc
phase inc = fo/fs
Definition: fxobjects.h:3041
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7956
delayAlgorithm
Use this strongly typed enum to easily set the delay algorithm.
Definition: fxobjects.h:2637
double highShelfBoostCut_dB
HSF shelf frequency.
Definition: fxobjects.h:5752
The PhaseVocoder provides a basic phase vocoder that is initialized to N = 4096 and 75% overlap; the ...
Definition: fxobjects.h:8792
virtual double getOutput1()
Definition: fxobjects.h:6865
virtual double getOutput2()
Definition: fxobjects.h:6500
double makeUpGain_dB
stored makeup gain (dB)
Definition: fxobjects.h:5066
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6481
bool enableLPF
flag to enable LPF in structure
Definition: fxobjects.h:4144
double * windowBuff
buffer for window
Definition: fxobjects.h:9565
double sourceResistance
source impedance; OK for this to be set to 0.0 for Rs = 0
Definition: fxobjects.h:7284
double componentValue_R
component value R
Definition: fxobjects.h:6765
BitCrusherParameters & operator=(const BitCrusherParameters ¶ms)
Definition: fxobjects.h:5888
virtual double getComponentConductance()
Definition: fxobjects.h:6563
virtual double getOutput1()
Definition: fxobjects.h:6988
WdfSeriesAdaptor seriesAdaptor_R
adaptor for series R
Definition: fxobjects.h:8628
virtual double getOutput3()=0
DelayAPFParameters & operator=(const DelayAPFParameters ¶ms)
Definition: fxobjects.h:4124
windowType window
window type
Definition: fxobjects.h:8768
fftw_plan plan_backward
FFTW plan for IFFT.
Definition: fxobjects.h:8764
unsigned int startBin
starting bin for transition band
Definition: fxobjects.h:607
double RR
RR value.
Definition: fxobjects.h:6646
double fixeDelayWeight_Pct
fixed delay max weighying
Definition: fxobjects.h:4695
double g
simple LPF g value
Definition: fxobjects.h:3697
BinData & operator=(const BinData ¶ms)
Definition: fxobjects.h:9068
fftw_complex * doFFT(double *inputReal, double *inputImag=nullptr)
perform the FFT operation
Definition: fxobjects.cpp:1153
double phi[PSM_FFT_LEN]
array of phase values for classic algorithm
Definition: fxobjects.h:9555
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5925
unsigned int localPeakBin
index of peak-boss
Definition: fxobjects.h:9102
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4051
double dryLevel_dB
dry output level in dB
Definition: fxobjects.h:2692
virtual void setInput2(double _in2)
Definition: fxobjects.h:7476
virtual double getOutput()
Definition: fxobjects.h:6494
The WDFIdealRLCHPF object implements an ideal RLC HPF using the WDF library.
Definition: fxobjects.h:8289
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6894
void setParameters(const BiquadParameters &_parameters)
Definition: fxobjects.h:1408
double outerAPF_g
g coefficient for outer APF
Definition: fxobjects.h:4342
The NestedDelayAPF object implements a pair of nested Delaying APF structures. These are labled the o...
Definition: fxobjects.h:4372
PhaseShifterParameters getParameters()
Definition: fxobjects.h:3647
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:9694
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2766
The WdfParallelRL object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6664
T readBuffer(double delayInFractionalSamples)
Definition: fxobjects.h:2357