39 const double kSmallestPositiveFloatValue = 1.175494351e-38;
40 const double kSmallestNegativeFloatValue = -1.175494351e-38;
41 const double kSqrtTwo = pow(2.0, 0.5);
42 const double kMinFilterFrequency = 20.0;
43 const double kMaxFilterFrequency = 20480.0;
44 const double ARC4RANDOMMAX = 4294967295.0;
64 bool retValue =
false;
65 if (value > 0.0 && value < kSmallestPositiveFloatValue)
70 else if (value < 0.0 && value > kSmallestNegativeFloatValue)
94 double denom = x2 - x1;
99 double dx = (x - x1) / (x2 - x1);
102 return dx*y2 + (1 - dx)*y1;
120 if (fractional_X >= 1.0)
return y2;
123 return fractional_X*y2 + (1.0 - fractional_X)*y1;
143 for (i = 0; i<n; i++)
146 for (j = 0; j<n; j++)
149 l *= (xbar - x[j]) / (x[i] - x[j]);
167 inline void boundValue(
double& value,
double minValue,
double maxValue)
169 value = fmin(value, maxValue);
170 value = fmax(value, minValue);
190 return unipolarModulatorValue*(maxValue - minValue) + minValue;
210 return maxValue - (1.0 - unipolarModulatorValue)*(maxValue - minValue);
230 double halfRange = (maxValue - minValue) / 2.0;
231 double midpoint = halfRange + minValue;
233 return bipolarModulatorValue*(halfRange) + midpoint;
247 return 2.0*value - 1.0;
261 return 0.5*value + 0.5;
275 return 20.0*log10(raw);
289 return pow(10.0, (dB / 20.0));
304 if (Q <= 0.707)
return 1.0;
305 return (Q*Q) / (pow((Q*Q - 0.25), 0.5));
333 #if defined _WINDOWS || defined _WINDLL 335 noise = (float)rand();
338 noise = 2.f*(noise / 32767.f) - 1.f;
341 noise = (float)arc4random();
344 noise = 2.0*(noise / ARC4RANDOMMAX) - 1.0;
358 inline double sgn(
double xn)
360 return (xn > 0) - (xn < 0);
373 inline double calcWSGain(
double xn,
double saturation,
double asymmetry)
375 double g = ((xn >= 0.0 && asymmetry > 0.0) || (xn < 0.0 && asymmetry < 0.0)) ? saturation * (1.0 + 4.0*fabs(asymmetry)) : saturation;
390 return atan(saturation*xn) / atan(saturation);
404 return tanh(saturation*xn) / tanh(saturation);
419 return sgn(xn)*(1.0 - exp(-fabs(saturation*xn)));
434 double wsGain =
calcWSGain(xn, saturation, asymmetry);
435 return sgn(xn)*(1.0 - exp(-fabs(wsGain*xn))) / (1.0 - exp(-wsGain));
448 inline double getMagResponse(
double theta,
double a0,
double a1,
double a2,
double b1,
double b2)
451 double num = a1*a1 + (a0 - a2)*(a0 - a2) + 2.0*a1*(a0 + a2)*cos(theta) + 4.0*a0*a2*cos(theta)*cos(theta);
452 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);
454 magSqr = num / denom;
458 double mag = pow(magSqr, 0.5);
502 return complexProduct;
518 bool arithmeticBW =
true;
519 double bandwidth = fc / Q;
525 f_Low = fc - bandwidth / 2.0;
526 f_High = fc + bandwidth / 2.0;
566 double* magArray =
nullptr;
567 unsigned int dftArrayLen = 0;
568 double sampleRate = 44100.0;
629 return (
int)(testFreq / bin1Freq);
646 double targetF1 = testFreq;
647 double targetF2 = testFreq + relax_Bins*bin1Freq;
653 nF1 = std::max(0, nF1);
654 nF2 = std::max(0, nF2);
656 int relaxBins = nF2 - nF1;
666 transitionData.
stopBin = relaxBins + nF1;
671 if (transitionData.
edgeType == edgeTransition::kFallingEdge)
690 double actualLength = magData.
mirrorMag ? (double)magData.dftArrayLen : (
double)magData.dftArrayLen * 2.0;
691 uint32_t dumpLength = magData.
mirrorMag ? magData.dftArrayLen / 2 : magData.dftArrayLen;
694 double bin1 = magData.sampleRate / actualLength;
697 memset(&magData.magArray[0], 0, magData.dftArrayLen *
sizeof(
double));
701 fallingEdge.
edgeType = edgeTransition::kFallingEdge;
704 risingEdge.
edgeType = edgeTransition::kRisingEdge;
709 bool relaxIt =
false;
712 if(magData.filterType == brickwallFilter::kBrickLPF)
714 else if (magData.filterType == brickwallFilter::kBrickHPF)
716 else if (magData.filterType == brickwallFilter::kBrickBPF)
721 else if (magData.filterType == brickwallFilter::kBrickBSF)
728 for (uint32_t i = 0; i < dumpLength; i++)
730 double eval_f = i*bin1;
732 if (magData.filterType == brickwallFilter::kBrickLPF)
736 if (eval_f <= magData.
fc)
737 magData.magArray[i] = 1.0;
742 magData.magArray[i] = 1.0;
747 else if (magData.filterType == brickwallFilter::kBrickHPF)
751 if (eval_f >= magData.
fc)
752 magData.magArray[i] = 1.0;
757 magData.magArray[i] = 1.0;
762 else if (magData.filterType == brickwallFilter::kBrickBPF)
766 if (eval_f >= magData.
f_Low && eval_f <= magData.
f_High)
767 magData.magArray[i] = 1.0;
772 magData.magArray[i] = 1.0;
780 else if (magData.filterType == brickwallFilter::kBrickBSF)
782 if (!relaxIt && eval_f >= magData.
f_Low && eval_f <= magData.
f_High)
783 magData.magArray[i] = 0.0;
784 else if((!relaxIt && eval_f < magData.
f_Low) || eval_f > magData.
f_High)
785 magData.magArray[i] = 1.0;
794 if (!magData.mirrorMag)
798 int index = magData.dftArrayLen / 2 - 1;
799 for (
unsigned int i = magData.dftArrayLen / 2; i <magData.dftArrayLen; i++)
801 magData.magArray[i] = magData.magArray[index--];
838 double* magArray =
nullptr;
839 unsigned int dftArrayLen = 0;
840 double sampleRate = 44100.0;
846 bool mirrorMag =
true;
861 double actualLength = magData.mirrorMag ? (double)magData.dftArrayLen : (
double)magData.dftArrayLen * 2.0;
862 uint32_t dumpLength = magData.mirrorMag ? magData.dftArrayLen / 2 : magData.dftArrayLen;
864 double bin1 = magData.sampleRate / actualLength;
865 double zeta = 1.0 / (2.0*magData.Q);
866 double w_c = 2.0*
kPi*magData.fc;
869 memset(&magData.magArray[0], 0, magData.dftArrayLen *
sizeof(
double));
871 for (uint32_t i = 0; i < dumpLength; i++)
873 double eval_w = 2.0*
kPi*i*bin1;
874 double w_o = eval_w / w_c;
876 if (magData.filterType == analogFilter::kLPF1)
878 double denXSq = 1.0 + (w_o*w_o);
879 magData.magArray[i] = 1.0 / (pow(denXSq, 0.5));
881 else if (magData.filterType == analogFilter::kHPF1)
883 double denXSq = 1.0 + (w_o*w_o);
884 magData.magArray[i] = w_o / (pow(denXSq, 0.5));
886 else if (magData.filterType == analogFilter::kLPF2)
888 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
889 magData.magArray[i] = 1.0 / (pow(denXSq, 0.5));
891 else if (magData.filterType == analogFilter::kHPF2)
893 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
894 magData.magArray[i] = (w_o*w_o) / (pow(denXSq, 0.5));
896 else if (magData.filterType == analogFilter::kBPF2)
898 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
899 magData.magArray[i] = 2.0*w_o*zeta / (pow(denXSq, 0.5));
901 else if (magData.filterType == analogFilter::kBSF2)
903 double numXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o));
904 double denXSq = (1.0 - (w_o*w_o))*(1.0 - (w_o*w_o)) + 4.0*zeta*zeta*w_o*w_o;
905 magData.magArray[i] = (pow(numXSq, 0.5)) / (pow(denXSq, 0.5));
910 if (!magData.mirrorMag)
914 int index = magData.dftArrayLen / 2 - 1;
915 for (
unsigned int i = magData.dftArrayLen / 2; i <magData.dftArrayLen; i++)
917 magData.magArray[i] = magData.magArray[index--];
935 inline void freqSample(
int N,
double A[],
double h[],
int symm)
941 if (symm == POSITIVE)
945 for (n = 0; n<N; n++)
949 for (k = 1; k <= M; k++)
950 val += 2.0 * A[k] * cos(x*k);
956 for (n = 0; n<N; n++)
960 for (k = 1; k <= (N / 2 - 1); k++)
961 val += 2.0 * A[k] * cos(x*k);
970 for (n = 0; n<N; n++)
974 for (k = 1; k <= M; k++)
975 val += 2.0 * A[k] * sin(x*k);
981 for (n = 0; n<N; n++)
983 val = A[N / 2] * sin(
kPi * (n - M));
985 for (k = 1; k <= (N / 2 - 1); k++)
986 val += 2.0 * A[k] * sin(x*k);
1005 return sqrt((re*re) + (im*im));
1020 return atan2(im, re);
1041 enum class interpolation {kLinear, kLagrange4};
1060 inline bool resample(
double* input,
double* output, uint32_t inLength, uint32_t outLength,
1061 interpolation interpType = interpolation::kLinear,
1062 double scalar = 1.0,
double* outWindow =
nullptr)
1064 if (inLength <= 1 || outLength <= 1)
return false;
1065 if (!input || !output)
return false;
1067 double x[4] = { 0.0, 0.0, 0.0, 0.0 };
1068 double y[4] = { 0.0, 0.0, 0.0, 0.0 };
1071 double inc = (double)(inLength - 1) / (double)(outLength - 1);
1075 output[0] = outWindow[0] * scalar * input[0];
1077 output[0] = scalar * input[0];
1079 if (interpType == interpolation::kLagrange4)
1081 for (
unsigned int i = 1; i < outLength; i++)
1084 double xInterp = i*inc;
1085 uint32_t x1 = (uint32_t)xInterp;
1087 if (xInterp > 1.0 && x1 < inLength - 2)
1090 y[0] = input[(int)x[0]];
1093 y[1] = input[(int)x[1]];
1096 y[2] = input[(int)x[2]];
1099 y[3] = input[(int)x[3]];
1108 uint32_t x2 = x1 + 1;
1109 if (x2 >= outLength)
1111 double y1 = input[x1];
1112 double y2 = input[x2];
1124 for (uint32_t i = 1; i < outLength; i++)
1126 double xInterp = i*inc;
1127 uint32_t x1 = (uint32_t)xInterp;
1128 uint32_t x2 = x1 + 1;
1129 if (x2 >= outLength)
1131 double y1 = input[x1];
1132 double y2 = input[x2];
1167 virtual bool reset(
double _sampleRate) = 0;
1195 uint32_t inputChannels,
1196 uint32_t outputChannels)
1247 virtual bool reset(
double _sampleRate) = 0;
1321 enum class biquadAlgorithm { kDirect, kCanonical, kTransposeDirect, kTransposeCanonical };
1342 if (
this == ¶ms)
1380 memset(&
stateArray[0], 0,
sizeof(
double)*numStates);
1410 memcpy(&
coeffArray[0], &coeffs[0],
sizeof(
double)*numCoeffs);
1435 double coeffArray[numCoeffs] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
1462 kLPF1P, kLPF1, kHPF1, kLPF2, kHPF2, kBPF2, kBSF2, kButterLPF2, kButterHPF2, kButterBPF2,
1463 kButterBSF2, kMMALPF2, kMMALPF2B, kLowShelf, kHiShelf, kNCQParaEQ, kCQParaEQ, kLWRLPF2, kLWRHPF2,
1464 kAPF1, kAPF2, kResonA, kResonB, kMatchLP2A, kMatchLP2B, kMatchBP2A, kMatchBP2B,
1465 kImpInvLP1, kImpInvLP2
1486 if (
this == ¶ms)
1594 double coeffArray[numCoeffs] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
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);
2560 memset(&analogMagArray[0], 0,
sizeof(
double) * IR_LEN);
2561 memset(&irArray[0], 0,
sizeof(
double) * IR_LEN);
2592 if (_parameters.
fc != parameters.
fc ||
2593 _parameters.
Q != parameters.
Q ||
2598 analogFilterData.sampleRate = sampleRate;
2599 analogFilterData.magArray = &analogMagArray[0];
2600 analogFilterData.dftArrayLen = IR_LEN;
2601 analogFilterData.mirrorMag =
false;
2603 analogFilterData.filterType = _parameters.
filterType;
2604 analogFilterData.fc = _parameters.
fc;
2605 analogFilterData.Q = _parameters.
Q;
2611 freqSample(IR_LEN, analogMagArray, irArray, POSITIVE);
2617 parameters = _parameters;
2623 double analogMagArray[IR_LEN];
2624 double irArray[IR_LEN];
2625 double sampleRate = 0.0;
2677 if (
this == ¶ms)
2733 if (sampleRate == _sampleRate)
2755 double yn = delayBuffer_L.
readBuffer(delayInSamples_L);
2758 double dn = xn + (parameters.
feedback_Pct / 100.0) * yn;
2764 double output = dryMix*xn + wetMix*yn;
2775 uint32_t inputChannels,
2776 uint32_t outputChannels)
2779 if (inputChannels == 0 || outputChannels == 0)
2783 if (parameters.
algorithm != delayAlgorithm::kNormal &&
2784 parameters.
algorithm != delayAlgorithm::kPingPong)
2788 if (outputChannels == 1)
2800 double xnL = inputFrame[0];
2803 double xnR = inputChannels > 1 ? inputFrame[1] : xnL;
2806 double ynL = delayBuffer_L.
readBuffer(delayInSamples_L);
2809 double ynR = delayBuffer_R.
readBuffer(delayInSamples_R);
2812 double dnL = xnL + (parameters.
feedback_Pct / 100.0) * ynL;
2815 double dnR = xnR + (parameters.
feedback_Pct / 100.0) * ynR;
2818 if (parameters.
algorithm == delayAlgorithm::kNormal)
2826 else if (parameters.
algorithm == delayAlgorithm::kPingPong)
2836 double outputL = dryMix*xnL + wetMix*ynL;
2839 double outputR = dryMix*xnR + wetMix*ynR;
2842 outputFrame[0] = (float)outputL;
2845 outputFrame[1] = (float)outputR;
2864 dryMix = pow(10.0, _parameters.
dryLevel_dB / 20.0);
2866 wetMix = pow(10.0, _parameters.
wetLevel_dB / 20.0);
2869 parameters = _parameters;
2872 if (parameters.
updateType == delayUpdateType::kLeftAndRight)
2876 double newDelayInSamples_L = parameters.
leftDelay_mSec*(samplesPerMSec);
2877 double newDelayInSamples_R = parameters.
rightDelay_mSec*(samplesPerMSec);
2880 delayInSamples_L = newDelayInSamples_L;
2881 delayInSamples_R = newDelayInSamples_R;
2883 else if (parameters.
updateType == delayUpdateType::kLeftPlusRatio)
2890 double newDelayInSamples = parameters.
leftDelay_mSec*(samplesPerMSec);
2893 delayInSamples_L = newDelayInSamples;
2894 delayInSamples_R = delayInSamples_L*delayRatio;
2902 bufferLength_mSec = _bufferLength_mSec;
2903 sampleRate = _sampleRate;
2904 samplesPerMSec = sampleRate / 1000.0;
2907 bufferLength = (
unsigned int)(bufferLength_mSec*(samplesPerMSec)) + 1;
2917 double sampleRate = 0.0;
2918 double samplesPerMSec = 0.0;
2919 double delayInSamples_L = 0.0;
2920 double delayInSamples_R = 0.0;
2921 double bufferLength_mSec = 0.0;
2922 unsigned int bufferLength = 0;
2923 double wetMix = 0.707;
2924 double dryMix = 0.707;
2964 if (
this == ¶ms)
2998 LFO() { srand((uint32_t)time(NULL)); }
3052 if (
phaseInc > 0 && moduloCounter >= 1.0)
3054 moduloCounter -= 1.0;
3059 if (
phaseInc < 0 && moduloCounter <= 0.0)
3061 moduloCounter += 1.0;
3075 if (
phaseInc > 0 && moduloCounter >= 1.0)
3077 moduloCounter -= 1.0;
3082 if (
phaseInc < 0 && moduloCounter <= 0.0)
3084 moduloCounter += 1.0;
3094 const double B = 4.0 /
kPi;
3095 const double C = -4.0 / (
kPi*
kPi);
3096 const double P = 0.225;
3100 double y = B * angle + C * angle * fabs(angle);
3101 y = P * (y * fabs(y) - y) + y;
3165 memset(&
stateArray[0], 0,
sizeof(
double)*numDFOStates);
3225 double n = wnT1 / wT;
3291 if (
this == ¶ms)
3337 delay.
reset(_sampleRate);
3341 lfo.
reset(_sampleRate);
3343 params.
waveform = generatorWaveform::kTriangle;
3356 float input = (float)xn;
3368 uint32_t inputChannels,
3369 uint32_t outputChannels)
3372 if (inputChannels == 0 || outputChannels == 0)
3380 double minDelay_mSec = 0.0;
3381 double maxDepth_mSec = 0.0;
3384 if (parameters.
algorithm == modDelaylgorithm::kFlanger)
3386 minDelay_mSec = 0.1;
3387 maxDepth_mSec = 7.0;
3391 if (parameters.
algorithm == modDelaylgorithm::kChorus)
3393 minDelay_mSec = 10.0;
3394 maxDepth_mSec = 30.0;
3399 if (parameters.
algorithm == modDelaylgorithm::kVibrato)
3401 minDelay_mSec = 0.0;
3402 maxDepth_mSec = 7.0;
3410 double modulationMin = minDelay_mSec;
3411 double modulationMax = minDelay_mSec + maxDepth_mSec;
3414 if (parameters.
algorithm == modDelaylgorithm::kFlanger)
3416 modulationMin, modulationMax);
3428 return delay.
processAudioFrame(inputFrame, outputFrame, inputChannels, outputChannels);
3444 parameters = _parameters;
3448 if (parameters.
algorithm == modDelaylgorithm::kVibrato)
3449 lfoParams.
waveform = generatorWaveform::kSin;
3451 lfoParams.
waveform = generatorWaveform::kTriangle;
3483 if (
this == ¶ms)
3501 const unsigned int PHASER_STAGES = 6;
3523 const double apf0_minF = 32.0;
3524 const double apf0_maxF = 1500.0;
3526 const double apf1_minF = 68.0;
3527 const double apf1_maxF = 3400.0;
3529 const double apf2_minF = 96.0;
3530 const double apf2_maxF = 4800.0;
3532 const double apf3_minF = 212.0;
3533 const double apf3_maxF = 10000.0;
3535 const double apf4_minF = 320.0;
3536 const double apf4_maxF = 16000.0;
3538 const double apf5_minF = 636.0;
3539 const double apf5_maxF = 20480.0;
3563 lfoparams.
waveform = generatorWaveform::kTriangle;
3568 params.
algorithm = filterAlgorithm::kAPF1;
3571 for (uint32_t i = 0; i < PHASER_STAGES; i++)
3587 for (uint32_t i = 0; i < PHASER_STAGES; i++){
3609 double modulatorValue = lfoValue*depth;
3646 double alpha0 = 1.0 / (1.0 + K*gamma6);
3652 double u = alpha0*(xn + K*Sn);
3669 double output = 0.125*xn + 1.25*APF6;
3723 if (
this == ¶ms)
3771 return simpleLPFParameters;
3780 simpleLPFParameters = params;
3790 double g = simpleLPFParameters.
g;
3791 double yn = (1.0 - g)*xn + g*state;
3821 if (
this == ¶ms)
3866 if (sampleRate == _sampleRate)
3885 return simpleDelayParameters;
3894 simpleDelayParameters = params;
3926 bufferLength_mSec = _bufferLength_mSec;
3927 sampleRate = _sampleRate;
3928 samplesPerMSec = sampleRate / 1000.0;
3931 bufferLength = (
unsigned int)(bufferLength_mSec*(samplesPerMSec)) + 1;
3948 double _delay_Samples = _delay_mSec*(samplesPerMSec);
3951 return delayBuffer.
readBuffer(_delay_Samples);
3971 double sampleRate = 0.0;
3972 double samplesPerMSec = 0.0;
3973 double bufferLength_mSec = 0.0;
3974 unsigned int bufferLength = 0;
3998 if (
this == ¶ms)
4068 double g2 = lpf_g*(1.0 - comb_g);
4069 double filteredSignal = yn + g2*lpf_state;
4070 input = xn + comb_g*(filteredSignal);
4071 lpf_state = filteredSignal;
4075 input = xn + comb_g*yn;
4093 return combFilterParameters;
4102 combFilterParameters = params;
4111 double exponent = -3.0*delayParams.
delay_Samples*(1.0 / sampleRate);
4112 double rt60_mSec = combFilterParameters.
RT60Time_mSec / 1000.0;
4113 comb_g = pow(10.0, exponent / rt60_mSec);
4116 lpf_g = combFilterParameters.
lpf_g;
4122 sampleRate = _sampleRate;
4123 bufferLength_mSec = delay_mSec;
4131 double sampleRate = 0.0;
4132 double comb_g = 0.0;
4133 double bufferLength_mSec = 0.0;
4137 double lpf_state = 0.0;
4160 if (
this == ¶ms)
4250 minDelay = fmax(0.0, minDelay);
4255 minDelay, maxDelay);
4267 wnD = wnD*(1.0 - lpf_g) + lpf_g*
lpf_state;
4272 double wn = xn + apf_g*wnD;
4275 double yn = -apf_g*wn + wnD;
4356 if (
this == ¶ms)
4420 nestedAPF.
reset(_sampleRate);
4448 minDelay = fmax(0.0, minDelay);
4454 minDelay, maxDelay);
4466 wnD = wnD*(1.0 - lpf_g) + lpf_g*
lpf_state;
4471 double wn = xn + apf_g*wnD;
4477 double yn = -apf_g*wn + wnD;
4500 nestedAPFParameters = params;
4555 if (
this == ¶ms)
4595 params.
algorithm = filterAlgorithm::kLowShelf;
4599 params.
algorithm = filterAlgorithm::kHiShelf;
4608 lowShelfFilter.
reset(_sampleRate);
4609 highShelfFilter.
reset(_sampleRate);
4627 return filteredSignal;
4645 parameters = params;
4695 if (
this == ¶ms)
4746 const unsigned int NUM_BRANCHES = 4;
4747 const unsigned int NUM_CHANNELS = 2;
4776 sampleRate = _sampleRate;
4779 preDelay.
reset(_sampleRate);
4782 for (uint32_t i = 0; i < NUM_BRANCHES; i++)
4784 branchDelays[i].
reset(_sampleRate);
4787 branchNestedAPFs[i].
reset(_sampleRate);
4790 branchLPFs[i].
reset(_sampleRate);
4792 for (uint32_t i = 0; i < NUM_CHANNELS; i++)
4794 shelvingFilters[i].
reset(_sampleRate);
4810 float inputs[2] = { 0.0, 0.0 };
4811 float outputs[2] = { 0.0, 0.0 };
4819 uint32_t inputChannels,
4820 uint32_t outputChannels)
4823 double globFB = branchDelays[NUM_BRANCHES-1].
readDelay();
4826 double fb = parameters.
kRT*(globFB);
4829 double xnL = inputFrame[0];
4830 double xnR = inputChannels > 1 ? inputFrame[1] : 0.0;
4831 double monoXn = double(1.0 / inputChannels)*xnL + double(1.0 / inputChannels)*xnR;
4837 double input = preDelayOut + fb;
4838 for (uint32_t i = 0; i < NUM_BRANCHES; i++)
4843 input = delayOut + preDelayOut;
4855 double weight = 0.707;
4869 if (parameters.
density == reverbDensity::kThick)
4887 double dry = pow(10.0, parameters.
dryLevel_dB / 20.0);
4888 double wet = pow(10.0, parameters.
wetLevel_dB / 20.0);
4890 if (outputChannels == 1)
4891 outputFrame[0] = (float)(dry*xnL + wet*(0.5*tankOutL + 0.5*tankOutR));
4894 outputFrame[0] = (float)(dry*xnL + wet*tankOutL);
4895 outputFrame[1] = (float)(dry*xnR + wet*tankOutR);
4926 lpfParams.
g = params.
lpf_g;
4928 for (uint32_t i = 0; i < NUM_BRANCHES; i++)
4952 for (uint32_t i = 0; i < NUM_BRANCHES; i++)
4971 delayParams.
delayTime_mSec = globalFixedMaxDelay*fixedDelayWeight[i];
4976 parameters = params;
4991 double apfDelayWeight[NUM_BRANCHES * 2] = { 0.317, 0.873, 0.477, 0.291, 0.993, 0.757, 0.179, 0.575 };
4992 double fixedDelayWeight[NUM_BRANCHES] = { 1.0, 0.873, 0.707, 0.667 };
4993 double sampleRate = 0.0;
5055 double output_dB = 0.0;
5058 bool softknee =
true;
5059 double kneeWidth_dB = 10.0;
5066 output_dB = detect_dB;
5076 output_dB = detect_dB;
5078 else if (2.0*(fabs(detect_dB -
threshold_dB)) <= kneeWidth_dB)
5079 output_dB = detect_dB - pow((detect_dB -
threshold_dB + (kneeWidth_dB / 2.0)), 2.0) / (2.0*kneeWidth_dB);
5081 else if (2.0*(detect_dB -
threshold_dB) > kneeWidth_dB)
5086 return pow(10.0, (output_dB - detect_dB) / 20.0);
5116 kLPF1, kHPF1, kAPF1, kSVF_LP, kSVF_HP, kSVF_BP, kSVF_BS
5137 if (
this == ¶ms)
5243 double halfPeak_dBGain =
dB2Raw(-peak_dB / 2.0);
5244 xn *= halfPeak_dBGain;
5265 double hpf = xn - lpf;
5268 double apf = lpf - hpf;
5274 if (matchAnalogNyquistLPF)
5275 return lpf +
alpha*hpf;
5300 double bsf = hpf + lpf;
5314 if (matchAnalogNyquistLPF)
5316 return filterOutputGain*lpf;
5319 return filterOutputGain*hpf;
5321 return filterOutputGain*bpf;
5323 return filterOutputGain*bsf;
5326 return filterOutputGain*lpf;
5340 double wa = (2.0 / T)*tan(wd*T / 2.0);
5341 double g = wa*T / 2.0;
5349 alpha = g / (1.0 + g);
5355 alpha0 = 1.0 / (1.0 + 2.0*R*g + g*g);
5407 if (
this == ¶ms)
5454 filterParams.
fc = 1000.0;
5464 adParams.
detectMode = TLD_AUDIO_DETECT_MODE_RMS;
5497 filterParams.
fc = params.
fc;
5498 filterParams.
Q = params.
Q;
5528 double detectValue = pow(10.0, detect_dB / 20.0);
5529 double deltaValue = detectValue - threshValue;
5535 if (deltaValue > 0.0)
5538 double modulatorValue = 0.0;
5594 if (
this == ¶ms)
5652 params.
algorithm = filterAlgorithm::kHPF1;
5656 params.
algorithm = filterAlgorithm::kLowShelf;
5688 filterParams.
algorithm = filterAlgorithm::kHPF1;
5692 filterParams.
algorithm = filterAlgorithm::kLowShelf;
5709 double output = 0.0;
5742 const unsigned int NUM_TUBES = 4;
5761 if (
this == ¶ms)
5826 tubeParams.
waveshaper = distortionModel::kFuzzAsym;
5828 for (uint32_t i = 0; i < NUM_TUBES; i++)
5873 for (uint32_t i = 0; i < NUM_TUBES; i++)
5925 if (
this == ¶ms)
5960 virtual bool reset(
double _sampleRate){
return true; }
5991 return QL*(int(xn /
QL));
6032 virtual void setInput1(
double _in1) = 0;
6035 virtual void setInput2(
double _in2) = 0;
6038 virtual void setInput3(
double _in3) = 0;
6050 virtual void reset(
double _sampleRate) {}
6339 WdfSeriesLC(
double _componentValue_L,
double _componentValue_C)
6401 double YC = 1.0 /
RC;
6402 double K = (1.0 -
RL*YC) / (1.0 +
RL*YC);
6459 WdfParallelLC(
double _componentValue_L,
double _componentValue_C)
6521 double YL = 1.0 /
RL;
6522 double K = (YL*
RC - 1.0) / (YL*
RC + 1.0);
6580 WdfSeriesRL(
double _componentValue_R,
double _componentValue_L)
6703 WdfParallelRL(
double _componentValue_R,
double _componentValue_L)
6827 WdfSeriesRC(
double _componentValue_R,
double _componentValue_C)
6950 WdfParallelRC(
double _componentValue_R,
double _componentValue_C)
7074 enum class wdfComponent { R, L, C, seriesLC, parallelLC, seriesRL, parallelRL, seriesRC, parallelRC };
7176 if (componentType == wdfComponent::R)
7182 else if (componentType == wdfComponent::L)
7188 else if (componentType == wdfComponent::C)
7194 else if (componentType == wdfComponent::seriesLC)
7200 else if (componentType == wdfComponent::parallelLC)
7206 else if (componentType == wdfComponent::seriesRL)
7212 else if (componentType == wdfComponent::parallelRL)
7218 else if (componentType == wdfComponent::seriesRC)
7224 else if (componentType == wdfComponent::parallelRC)
7256 wdfComponent->setComponentValue_LC(componentValue_L, componentValue_C);
7263 wdfComponent->setComponentValue_RL(componentValue_R, componentValue_L);
7270 wdfComponent->setComponentValue_RC(componentValue_R, componentValue_C);
7336 double componentResistance = 0.0;
7340 R2 =
R1 + componentResistance;
7350 double componentResistance = 0.0;
7355 B =
R1 / (
R1 + componentResistance);
7362 R3 = componentResistance;
7444 double componentResistance = 0.0;
7448 R2 =
R1 + componentResistance;
7458 double componentResistance = 0.0;
7470 R3 = componentResistance;
7483 double N3 =
in1 + N2;
7546 double componentConductance = 0.0;
7551 R2 = 1.0 / ((1.0 /
R1) + componentConductance);
7561 double G1 = 1.0 /
R1;
7562 double componentConductance = 0.0;
7567 A = G1 / (G1 + componentConductance);
7574 R3 = 1.0/ componentConductance;
7603 N1 =
in2 - A*(-
in1 + N2);
7656 double componentConductance = 0.0;
7661 R2 = 1.0 / ((1.0 /
R1) + componentConductance);
7671 double G1 = 1.0 /
R1;
7676 double componentConductance = 0.0;
7680 A1 = 2.0*G1 / (G1 + componentConductance + G2);
7688 R3 = 1.0 / componentConductance;
7702 N1 = -A1*(-
in1 + N2) + N2 - A3*N2;
7827 double L1_value = 95.49e-3;
7828 double C1_value = 0.5305e-6;
7829 double L2_value = 95.49e-3;
7938 fc_Hz = fc_Hz*(tan(arg) / arg);
7952 double L1_norm = 95.493;
7953 double C1_norm = 530.516e-6;
7954 double L2_norm = 95.493;
8163 if (
this == ¶ms)
8206 sampleRate = _sampleRate;
8279 double arg = (
kPi*fc_Hz) / sampleRate;
8280 fc_Hz = fc_Hz*(tan(arg) / arg);
8283 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8284 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8298 double sampleRate = 1.0;
8401 fc_Hz = fc_Hz*(tan(arg) / arg);
8404 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8405 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8450 sampleRate = _sampleRate;
8522 double arg = (
kPi*fc_Hz) / sampleRate;
8523 fc_Hz = fc_Hz*(tan(arg) / arg);
8526 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8527 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8542 double sampleRate = 1.0;
8645 fc_Hz = fc_Hz*(tan(arg) / arg);
8648 double inductorValue = 1.0 / (1.0e-6 * pow((2.0*
kPi*fc_Hz), 2.0));
8649 double resistorValue = (1.0 /
wdfParameters.
Q)*(pow(inductorValue / 1.0e-6, 0.5));
8685 enum class windowType {kNoWindow, kRectWindow, kHannWindow, kBlackmanHarrisWindow, kHammingWindow };
8697 inline std::unique_ptr<double[]>
makeWindow(
unsigned int windowLength,
unsigned int hopSize,
windowType window,
double& gainCorrectionValue)
8699 std::unique_ptr<double[]> windowBuffer;
8700 windowBuffer.reset(
new double[windowLength]);
8702 if (!windowBuffer)
return nullptr;
8704 double overlap = hopSize > 0.0 ? 1.0 - (double)hopSize / (
double)windowLength : 0.0;
8705 gainCorrectionValue = 0.0;
8707 for (uint32_t n = 0; n < windowLength; n++)
8709 if (window == windowType::kRectWindow)
8711 if (n >= 1 && n <= windowLength - 1)
8712 windowBuffer[n] = 1.0;
8714 else if (window == windowType::kHammingWindow)
8716 windowBuffer[n] = 0.54 - 0.46*cos((n*2.0*
kPi) / (windowLength));
8718 else if (window == windowType::kHannWindow)
8720 windowBuffer[n] = 0.5 * (1 - cos((n*2.0*
kPi) / (windowLength)));
8722 else if (window == windowType::kBlackmanHarrisWindow)
8724 windowBuffer[n] = (0.42323 - (0.49755*cos((n*2.0*
kPi) / (windowLength))) + 0.07922*cos((2 * n*2.0*
kPi) / (windowLength)));
8726 else if (window == windowType::kNoWindow)
8728 windowBuffer[n] = 1.0;
8731 gainCorrectionValue += windowBuffer[n];
8735 if (window != windowType::kNoWindow)
8736 gainCorrectionValue = (1.0 - overlap) / gainCorrectionValue;
8738 gainCorrectionValue = 1.0 / gainCorrectionValue;
8740 return windowBuffer;
8780 fftw_complex*
doFFT(
double* inputReal,
double* inputImag =
nullptr);
8783 fftw_complex*
doInverseFFT(
double* inputReal,
double* inputImag);
8859 void doOverlapAdd(
double* outputData =
nullptr,
int length = 0);
8991 if (!irBuffer)
return;
9009 for (uint32_t i = 0; i < 2; i++)
9021 bool fftReady =
false;
9022 double output = 0.0;
9047 signalFFT[i][0] = product.
real;
9048 signalFFT[i][1] = product.
imag;
9080 const unsigned int PSM_FFT_LEN = 4096;
9101 if (
this == ¶ms)
9155 if (
this == ¶ms)
9204 memset(&
phi[0], 0,
sizeof(
double)*PSM_FFT_LEN);
9205 memset(&
psi[0], 0,
sizeof(
double)* PSM_FFT_LEN);
9209 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9228 double newAlpha = pow(2.0, semitones / 12.0);
9229 double newOutputBufferLength = round((1.0/newAlpha)*(
double)PSM_FFT_LEN);
9266 int previousPeak = -1;
9267 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9273 if (dist > PSM_FFT_LEN/4)
9281 else if (dist < delta)
9288 return previousPeak;
9297 double localWindow[4] = { 0.0, 0.0, 0.0, 0.0 };
9299 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9303 localWindow[0] = 0.0;
9304 localWindow[1] = 0.0;
9310 localWindow[0] = 0.0;
9315 else if (i == PSM_FFT_LEN - 1)
9319 localWindow[2] = 0.0;
9320 localWindow[3] = 0.0;
9322 else if (i == PSM_FFT_LEN - 2)
9327 localWindow[3] = 0.0;
9338 if (
binData[i].magnitude > 0.00001 &&
9339 binData[i].magnitude > localWindow[0]
9340 &&
binData[i].magnitude > localWindow[1]
9341 &&
binData[i].magnitude > localWindow[2]
9342 &&
binData[i].magnitude > localWindow[3])
9361 int midBoundary = (nextPeak - (double)bossPeakBin) / 2.0 + bossPeakBin;
9365 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9367 if (i <= bossPeakBin)
9371 else if (i < midBoundary)
9377 bossPeakBin = nextPeak;
9379 if (nextPeak > bossPeakBin)
9380 midBoundary = (nextPeak - (double)bossPeakBin) / 2.0 + bossPeakBin;
9382 midBoundary = PSM_FFT_LEN;
9398 bool fftReady =
false;
9399 double output = 0.0;
9413 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9430 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9438 double omega_k =
kTwoPi*i / PSM_FFT_LEN;
9442 double phaseDev = phi_k -
phi[i] - omega_k*
ha;
9454 if(
binData[i].previousPeakBin < 0)
9468 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9486 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9491 fftData[i][0] = mag_k*cos(
binData[i].updatedPhase);
9492 fftData[i][1] = mag_k*sin(
binData[i].updatedPhase);
9503 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9505 double mag_k =
getMagnitude(fftData[i][0], fftData[i][1]);
9506 double phi_k =
getPhase(fftData[i][0], fftData[i][1]);
9511 double omega_k =
kTwoPi*i / PSM_FFT_LEN;
9515 double phaseDev = phi_k -
phi[i] - omega_k*
ha;
9527 fftData[i][0] = mag_k*cos(
psi[i]);
9528 fftData[i][1] = mag_k*sin(
psi[i]);
9540 double ifft[PSM_FFT_LEN] = { 0.0 };
9541 for (uint32_t i = 0; i < PSM_FFT_LEN; i++)
9542 ifft[i] = inv_fftData[i][0];
9584 const double hs = PSM_FFT_LEN / 4;
9585 double ha = PSM_FFT_LEN / 4;
9586 double phi[PSM_FFT_LEN] = { 0.0 };
9587 double psi[PSM_FFT_LEN] = { 0.0 };
9619 const unsigned int maxSamplingRatio = 4;
9632 if (ratio == rateConversionRatio::k2x)
9634 else if (ratio == rateConversionRatio::k4x || ratio == rateConversionRatio::k4x)
9655 if (sampleRate != 44100 && sampleRate != 48000)
return nullptr;
9658 if (ratio == rateConversionRatio::k2x)
9660 if (sampleRate == 44100)
9662 if (FIRLength == 128)
9663 return &LPF128_882[0];
9664 else if (FIRLength == 256)
9665 return &LPF256_882[0];
9666 else if (FIRLength == 512)
9667 return &LPF512_882[0];
9668 else if (FIRLength == 1024)
9669 return &LPF1024_882[0];
9671 if (sampleRate == 48000)
9673 if (FIRLength == 128)
9674 return &LPF128_96[0];
9675 else if (FIRLength == 256)
9676 return &LPF256_96[0];
9677 else if (FIRLength == 512)
9678 return &LPF512_96[0];
9679 else if (FIRLength == 1024)
9680 return &LPF1024_96[0];
9685 if (ratio == rateConversionRatio::k4x)
9687 if (sampleRate == 44100)
9689 if (FIRLength == 128)
9690 return &LPF128_1764[0];
9691 else if (FIRLength == 256)
9692 return &LPF256_1764[0];
9693 else if (FIRLength == 512)
9694 return &LPF512_1764[0];
9695 else if (FIRLength == 1024)
9696 return &LPF1024_1764[0];
9698 if (sampleRate == 48000)
9700 if (FIRLength == 128)
9701 return &LPF128_192[0];
9702 else if (FIRLength == 256)
9703 return &LPF256_192[0];
9704 else if (FIRLength == 512)
9705 return &LPF512_192[0];
9706 else if (FIRLength == 1024)
9707 return &LPF1024_192[0];
9725 inline double**
decomposeFilter(
double* filterIR,
unsigned int FIRLength,
unsigned int ratio)
9727 unsigned int subBandLength = FIRLength / ratio;
9728 double ** polyFilterSet =
new double*[ratio];
9729 for (
unsigned int i = 0; i < ratio; i++)
9731 double* polyFilter =
new double[subBandLength];
9732 polyFilterSet[i] = polyFilter;
9736 for (uint32_t i = 0; i < subBandLength; i++)
9738 for (
int j = ratio - 1; j >= 0; j--)
9740 double* polyFilter = polyFilterSet[j];
9741 polyFilter[i] = filterIR[m++];
9745 return polyFilterSet;
9762 double audioData[maxSamplingRatio] = { 0.0, 0.0, 0.0, 0.0 };
9804 unsigned int subBandLength =
FIRLength / count;
9811 if (!filterTable)
return;
9818 if (!polyPhaseFilters)
9825 for (
unsigned int i = 0; i < count; i++)
9829 delete[] polyPhaseFilters[i];
9832 delete[] polyPhaseFilters;
9842 output.
count = count;
9845 double ampCorrection = double(count);
9849 for (
unsigned int i = 0; i < count; i++)
9887 double audioData[maxSamplingRatio] = { 0.0, 0.0, 0.0, 0.0 };
9929 unsigned int subBandLength =
FIRLength / count;
9936 if (!filterTable)
return;
9943 if (!polyPhaseFilters)
9950 for (
unsigned int i = 0; i < count; i++)
9954 delete[] polyPhaseFilters[i];
9957 delete[] polyPhaseFilters;
9966 double output = 0.0;
9969 for (
unsigned int i = 0; i < count; i++)
virtual void setComponentValue_RC(double _componentValue_R, double _componentValue_C)
Definition: fxobjects.h:6857
DFOscillatorStates
Use this non-typed enum to easily access the direct form oscillator state registers.
Definition: fxobjects.h:3134
rateConversionRatio ratio
conversion ration
Definition: fxobjects.h:9986
EnvelopeFollowerParameters parameters
object parameters
Definition: fxobjects.h:5555
virtual void setComponentValue_RL(double _componentValue_R, double _componentValue_L)
Definition: fxobjects.h:6734
virtual double getOutput()
Definition: fxobjects.h:6215
double componentValue_L
component value L
Definition: fxobjects.h:6676
double preDelayTime_mSec
pre-delay time in mSec
Definition: fxobjects.h:4732
Custom parameter structure for the LFO and DFOscillator objects.
Definition: fxobjects.h:2958
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6153
unsigned int getFrameLength()
Definition: fxobjects.h:9065
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:612
Custom parameter structure for the ModulatedDelay object.
Definition: fxobjects.h:3285
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5815
void createWDF()
Definition: fxobjects.h:8602
SimpleDelay delay
delay
Definition: fxobjects.h:4329
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8570
void setImpulseResponse(double *irArray, unsigned int lengthPowerOfTwo)
Definition: fxobjects.h:2465
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5885
bool frequencyWarping
enable frequency warping
Definition: fxobjects.h:8177
unsigned int getFilterIRLength()
Definition: fxobjects.h:9068
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:644
virtual double getComponentConductance()
Definition: fxobjects.h:6110
void setParameters(const ReverbTankParameters ¶ms)
Definition: fxobjects.h:4911
fftw_complex * fft_result
array for FFT output
Definition: fxobjects.h:8878
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6396
The WdfAdaptorBase object acts as the base class for all WDF Adaptors; the static members allow for s...
Definition: fxobjects.h:7136
double f_High
brickwall f_high
Definition: fxobjects.h:575
virtual double getComponentResistance()
Definition: fxobjects.h:6269
virtual double getOutput1()
Definition: fxobjects.h:6654
virtual double getOutput2()
Definition: fxobjects.h:6221
vaFilterAlgorithm
Use this strongly typed enum to easily set the virtual analog filter algorithm.
Definition: fxobjects.h:5115
double windowCorrection
window correction value
Definition: fxobjects.h:9598
virtual double getOutput3()
Definition: fxobjects.h:6906
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4287
virtual double getOutput3()
Definition: fxobjects.h:6418
void setParameters(const SimpleDelayParameters ¶ms)
Definition: fxobjects.h:3892
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:8697
double zRegister_L
storage register for L
Definition: fxobjects.h:6795
TwoBandShelvingFilterParameters & operator=(const TwoBandShelvingFilterParameters ¶ms)
Definition: fxobjects.h:4553
PSMVocoderParameters parameters
object parameters
Definition: fxobjects.h:9579
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6237
virtual void setInput(double in)
Definition: fxobjects.h:6888
SimpleLPFParameters & operator=(const SimpleLPFParameters ¶ms)
Definition: fxobjects.h:3721
void setBeta(double _beta)
Definition: fxobjects.h:5366
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:6312
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:9797
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6278
double RL
RL value.
Definition: fxobjects.h:7048
AudioFilterParameters & operator=(const AudioFilterParameters ¶ms)
Definition: fxobjects.h:1484
virtual void setInput3(double _in3)
Definition: fxobjects.h:7723
double L
value of L component
Definition: fxobjects.h:7118
void setOpenTerminalResistance(bool _openTerminalResistance=true)
Definition: fxobjects.h:7146
double processAudioSample(double input)
Definition: fxobjects.h:9019
double audioData[maxSamplingRatio]
array of interpolated output samples
Definition: fxobjects.h:9762
wdfComponent componentType
selected component type
Definition: fxobjects.h:7120
bool interpolate
interpolate flag (diagnostics)
Definition: fxobjects.h:4180
fftw_complex * filterFFT
filterFFT output arrays
Definition: fxobjects.h:9073
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:8891
virtual double getOutput3()
Definition: fxobjects.h:6141
Custom parameter structure for the PhaseShifter object.
Definition: fxobjects.h:3477
AudioFilter apf[PHASER_STAGES]
six APF objects
Definition: fxobjects.h:3702
double sensitivity
detector sensitivity
Definition: fxobjects.h:5426
double RR
RR value.
Definition: fxobjects.h:6804
void setParameters(const DynamicsProcessorParameters &_parameters)
Definition: fxobjects.h:2087
Structure to hold a complex value.
Definition: fxobjects.h:473
double highShelfBoostCut_dB
high shelf gain
Definition: fxobjects.h:4569
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6742
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6806
double readDelay()
Definition: fxobjects.h:3938
double sampleRate
sample rate
Definition: fxobjects.h:3041
ModulatedDelayParameters getParameters()
Definition: fxobjects.h:3435
virtual double getComponentValue_R()
Definition: fxobjects.h:6759
generatorWaveform
Use this strongly typed enum to easily set the oscillator waveform.
Definition: fxobjects.h:2945
InterpolatorOutput interpolateAudio(double xn)
Definition: fxobjects.h:9836
void setParameters(AudioDelayParameters _parameters)
Definition: fxobjects.h:2860
double lowShelfBoostCut_dB
low shelf gain
Definition: fxobjects.h:4737
ZVAFilter filter
filter to modulate
Definition: fxobjects.h:5558
virtual double getComponentResistance()
Definition: fxobjects.h:6187
void setParameters(ModulatedDelayParameters _parameters)
Definition: fxobjects.h:3441
filterAlgorithm
Use this strongly typed enum to easily set the filter algorithm for the AudioFilter object or any oth...
Definition: fxobjects.h:1461
ClassATubePreParameters & operator=(const ClassATubePreParameters ¶ms)
Definition: fxobjects.h:5759
TriodeClassAParameters getParameters()
Definition: fxobjects.h:5677
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1176
double RL
RL value.
Definition: fxobjects.h:6925
virtual double getOutput1()
Definition: fxobjects.h:6777
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L2
adaptor for L2
Definition: fxobjects.h:7950
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6618
Custom parameter structure for the Biquad object. Default version defines the biquad structure used i...
Definition: fxobjects.h:1335
double fc
filter fc
Definition: fxobjects.h:5421
double componentValue_R
component value R
Definition: fxobjects.h:6922
virtual void setInput3(double _in3)
Definition: fxobjects.h:6233
double out2
stored port 2 output; it is y(n) for this library
Definition: fxobjects.h:7305
double Q
filter Q
Definition: fxobjects.h:1499
virtual void setInput3(double _in3)
Definition: fxobjects.h:7038
unsigned int getHopSize()
Definition: fxobjects.h:8865
double alphaStretchRatio
alpha stretch ratio = hs/ha
Definition: fxobjects.h:9581
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3797
double highShelfBoostCut_dB
high shelf gain
Definition: fxobjects.h:4739
virtual void setInput2(double _in2)
Definition: fxobjects.h:6309
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3599
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:4676
double parabolicSine(double angle)
Definition: fxobjects.h:3098
WdfSeriesAdaptor seriesAdaptor_L1C1
adaptor for L1 and C1
Definition: fxobjects.h:8135
LFO lfo
the one and only LFO
Definition: fxobjects.h:3703
virtual void updateComponentResistance()
Definition: fxobjects.h:6848
double overlap
overlap as raw value (75% = 0.75)
Definition: fxobjects.h:8915
virtual double getOutput1()=0
double getS_value()
returns the storage component S(n) for delay-free loop solutions
Definition: fxobjects.cpp:32
The ImpulseConvolver object implements a linear conovlver. NOTE: compile in Release mode or you may e...
Definition: fxobjects.h:2407
double alpha
alpha is (wcT/2)
Definition: fxobjects.h:5380
virtual void updateComponentResistance()
Definition: fxobjects.h:6601
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:2773
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8339
The DelayAPF object implements a delaying APF with optional LPF and optional modulated delay time wit...
Definition: fxobjects.h:4205
bool invertOutput
invertOutput - triodes invert output
Definition: fxobjects.h:5620
The WdfSeriesRL object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6576
T readBuffer(unsigned int index)
Definition: fxobjects.h:2265
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5047
unsigned int wrapMask
input wrap mask
Definition: fxobjects.h:8895
double sampleRate
sample rate storage
Definition: fxobjects.h:8421
double bipolarToUnipolar(double value)
calculates the unipolar [0.0, +1.0] value FROM a bipolar [-1.0, +1.0] value
Definition: fxobjects.h:259
void initialize(unsigned int _frameLength, unsigned int _hopSize, windowType _window)
initialize the Fast FFT object for operation
Definition: fxobjects.cpp:1251
virtual double getOutput2()=0
double highShelf_fc
HSF shelf frequency.
Definition: fxobjects.h:5786
virtual double getOutput2()
Definition: fxobjects.h:6903
double tanhWaveShaper(double xn, double saturation)
calculates hyptan waveshaper
Definition: fxobjects.h:402
void setParameters(const ClassATubePreParameters ¶ms)
Definition: fxobjects.h:5849
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_L
adaptor for L
Definition: fxobjects.h:8419
bool enablePeakTracking
flag to enable peak tracking
Definition: fxobjects.h:9168
The LFO object implements a mathematically perfect LFO generator for modulation uses only...
Definition: fxobjects.h:2995
virtual double getOutput2()
Definition: fxobjects.h:7729
virtual void updateComponentResistance()
Definition: fxobjects.h:6724
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1385
double saturation
input level in dB
Definition: fxobjects.h:5779
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:4010
virtual void setInput(double in)
Definition: fxobjects.h:7011
double QL
the quantization level
Definition: fxobjects.h:5996
The PeakLimiter object implements a simple peak limiter; it is really a simplified and hard-wired ver...
Definition: fxobjects.h:5016
WdfSeriesAdaptor seriesAdaptor_RC
adaptor for RC
Definition: fxobjects.h:8418
double fc
filter fc
Definition: fxobjects.h:2523
double sampleRate
sample rate
Definition: fxobjects.h:6559
virtual double getComponentResistance()
Definition: fxobjects.h:6965
double boostCut_dB
filter gain; note not used in all types
Definition: fxobjects.h:1500
const double hs
hs = N/4 — 75% overlap
Definition: fxobjects.h:9584
The EnvelopeFollower object implements a traditional envelope follower effect modulating a LPR fc val...
Definition: fxobjects.h:5447
virtual void setInput1(double _in1)
Definition: fxobjects.h:6306
virtual double getOutput3()
Definition: fxobjects.h:7732
double inputLevel_dB
input level in dB
Definition: fxobjects.h:5778
double sampleRate
stored sample rate
Definition: fxobjects.h:1944
fftw_complex * getIFFTData()
Definition: fxobjects.h:8853
double lpf_g
LPF g coefficient.
Definition: fxobjects.h:4733
void setParameters(const TwoBandShelvingFilterParameters ¶ms)
Definition: fxobjects.h:4643
double zRegister_L
storage register for L
Definition: fxobjects.h:6672
double magnitude
bin magnitude angle
Definition: fxobjects.h:9130
void setParameters(const AudioDetectorParameters ¶meters)
Definition: fxobjects.h:1917
virtual double getComponentValue_R()
Definition: fxobjects.h:6879
virtual void updateComponentResistance()
Definition: fxobjects.h:6971
double lpf_state
LPF state register (z^-1)
Definition: fxobjects.h:4335
void flushBuffer()
Definition: fxobjects.h:2301
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8006
void destroyFFTW()
destroys the FFTW arrays and plans.
Definition: fxobjects.cpp:1051
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1839
virtual double getComponentConductance()
Definition: fxobjects.h:6357
double zRegister_C
storage register for C
Definition: fxobjects.h:7042
double dB2Raw(double dB)
converts dB to raw value
Definition: fxobjects.h:287
void setParameters(const PhaseShifterParameters ¶ms)
Definition: fxobjects.h:3687
virtual double processAuxInputAudioSample(double xn)
Definition: fxobjects.h:1183
double componentValue_L
component value L
Definition: fxobjects.h:6799
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4059
void setParameters(const PSMVocoderParameters ¶ms)
Definition: fxobjects.h:9567
virtual void setInput(double in)
Definition: fxobjects.h:6212
double RC
RC value.
Definition: fxobjects.h:6803
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6995
double RL
RL value.
Definition: fxobjects.h:6802
double RC
RC value.
Definition: fxobjects.h:6680
The WdfSeriesTerminatedAdaptor object implements the series terminated (non-reflection-free) adaptor...
Definition: fxobjects.h:7435
AudioDetector detector
detector to track input signal
Definition: fxobjects.h:5559
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5473
double componentValue_C
component value C
Definition: fxobjects.h:6923
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7880
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8632
Custom parameter structure calculating analog magnitude response arrays with calculateAnalogMagArray(...
Definition: fxobjects.h:833
bool advanceAndCheckWrapModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3069
biquadAlgorithm biquadCalcType
biquad structure to use
Definition: fxobjects.h:1349
virtual double getOutput3()
Definition: fxobjects.h:6303
WdfParallelAdaptor parallelAdaptor_C1
adaptor for C1
Definition: fxobjects.h:7949
void createWDF()
Definition: fxobjects.h:8106
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8346
unsigned int countForRatio(rateConversionRatio ratio)
returns the up or downsample ratio as a numeric value
Definition: fxobjects.h:9630
WDFParameters getParameters()
Definition: fxobjects.h:8261
The WdfParallelTerminatedAdaptor object implements the parallel terminated (non-reflection-free) adap...
Definition: fxobjects.h:7647
The WDFConstKBPF6 object implements a 6th order constant K BPF NOTE: designed with Elsie www...
Definition: fxobjects.h:8062
fftw_plan plan_backward
FFTW plan for IFFT.
Definition: fxobjects.h:8881
double beta
beta value, not used
Definition: fxobjects.h:5383
double storageComponent
Definition: fxobjects.h:1444
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6262
virtual double getComponentConductance()
Definition: fxobjects.h:6845
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:5780
double out1
stored port 1 output; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7304
double lfoDepth
LFO deoth (not in %) if enabled.
Definition: fxobjects.h:4183
const double kTwoPi
2pi to 80 decimal places
Definition: guiconstants.h:191
void createWDF()
Definition: fxobjects.h:8480
Custom parameter structure for the AudioDetector object. NOTE: this object uses constant defintions: ...
Definition: fxobjects.h:1789
virtual double getComponentConductance()
Definition: fxobjects.h:6190
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:1369
double apf_g
APF g coefficient.
Definition: fxobjects.h:4177
bool enableLPF
enable LPF flag
Definition: fxobjects.h:4012
virtual void setInput2(double _in2)
Definition: fxobjects.h:6424
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6835
double f_Low
brickwall f_low
Definition: fxobjects.h:574
virtual void setInput2(double _in2)
Definition: fxobjects.h:7035
double doWhiteNoise()
calculates a random value between -1.0 and +1.0
Definition: fxobjects.h:329
ZVAFilterParameters zvaFilterParameters
object parameters
Definition: fxobjects.h:5372
virtual void setInput1(double _in1)=0
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6958
double fc
filter cutoff or center frequency (Hz)
Definition: fxobjects.h:1498
virtual void setInput2(double _in2)
Definition: fxobjects.h:6147
void createWDF()
Definition: fxobjects.h:7824
virtual void setInput2(double _in2)
Definition: fxobjects.h:6789
unsigned int getFrameLength()
Definition: fxobjects.h:8862
virtual void setInput2(double _in2)
Definition: fxobjects.h:7385
double zRegister_C
storage register for C
Definition: fxobjects.h:6919
virtual double getOutput3()
Definition: fxobjects.h:7627
virtual void reset(double _sampleRate)
Definition: fxobjects.h:7166
virtual double getOutput3()
Definition: fxobjects.h:7415
bool quadPhaseLFO
quad phase LFO flag
Definition: fxobjects.h:3497
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8461
double saturation
saturation level
Definition: fxobjects.h:5616
void setPort2_CompAdaptor(IComponentAdaptor *_port2CompAdaptor)
Definition: fxobjects.h:7160
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4414
fftw_complex * ifft_input
array for IFFT input
Definition: fxobjects.h:8792
CircularBuffer< double > signalBuffer
circulat buffer for the signal
Definition: fxobjects.h:2484
virtual double getComponentValue()
Definition: fxobjects.h:6193
double delayRatio_Pct
dela ratio: right length = (delayRatio)*(left length)
Definition: fxobjects.h:2702
virtual void setComponentValue_RC(double componentValue_R, double componentValue_C)
Definition: fxobjects.h:6071
double R2
output port resistance
Definition: fxobjects.h:7292
The WdfCapacitor object implements the reflection coefficient and signal flow through a WDF simulated...
Definition: fxobjects.h:6172
virtual void setInput3(double _in3)
Definition: fxobjects.h:6915
The AudioDelay object implements a stereo audio delay with multiple delay algorithms.
Definition: fxobjects.h:2722
double attackTime
attack time coefficient
Definition: fxobjects.h:1942
virtual double getR2()
Definition: fxobjects.h:7654
double zRegister_C
storage register for C
Definition: fxobjects.h:6551
double lfoRate_Hz
mod delay LFO rate in Hz
Definition: fxobjects.h:3303
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1542
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2065
double threshold_dB
detector threshold in dB
Definition: fxobjects.h:5425
TwoBandShelvingFilterParameters getParameters()
Definition: fxobjects.h:4634
double in2
stored port 2 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7298
double rightDelay_mSec
right delay time
Definition: fxobjects.h:2701
bool interpolate
interpolation flag (diagnostics)
Definition: fxobjects.h:4014
bool enableHPF
HPF simulates DC blocking cap on output.
Definition: fxobjects.h:5621
double getPhase(double re, double im)
calculates phase of a complex numb er
Definition: fxobjects.h:1018
virtual void setComponentValue_LC(double componentValue_L, double componentValue_C)
Definition: fxobjects.h:7253
double sampleRate
sample rate
Definition: fxobjects.h:6156
double sampleRate
sample rate
Definition: fxobjects.h:6318
void createDelayBuffers(double _sampleRate, double delay_mSec, double nestedAPFDelay_mSec)
Definition: fxobjects.h:4524
double * getStateArray()
Definition: fxobjects.h:1421
WdfSeriesAdaptor seriesAdaptor_LC
adaptor for LC
Definition: fxobjects.h:8539
AnalogFIRFilterParameters & operator=(const AnalogFIRFilterParameters ¶ms)
Definition: fxobjects.h:2509
ReverbTankParameters & operator=(const ReverbTankParameters ¶ms)
Definition: fxobjects.h:4693
fftw_plan plan_forward
FFTW plan for FFT.
Definition: fxobjects.h:8794
AudioDetectorParameters audioDetectorParameters
parameters for object
Definition: fxobjects.h:1941
AudioFilter hpFilter
high-band filter
Definition: fxobjects.h:1761
virtual double getOutput3()
Definition: fxobjects.h:7517
The ReverbTank object implements the cyclic reverb tank in the FX book listed below.
Definition: fxobjects.h:4766
double modCounter
modulo counter [0.0, +1.0]
Definition: fxobjects.h:3044
virtual double getComponentConductance()
Definition: fxobjects.h:6968
double zRegister_L
storage register for L
Definition: fxobjects.h:6918
WDFParameters getParameters()
Definition: fxobjects.h:8626
double LFOut
low frequency output sample
Definition: fxobjects.h:1622
DelayAPFParameters delayAPFParameters
obeject parameters
Definition: fxobjects.h:4324
virtual double processAudioSample(double xn)
Definition: fxobjects.h:1854
PSMVocoderParameters & operator=(const PSMVocoderParameters ¶ms)
Definition: fxobjects.h:9153
void createDelayBuffer(double _sampleRate, double delay_mSec)
Definition: fxobjects.h:4120
unsigned int fftCounter
FFT sample counter.
Definition: fxobjects.h:8911
double sampleRate
sample rate storage
Definition: fxobjects.h:8664
void createWDF()
Definition: fxobjects.h:8237
modDelaylgorithm
Use this strongly typed enum to easily set modulated delay algorithm.
Definition: fxobjects.h:3271
double feedback_Pct
feedback as a % value
Definition: fxobjects.h:2697
virtual double getOutput()
Definition: fxobjects.h:6294
void setParameters(const OscillatorParameters ¶ms)
Definition: fxobjects.h:3183
unsigned int inputReadIndex
circular buffer index: input read
Definition: fxobjects.h:8893
unsigned int frameLength
current FFT length
Definition: fxobjects.h:8800
unsigned int hopSize
hop: ha = hs
Definition: fxobjects.h:8914
double componentValue_R
component value R
Definition: fxobjects.h:6677
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:6236
double sidechainInputSample
storage for sidechain sample
Definition: fxobjects.h:2133
double RC
RC value.
Definition: fxobjects.h:6557
void setTerminalResistance(double _terminalResistance)
Definition: fxobjects.h:7143
Custom parameter structure for the ClassATubePre object.
Definition: fxobjects.h:5755
AudioDetectorParameters & operator=(const AudioDetectorParameters ¶ms)
Definition: fxobjects.h:1793
virtual double getOutput()
Definition: fxobjects.h:6409
DFOscillatorCoeffs
Use this non-typed enum to easily access the direct form oscillator coefficients. ...
Definition: fxobjects.h:3119
IComponentAdaptor * getPort1_CompAdaptor()
Definition: fxobjects.h:7274
The CombFilter object implements a comb filter with optional LPF in feedback loop. Used for reverb algorithms in book.
Definition: fxobjects.h:4035
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6496
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5664
bool enableLSF
LSF simulates shelf due to cathode self biasing.
Definition: fxobjects.h:5622
double doLagrangeInterpolation(double *x, double *y, int n, double xbar)
implements n-order Lagrange Interpolation
Definition: fxobjects.h:138
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6762
virtual void initialize(double _R1)
Definition: fxobjects.h:7666
void advanceModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3092
DynamicsProcessorParameters getParameters()
Definition: fxobjects.h:2081
virtual double getComponentValue_C()
Definition: fxobjects.h:6393
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4773
double fuzzExp1WaveShaper(double xn, double saturation, double asymmetry)
calculates fuzz exp1 waveshaper
Definition: fxobjects.h:431
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7999
static void connectAdaptors(WdfAdaptorBase *upstreamAdaptor, WdfAdaptorBase *downstreamAdaptor)
Definition: fxobjects.h:7233
Custom parameter structure for the NestedDelayAPF object. Used for reverb algorithms in book...
Definition: fxobjects.h:4350
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:7814
double processAudioSample(double input, bool &fftReady)
process one input sample throug the vocoder to produce one output sample
Definition: fxobjects.cpp:1476
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5023
virtual void setInput3(double _in3)
Definition: fxobjects.h:7618
double lfoDepth_Pct
mod delay LFO depth in %
Definition: fxobjects.h:3304
unsigned int length
length of convolution (buffer)
Definition: fxobjects.h:2487
void setParameters(const OscillatorParameters ¶ms)
Definition: fxobjects.h:3024
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4043
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2053
virtual void setInput(double in)
Definition: fxobjects.h:6519
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:1520
double HFOut
high frequency output sample
Definition: fxobjects.h:1623
double terminalResistance
value of terminal (load) resistance
Definition: fxobjects.h:7309
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6376
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3354
dynamicsProcessorType calculation
processor calculation type
Definition: fxobjects.h:2018
void reset()
Definition: fxobjects.h:9117
WdfSeriesAdaptor seriesAdaptor_L5C5
adaptor for L5 and C5
Definition: fxobjects.h:8141
PhaseShifterParameters parameters
the object parameters
Definition: fxobjects.h:3701
double lfoRate_Hz
LFO rate in Hz (if enabled)
Definition: fxobjects.h:4381
delayUpdateType updateType
update algorithm
Definition: fxobjects.h:2699
virtual void setComponentValue_RL(double componentValue_R, double componentValue_L)
Definition: fxobjects.h:6068
TwoBandShelvingFilter shelvingFilter
shelving filters
Definition: fxobjects.h:5901
virtual void initialize(double _R1)
Definition: fxobjects.h:7453
bool needInverseFFT
internal flag to signal IFFT required
Definition: fxobjects.h:8903
double stateArray[numDFOStates]
array of state registers
Definition: fxobjects.h:3250
virtual double getOutput()
Definition: fxobjects.h:6644
virtual void setInput1(double _in1)
Definition: fxobjects.h:7474
void initialize(unsigned int _FIRLength, rateConversionRatio _ratio, unsigned int _sampleRate, bool _polyphase=true)
Definition: fxobjects.h:9922
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6865
unsigned int outputReadIndex
circular buffer index: output read
Definition: fxobjects.h:8894
Custom structure that holds transition band information for FIR filter calculations.
Definition: fxobjects.h:606
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8094
double filterOutputGain_dB
va filter gain (normally unused)
Definition: fxobjects.h:5155
bool openTerminalResistance
flag for open circuit load
Definition: fxobjects.h:7310
void setParameters(const CombFilterParameters ¶ms)
Definition: fxobjects.h:4100
WdfSeriesAdaptor seriesAdaptor_RL
adaptor for series RL
Definition: fxobjects.h:8295
WdfSeriesAdaptor seriesAdaptor_L3C3
adaptor for L3 and C3
Definition: fxobjects.h:8138
double sampleRate
current sample rate
Definition: fxobjects.h:1598
double componentValue_C
component value C
Definition: fxobjects.h:6554
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:204
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7794
biquadAlgorithm
Use this strongly typed enum to easily set the biquad calculation type.
Definition: fxobjects.h:1321
bool useFrequencyWarping
flag for freq warping
Definition: fxobjects.h:7956
virtual void setInput3(double _in3)=0
rateConversionRatio ratio
conversion ration
Definition: fxobjects.h:9866
ZVAFilterParameters getParameters()
Definition: fxobjects.h:5199
double sampleRate
sample rate
Definition: fxobjects.h:6239
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4621
void writeBuffer(T input)
Definition: fxobjects.h:2332
fftw_complex * fft_result
array for FFT output
Definition: fxobjects.h:8791
double calcWSGain(double xn, double saturation, double asymmetry)
calculates gain of a waveshaper
Definition: fxobjects.h:373
void setParameters(const BitCrusherParameters ¶ms)
Definition: fxobjects.h:5972
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3334
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6625
double intensity_Pct
phaser feedback in %
Definition: fxobjects.h:3496
void setParameters(const EnvelopeFollowerParameters ¶ms)
Definition: fxobjects.h:5490
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6100
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:1239
double RR
RR value.
Definition: fxobjects.h:6927
OscillatorParameters getParameters()
Definition: fxobjects.h:3174
double frequency_Hz
oscillator frequency
Definition: fxobjects.h:2974
void setAttackTime(double attack_in_ms, bool forceCalc=false)
sets the new attack time and re-calculates the time constant
Definition: fxobjects.cpp:958
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3788
vaFilterAlgorithm filterAlgorithm
va filter algorithm
Definition: fxobjects.h:5152
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8069
bool checkFloatUnderflow(double &value)
Perform underflow check; returns true if we did underflow (user may not care)
Definition: fxobjects.h:62
double K
K value.
Definition: fxobjects.h:6797
modDelaylgorithm algorithm
mod delay algorithm
Definition: fxobjects.h:3302
double sgn(double xn)
calculates sgn( ) of input
Definition: fxobjects.h:358
double componentValue_C
component value C
Definition: fxobjects.h:7045
double threshold_dB
stored threshold (dB)
Definition: fxobjects.h:5097
virtual double getComponentResistance()
Definition: fxobjects.h:6053
WdfParallelAdaptor parallelAdaptor_L4C4
adaptor for L4 and C4
Definition: fxobjects.h:8139
The WdfParallelLC object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6455
TriodeClassA triodes[NUM_TUBES]
array of triode tube objects
Definition: fxobjects.h:5900
double hpf_Fc
fc of DC blocking cap
Definition: fxobjects.h:5624
void findPeaksAndRegionsOfInfluence()
Definition: fxobjects.h:9292
double unipolarToBipolar(double value)
calculates the bipolar [-1.0, +1.0] value FROM a unipolar [0.0, +1.0] value
Definition: fxobjects.h:245
double boostCut_dB
filter boost or cut in dB
Definition: fxobjects.h:8176
virtual double getR2()
Definition: fxobjects.h:7544
int findPreviousNearestPeak(int peakIndex)
Definition: fxobjects.h:9260
const uint32_t ENVELOPE_DETECT_MODE_PEAK
|x|
Definition: guiconstants.h:199
virtual double processAudioSample(double xn)
process one sample through the biquad
Definition: fxobjects.cpp:67
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5878
double splitFrequency
LF/HF split frequency.
Definition: fxobjects.h:1655
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8590
double delayTime_mSec
delay tine in mSec
Definition: fxobjects.h:3831
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:8798
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6315
AudioFilterParameters audioFilterParameters
parameters
Definition: fxobjects.h:1597
The WdfParallelRC object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6946
virtual double getComponentValue()
Definition: fxobjects.h:6074
AudioFilter outputHPF
HPF to simulate output DC blocking cap.
Definition: fxobjects.h:5738
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4430
double attackTime_mSec
attack time in milliseconds
Definition: fxobjects.h:1806
Custom parameter structure for the WDF filter examples.
Definition: fxobjects.h:8157
virtual void setInput1(double _in1)
Definition: fxobjects.h:6541
double outerAPFdelayTime_mSec
delay time for outer APF
Definition: fxobjects.h:4374
double in1
stored port 1 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7297
virtual void setInput2(double _in2)
Definition: fxobjects.h:6544
double componentValue_R
component value R
Definition: fxobjects.h:7046
double sampleRate
current sample rate
Definition: fxobjects.h:4325
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4801
double RC
RC value.
Definition: fxobjects.h:6926
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:6430
virtual double getOutput()
Definition: fxobjects.h:6028
The WDFButterLPF3 object implements a 3rd order Butterworth ladder filter. NOTE: designed with Elsie ...
Definition: fxobjects.h:7787
virtual double getOutput2()
Definition: fxobjects.h:6300
DelayAPFParameters getParameters()
Definition: fxobjects.h:4293
The FastConvolver provides a fast convolver - the user supplies the filter IR and the object snapshot...
Definition: fxobjects.h:8942
virtual void setInput1(double _in1)
Definition: fxobjects.h:7032
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6209
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8087
double lowShelf_fc
low shelf fc
Definition: fxobjects.h:4736
double getG_value()
Definition: fxobjects.h:1428
distortionModel waveshaper
waveshaper
Definition: fxobjects.h:5614
double getOverlap()
Definition: fxobjects.h:8868
bool needOverlapAdd
internal flag to signal overlap/add required
Definition: fxobjects.h:8904
double fixeDelayMax_mSec
fixed delay max time
Definition: fxobjects.h:4728
The WDFIdealRLCBSF object implements an ideal RLC BSF using the WDF library.
Definition: fxobjects.h:8563
virtual void setInput(double in)
Definition: fxobjects.h:6765
void setParameters(const SimpleLPFParameters ¶ms)
Definition: fxobjects.h:3778
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_R
adaptor for R
Definition: fxobjects.h:8540
virtual double getOutput1()
Definition: fxobjects.h:7511
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2730
Custom structure to hold component information.
Definition: fxobjects.h:7087
virtual double getOutput1()
Definition: fxobjects.h:6135
double real
real part
Definition: fxobjects.h:482
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_C
adaptopr for parallel C
Definition: fxobjects.h:8296
void updateDFO()
Definition: fxobjects.h:3210
double rho
p = 2R + g (feedback)
Definition: fxobjects.h:5381
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:4176
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6638
virtual double getComponentConductance()
Definition: fxobjects.h:6477
LRFilterBankParameters getParameters()
Definition: fxobjects.h:1735
The WDFIdealRLCBPF object implements an ideal RLC BPF using the WDF library.
Definition: fxobjects.h:8441
double componentValue_L
component value L
Definition: fxobjects.h:6433
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5230
double releaseTime_mSec
detector release time
Definition: fxobjects.h:5424
virtual void reset(double _sampleRate)
Definition: fxobjects.h:7008
void setFilterFc(double fc_Hz)
Definition: fxobjects.h:7933
virtual double getOutput1()
Definition: fxobjects.h:6218
BiquadParameters parameters
Definition: fxobjects.h:1441
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3904
AudioDetector detector
the detector object
Definition: fxobjects.h:5096
double lfoDepth
LFO depth (not in %) (if enabled)
Definition: fxobjects.h:4382
BiquadParameters getParameters()
Definition: fxobjects.h:1398
virtual double processAudioSample(double xn)
Definition: fxobjects.h:1711
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8536
double RT60Time_mSec
RT 60 time ini mSec.
Definition: fxobjects.h:4011
IComponentAdaptor * wdfComponent
WDF componant connected to port 3 (default operation)
Definition: fxobjects.h:7288
fftw_plan plan_forward
FFTW plan for FFT.
Definition: fxobjects.h:8880
double softClipWaveShaper(double xn, double saturation)
calculates hyptan waveshaper
Definition: fxobjects.h:416
Custom parameter structure for the ReverbTank object.
Definition: fxobjects.h:4689
double invertedOutput
inverted
Definition: fxobjects.h:1220
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6438
The Decimator object implements a sample rate decimator. Ana array of M input samples is decimated to...
Definition: fxobjects.h:9909
double computeGain(double detect_dB)
Definition: fxobjects.h:5053
virtual double getOutput1()
Definition: fxobjects.h:7726
virtual void setInput(double in)
Definition: fxobjects.h:6291
DynamicsProcessorParameters & operator=(const DynamicsProcessorParameters ¶ms)
Definition: fxobjects.h:1990
void setParameters(const TriodeClassAParameters ¶ms)
Definition: fxobjects.h:5683
double stateArray[numStates]
Definition: fxobjects.h:1438
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3863
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8468
virtual void setInput2(double _in2)
Definition: fxobjects.h:7720
double quantizedBitDepth
bid depth of quantizer
Definition: fxobjects.h:5933
const double kPi
pi to 80 decimal places
Definition: guiconstants.h:184
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6872
ZVAFilterParameters & operator=(const ZVAFilterParameters ¶ms)
Definition: fxobjects.h:5135
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:3366
void destroyFFTW()
destroys the FFTW arrays and plans.
Definition: fxobjects.cpp:1225
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4606
EnvelopeFollowerParameters getParameters()
Definition: fxobjects.h:5484
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7807
bool addZeroPad(unsigned int count)
zero pad the input timeline
Definition: fxobjects.cpp:1392
CombFilterParameters getParameters()
Definition: fxobjects.h:4091
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_LC
adaptor for parallel LC
Definition: fxobjects.h:8662
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6062
SimpleDelayParameters & operator=(const SimpleDelayParameters ¶ms)
Definition: fxobjects.h:3819
BitCrusherParameters parameters
object parameters
Definition: fxobjects.h:5995
virtual double getComponentResistance()
Definition: fxobjects.h:6595
double peakGainFor_Q(double Q)
calculates the peak magnitude for a given Q
Definition: fxobjects.h:301
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:9189
double * getCoefficients()
Definition: fxobjects.h:1414
double highShelf_fc
fc for high shelf
Definition: fxobjects.h:4568
PhaseVocoder vocoder
vocoder object
Definition: fxobjects.h:9071
double Q
filter Q
Definition: fxobjects.h:5422
double integrator_z[2]
state variables
Definition: fxobjects.h:5376
double componentResistance
simulated resistance
Definition: fxobjects.h:6238
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6316
Custom structure that holds information about each FFT bin. This includes all information needed to p...
Definition: fxobjects.h:9095
virtual double getOutput()
Definition: fxobjects.h:6132
virtual void initialize(double _R1)
Definition: fxobjects.h:6019
virtual void setInput2(double _in2)=0
void setThreshold_dB(double _threshold_dB)
Definition: fxobjects.h:5090
virtual void setComponentValue_RL(double componentValue_R, double componentValue_L)
Definition: fxobjects.h:7260
double sampleRate
sample rate
Definition: fxobjects.h:6684
virtual double getComponentConductance()
Definition: fxobjects.h:6056
double getBeta()
Definition: fxobjects.h:5369
void setOverlapAddOnly(bool b)
Definition: fxobjects.h:8873
double lfoRate_Hz
phaser LFO rate in Hz
Definition: fxobjects.h:3494
virtual double processAudioSample(double xn)=0
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8204
IComponentAdaptor * port2CompAdaptor
componant or adaptor connected to port 2
Definition: fxobjects.h:7286
virtual void updateComponentResistance()
Definition: fxobjects.h:6123
void doInverseFFT()
perform the inverse FFT on the processed data
Definition: fxobjects.cpp:1516
Custom parameter structure for the SimpleLPFP object. Used for reverb algorithms in book...
Definition: fxobjects.h:3717
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6050
double fc
va filter fc
Definition: fxobjects.h:5153
double * outputBuff
buffer for resampled output
Definition: fxobjects.h:9597
virtual double getOutput2()
Definition: fxobjects.h:6657
The TriodeClassA object simulates a triode in class A configuration. This is a very simple and basic ...
Definition: fxobjects.h:5647
BiquadParameters & operator=(const BiquadParameters ¶ms)
Definition: fxobjects.h:1340
double RR
RR value.
Definition: fxobjects.h:7050
void createDelayBuffer(double _sampleRate, double delay_mSec)
Definition: fxobjects.h:4313
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6467
virtual void initializeAdaptorChain()
Definition: fxobjects.h:7240
Custom parameter structure for the DelayAPF object. Used for reverb algorithms in book...
Definition: fxobjects.h:4154
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8415
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3920
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7894
void setReleaseTime(double release_in_ms, bool forceCalc=false)
sets the new release time and re-calculates the time constant
Definition: fxobjects.cpp:974
void setMakeUpGain_dB(double _makeUpGain_dB)
Definition: fxobjects.h:5093
void setUsePostWarping(bool b)
Definition: fxobjects.h:7930
virtual void setInput1(double _in1)
Definition: fxobjects.h:7578
bool advanceAndCheckFFT()
advance the sample counter and check to see if we need to do the FFT.
Definition: fxobjects.cpp:1422
virtual void initialize(double _R1)
Definition: fxobjects.h:7345
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3581
virtual double getComponentValue_L()
Definition: fxobjects.h:6632
The WDFIdealRLCLPF object implements an ideal RLC LPF using the WDF library.
Definition: fxobjects.h:8197
The Interpolator object implements a sample rate interpolator. One input sample yields N output sampl...
Definition: fxobjects.h:9784
AudioDelayParameters getParameters()
Definition: fxobjects.h:2854
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6196
FastFFT filterFastFFT
FastFFT object.
Definition: fxobjects.h:9072
double attackTime_mSec
detector attack time
Definition: fxobjects.h:5423
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5706
double quadPhaseOutput_pos
90 degrees out
Definition: fxobjects.h:1221
double componentValue_C
component value C
Definition: fxobjects.h:6434
virtual void setInput(double in)
Definition: fxobjects.h:6129
double dryLevel_dB
dry output level in dB
Definition: fxobjects.h:4742
virtual double processAudioSample(double input)
Definition: fxobjects.h:9396
double sampleRate
stored sample rate
Definition: fxobjects.h:7957
SimpleDelayParameters getParameters()
Definition: fxobjects.h:3883
AudioDelayParameters & operator=(const AudioDelayParameters ¶ms)
Definition: fxobjects.h:2675
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4808
FastConvolver convolver
fast convolver
Definition: fxobjects.h:9981
virtual const SignalGenData renderAudioOutput()
generates the oscillator output for one sample interval; note that there are multiple outputs...
Definition: fxobjects.cpp:986
LRFilterBankParameters & operator=(const LRFilterBankParameters ¶ms)
Definition: fxobjects.h:1646
int peakBins[PSM_FFT_LEN]
array of current peak bin index values (-1 = not peak)
Definition: fxobjects.h:9593
AudioDetector detector
the sidechain audio detector
Definition: fxobjects.h:2130
double readDelayAtPercentage(double delayPercent)
Definition: fxobjects.h:3955
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6711
bool interpolate
interpolation flag (diagnostics usually)
Definition: fxobjects.h:3832
virtual double getComponentValue_R()
Definition: fxobjects.h:6635
AudioFilter outputLSF
LSF to simulate shelf caused by cathode self-biasing cap.
Definition: fxobjects.h:5739
virtual double processAudioSample(double xn)
process one sample through the audio filter
Definition: fxobjects.cpp:944
filterAlgorithm algorithm
filter algorithm
Definition: fxobjects.h:1497
double sampleRate
current sample rate
Definition: fxobjects.h:5373
Custom parameter structure for the CombFilter object. Used for reverb algorithms in book...
Definition: fxobjects.h:3992
bool polyphase
enable polyphase decomposition
Definition: fxobjects.h:9869
virtual void setInput1(double _in1)
Definition: fxobjects.h:6909
virtual void setInput3(double _in3)
Definition: fxobjects.h:7508
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3162
brickwallFilter
Use this strongly typed enum to easily set brickwall filter type for functions that need it...
Definition: fxobjects.h:548
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6503
virtual void setInput3(double _in3)
Definition: fxobjects.h:6150
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:7366
double computeGain(double detect_dB)
Definition: fxobjects.h:2136
void setFilterIR(double *irBuffer)
Definition: fxobjects.h:8989
AudioFilterParameters getParameters()
Definition: fxobjects.h:1559
virtual void updateComponentResistance()
Definition: fxobjects.h:6059
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:92
double zRegister_L
storage register for L
Definition: fxobjects.h:6550
void setParameters(const NestedDelayAPFParameters ¶ms)
Definition: fxobjects.h:4498
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:184
virtual double getOutput2()
Definition: fxobjects.h:6780
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5521
The SimpleDelay object implements a basic delay line without feedback.
Definition: fxobjects.h:3855
double * windowBuffer
buffer for window (naked)
Definition: fxobjects.h:8797
generatorWaveform waveform
the current waveform
Definition: fxobjects.h:2973
virtual double getOutput()
Definition: fxobjects.h:7014
bool selfOscillate
enable selfOscillation
Definition: fxobjects.h:5158
analogFilter filterType
filter type
Definition: fxobjects.h:2522
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8583
double lowShelf_fc
fc for low shelf
Definition: fxobjects.h:4566
double innerAPFdelayTime_mSec
delay time for inner APF
Definition: fxobjects.h:4375
unsigned int FIRLength
FIR length.
Definition: fxobjects.h:9985
double dBPeakGainFor_Q(double Q)
calculates the peak magnitude in dB for a given Q
Definition: fxobjects.h:317
double lsf_BoostCut_dB
boost/cut due to cathode self biasing
Definition: fxobjects.h:5626
double coeffArray[numDFOCoeffs]
array of coefficients
Definition: fxobjects.h:3251
Custom parameter structure for the TriodeClassA object.
Definition: fxobjects.h:5588
unsigned int sampleRate
sample rate
Definition: fxobjects.h:9864
virtual double getOutput3()
Definition: fxobjects.h:6783
virtual double getComponentResistance()
Definition: fxobjects.h:6107
double kRT
reverb time, 0 to 1
Definition: fxobjects.h:4734
TriodeClassAParameters parameters
object parameters
Definition: fxobjects.h:5737
unsigned int filterImpulseLength
IR length.
Definition: fxobjects.h:9076
bool enableGainComp
enable gain compensation (see book)
Definition: fxobjects.h:5156
WDFParameters getParameters()
Definition: fxobjects.h:8504
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:3996
The DFOscillator object implements generates a very pure sinusoidal oscillator by placing poles direc...
Definition: fxobjects.h:3155
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8292
The WdfSeriesLC object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6335
void setPort3_CompAdaptor(IComponentAdaptor *_port3CompAdaptor)
Definition: fxobjects.h:7163
double zRegister_C
storage register for C (not used)
Definition: fxobjects.h:6673
virtual void setInput1(double _in1)
Definition: fxobjects.h:6144
The WdfSeriesRC object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6823
virtual double getR2()
Definition: fxobjects.h:7334
virtual void setInput1(double _in1)
Definition: fxobjects.h:6786
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:7306
double lsf_Fshelf
shelf fc from self bias cap
Definition: fxobjects.h:5625
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6116
fftw_complex * fft_input
array for FFT input
Definition: fxobjects.h:8877
virtual bool reset(double _sampleRate)=0
bool checkAndWrapModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3049
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6558
double sampleRate
sample rate
Definition: fxobjects.h:6807
double apfDelayWeight_Pct
APF max delay weighying.
Definition: fxobjects.h:4727
double principalArg(double phaseIn)
calculates proncipal argument of a phase value; this is the wrapped value on the range of [-pi...
Definition: fxobjects.h:1033
OscillatorParameters lfoParameters
obejcgt parameters
Definition: fxobjects.h:3038
unsigned int relaxationBins
relaxation bins for FIR specification
Definition: fxobjects.h:576
unsigned int FIRLength
FIR length.
Definition: fxobjects.h:9865
This is the output structure for audio generator objects that can render up to four outputs...
Definition: fxobjects.h:1215
edgeTransition edgeType
edge type
Definition: fxobjects.h:610
FastConvolver polyPhaseConvolvers[maxSamplingRatio]
a set of sub-band convolvers for polyphase operation
Definition: fxobjects.h:9990
virtual void setInput(double _in)
Definition: fxobjects.h:6025
Custom parameter structure for the AudioFilter object.
Definition: fxobjects.h:1480
bool enablePeakPhaseLocking
flag to enable phase lock
Definition: fxobjects.h:9167
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L2
adaptor for L2
Definition: fxobjects.h:7851
bool enableNLP
enable non linear processing (use oversampling for best results)
Definition: fxobjects.h:5159
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:1304
PhaseVocoder vocoder
vocoder to perform PSM
Definition: fxobjects.h:9580
virtual void setInput3(double _in3)
Definition: fxobjects.h:6792
virtual double getOutput()
Definition: fxobjects.h:6768
globally utilized constants and enumerations
virtual bool canProcessAudioFrame()=0
IComponentAdaptor * port1CompAdaptor
componant or adaptor connected to port 1
Definition: fxobjects.h:7285
double outputLevel_dB
input level in dB
Definition: fxobjects.h:5781
The WDFTunableButterLPF3 object implements a tunable 3rd order Butterworth ladder filter...
Definition: fxobjects.h:7873
FilterBankOutput processFilterBank(double xn)
Definition: fxobjects.h:1717
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8388
double raw2dB(double raw)
calculates dB for given input
Definition: fxobjects.h:273
windowType window
window type
Definition: fxobjects.h:8907
virtual void setInput2(double _in2)
Definition: fxobjects.h:6230
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:4567
fftw_complex * fft_input
array for FFT input
Definition: fxobjects.h:8790
fftw_complex * ifft_result
array for IFFT output
Definition: fxobjects.h:8793
double R3
component resistance
Definition: fxobjects.h:7293
virtual void setInput1(double _in1)
Definition: fxobjects.h:6663
void setParameters(const DelayAPFParameters ¶ms)
Definition: fxobjects.h:4302
BinData binData[PSM_FFT_LEN]
array of BinData structures for current FFT frame
Definition: fxobjects.h:9590
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2416
void createWDF()
Definition: fxobjects.h:8358
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4213
FastConvolver polyPhaseConvolvers[maxSamplingRatio]
a set of sub-band convolvers for polyphase operation
Definition: fxobjects.h:9870
virtual void setInput1(double _in1)
Definition: fxobjects.h:6227
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5186
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3759
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:935
double imag
imaginary part
Definition: fxobjects.h:483
void setPitchShift(double semitones)
Definition: fxobjects.h:9225
virtual void setInput3(double _in3)
Definition: fxobjects.h:6547
distortionModel
Use this strongly typed enum to easily set the waveshaper model for the Triode objects.
Definition: fxobjects.h:5575
int peakBinsPrevious[PSM_FFT_LEN]
array of previous peak bin index values (-1 = not peak)
Definition: fxobjects.h:9594
virtual void setComponentValue_LC(double _componentValue_L, double _componentValue_C)
Definition: fxobjects.h:6488
double componentResistance
simulated resistance
Definition: fxobjects.h:6155
WdfSeriesAdaptor seriesAdaptor_L1
adaptor for L1
Definition: fxobjects.h:7948
SimpleLPFParameters getParameters()
Definition: fxobjects.h:3769
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2453
double inputLevel
input level (not in dB)
Definition: fxobjects.h:5903
bool overlapAddOnly
flag for overlap-add-only algorithms
Definition: fxobjects.h:8919
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:627
double fc
brickwall fc
Definition: fxobjects.h:572
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:7052
OscillatorParameters parameters
object parameters
Definition: fxobjects.h:3247
double * filterIR
filter IR
Definition: fxobjects.h:9074
double componentValue_L
component value L
Definition: fxobjects.h:6553
double RL
RL value.
Definition: fxobjects.h:6556
void createWDF()
Definition: fxobjects.h:7911
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:6254
virtual void setComponentValue_LC(double componentValue_L, double componentValue_C)
Definition: fxobjects.h:6065
virtual double getComponentValue_C()
Definition: fxobjects.h:6513
double R
value of R component
Definition: fxobjects.h:7117
double * getFilterIRTable(unsigned int FIRLength, rateConversionRatio ratio, unsigned int sampleRate)
returns the up or downsample ratio as a numeric value
Definition: fxobjects.h:9652
double atanWaveShaper(double xn, double saturation)
calculates arctangent waveshaper
Definition: fxobjects.h:388
virtual void setInput1(double _in1)
Definition: fxobjects.h:7692
The ClassATubePre object implements a simple cascade of four (4) triode tube models.
Definition: fxobjects.h:5808
BitCrusherParameters getParameters()
Definition: fxobjects.h:5966
IComponentAdaptor * getPort3_CompAdaptor()
Definition: fxobjects.h:7280
virtual double getComponentResistance()
Definition: fxobjects.h:6474
void doOverlapAdd(double *outputData=nullptr, int length=0)
perform the overlap/add on the IFFT data
Definition: fxobjects.cpp:1535
double updatedPhase
phase update value
Definition: fxobjects.h:9135
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:2899
IComponentAdaptor * port3CompAdaptor
componant or adaptor connected to port 3
Definition: fxobjects.h:7287
void setInterpolate(bool b)
Definition: fxobjects.h:2378
double getG_value()
Definition: fxobjects.h:1584
virtual void setInput(double in)
Definition: fxobjects.h:6399
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8658
virtual const SignalGenData renderAudioOutput()
Definition: fxobjects.h:3193
AudioFilter lpFilter
low-band filter
Definition: fxobjects.h:1760
unsigned int count
number of samples in output array
Definition: fxobjects.h:9763
bool hardLimitGate
threshold in dB
Definition: fxobjects.h:2015
virtual double getOutput1()
Definition: fxobjects.h:6412
virtual void setInput3(double _in3)
Definition: fxobjects.h:6427
virtual void setInput1(double _in1)
Definition: fxobjects.h:6421
WdfSeriesAdaptor seriesAdaptor_L1
adaptor for L1
Definition: fxobjects.h:7849
virtual double getComponentValue_R()
Definition: fxobjects.h:7002
virtual double getOutput1()
Definition: fxobjects.h:7409
bool calculateAnalogMagArray(AnalogMagData &magData)
calculate an arra of magnitude points from analog filter specifications
Definition: fxobjects.h:858
void setPort1_CompAdaptor(IComponentAdaptor *_port1CompAdaptor)
Definition: fxobjects.h:7157
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:9202
virtual double processAudioSample(double xn)
Definition: fxobjects.h:7901
void setCoefficients(double *coeffs)
Definition: fxobjects.h:1408
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2554
fftw_complex * getFFTData()
Definition: fxobjects.h:8850
double sampleRate
sample rate
Definition: fxobjects.h:3254
virtual double getOutput1()
Definition: fxobjects.h:6532
double normalOutput
normal
Definition: fxobjects.h:1219
virtual void setComponentValue_RC(double _componentValue_R, double _componentValue_C)
Definition: fxobjects.h:6980
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:1193
double sampleRate
sample rate
Definition: fxobjects.h:6930
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1528
unsigned int outputWriteIndex
circular buffer index: output write
Definition: fxobjects.h:8892
reverbDensity density
density setting thick or thin
Definition: fxobjects.h:4721
delayAlgorithm algorithm
delay algorithm
Definition: fxobjects.h:2694
virtual void setComponentValue_RC(double componentValue_R, double componentValue_C)
Definition: fxobjects.h:7267
bool calculateBrickwallMagArray(BrickwallMagData &magData)
calculate an arra of magnitude points from brickwall specifications
Definition: fxobjects.h:687
virtual void initializeAdaptorChain()
Definition: fxobjects.h:6022
double Q
va filter Q
Definition: fxobjects.h:5154
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8218
double windowHopCorrection
window correction including hop/overlap
Definition: fxobjects.h:8900
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2107
virtual void setInput3(double _in3)
Definition: fxobjects.h:6669
virtual void setInput2(double _in2)
Definition: fxobjects.h:6912
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4614
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8510
The WdfResistor object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6092
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:4817
void init(unsigned int lengthPowerOfTwo)
Definition: fxobjects.h:2456
The ZVAFilter object implements multpile Zavalishin VA Filters. Audio I/O:
Definition: fxobjects.h:5179
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2752
void writeDelay(double xn)
Definition: fxobjects.h:3962
The WdfParallelAdaptor object implements the parallel reflection-free (non-terminated) adaptor...
Definition: fxobjects.h:7537
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6154
double pitchShiftSemitones
pitch shift in half-steps
Definition: fxobjects.h:9166
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6588
virtual double getComponentValue()
Definition: fxobjects.h:6275
double componentResistance
simulated resistance
Definition: fxobjects.h:6317
ModulatedDelayParameters & operator=(const ModulatedDelayParameters ¶ms)
Definition: fxobjects.h:3289
virtual double getOutput()
Definition: fxobjects.h:6891
double quadPhaseOutput_neg
-90 degrees out
Definition: fxobjects.h:1222
bool enableLFO
flag to enable LFO
Definition: fxobjects.h:4181
unsigned int outputBufferLength
lenght of resampled output array
Definition: fxobjects.h:9599
double * windowBuffer
array for window
Definition: fxobjects.h:8884
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3675
unsigned int sampleRate
sample rate
Definition: fxobjects.h:9984
virtual double getComponentConductance()
Definition: fxobjects.h:6272
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8225
void setParameters(const AudioFilterParameters ¶meters)
Definition: fxobjects.h:1562
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3363
Custom parameter structure for the AudioDelay object.
Definition: fxobjects.h:2671
double getMagnitude(double re, double im)
calculates magnitude of a complex numb er
Definition: fxobjects.h:1003
virtual bool reset(double _sampleRate)=0
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2578
double lfoDepth_Pct
phaser LFO depth in %
Definition: fxobjects.h:3495
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1704
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:9222
virtual double getComponentValue_C()
Definition: fxobjects.h:7005
wdfComponent
Use this strongly typed enum to easily set the wdfComponent type.
Definition: fxobjects.h:7074
double RC
RC value.
Definition: fxobjects.h:6437
double psi
bin phase correction
Definition: fxobjects.h:9132
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6347
double outputGain_dB
make up gain
Definition: fxobjects.h:2021
unsigned int getFrameLength()
Definition: fxobjects.h:8786
double leftDelay_mSec
left delay time
Definition: fxobjects.h:2700
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_L6C6
adaptor for L6 and C6
Definition: fxobjects.h:8142
double in3
stored port 3 input; not used in this implementation but may be required for extended versions ...
Definition: fxobjects.h:7299
bool isPeak
flag for peak bins
Definition: fxobjects.h:9129
windowType
Use this strongly typed enum to easily set the windowing type for FFT algorithms that use it...
Definition: fxobjects.h:8685
double lfoMaxModulation_mSec
LFO maximum modulation time in mSec.
Definition: fxobjects.h:4184
IComponentAdaptor * getPort2_CompAdaptor()
Definition: fxobjects.h:7277
double lowShelf_fc
LSF shelf frequency.
Definition: fxobjects.h:5784
double lpf_g
LPF g coefficient (if enabled)
Definition: fxobjects.h:4179
virtual double getOutput3()
Definition: fxobjects.h:7029
double zRegister_C
storage register for C
Definition: fxobjects.h:6431
void flushBuffer()
Definition: fxobjects.h:2239
The SimpleLPF object implements a first order one-pole LPF using one coefficient "g" value...
Definition: fxobjects.h:3751
virtual void enableAuxInput(bool enableAuxInput)
Definition: fxobjects.h:1179
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8326
WdfSeriesAdaptor seriesAdaptor_L1C1
adaptor for L1 and C1
Definition: fxobjects.h:8038
double zRegister_L
storage register for L
Definition: fxobjects.h:7041
virtual double getComponentValue_C()
Definition: fxobjects.h:6882
WdfParallelAdaptor parallelAdaptor_C1
adaptor for C1
Definition: fxobjects.h:7850
virtual double getOutput2()
Definition: fxobjects.h:7514
ClassATubePreParameters getParameters()
Definition: fxobjects.h:5843
NestedDelayAPFParameters & operator=(const NestedDelayAPFParameters ¶ms)
Definition: fxobjects.h:4354
NestedDelayAPFParameters getParameters()
Definition: fxobjects.h:4492
void calculateFilterCoeffs()
Definition: fxobjects.h:5330
virtual void setInput2(double _in2)
Definition: fxobjects.h:7597
double wetLevel_dB
wet output level in dB
Definition: fxobjects.h:2695
virtual double getOutput2()
Definition: fxobjects.h:6138
double releaseTime_mSec
release time in milliseconds
Definition: fxobjects.h:1807
double bufferLength_mSec
total buffer length in mSec
Definition: fxobjects.h:4326
Custom parameter structure for the TwoBandShelvingFilter object. Used for reverb algorithms in book...
Definition: fxobjects.h:4549
double R1
input port resistance
Definition: fxobjects.h:7291
Custom parameter structure for the SimpleDelay object. Used for reverb algorithms in book...
Definition: fxobjects.h:3815
double * outputBuffer
output timeline (y)
Definition: fxobjects.h:8888
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:448
virtual double getOutput3()
Definition: fxobjects.h:6660
virtual double getOutput2()
Definition: fxobjects.h:7624
The ModulatedDelay object implements the three basic algorithms: flanger, chorus, vibrato...
Definition: fxobjects.h:3325
Use this interface for objects that process audio input samples to produce audio output samples...
Definition: fxobjects.h:1159
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6126
void createCircularBufferPowerOfTwo(unsigned int _bufferLengthPowerOfTwo)
Definition: fxobjects.h:2313
double RL
RL value.
Definition: fxobjects.h:6679
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L3C3
adaptor for L3 and C3
Definition: fxobjects.h:8040
unsigned int inputCount
input sample counter
Definition: fxobjects.h:9075
void createDelayBuffer(double _sampleRate, double _bufferLength_mSec)
Definition: fxobjects.h:3923
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5514
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1378
double readDelayAtTime_mSec(double _delay_mSec)
Definition: fxobjects.h:3945
double sampleRate
sample rate
Definition: fxobjects.h:7053
virtual double getOutput2()
Definition: fxobjects.h:7026
WdfParallelAdaptor parallelAdaptor_L2C2
adaptor for L2 and C2
Definition: fxobjects.h:8039
double apfDelayMax_mSec
APF max delay time.
Definition: fxobjects.h:4726
PhaseShifterParameters & operator=(const PhaseShifterParameters ¶ms)
Definition: fxobjects.h:3481
double slopeIncrement
transition slope
Definition: fxobjects.h:613
void setComponent(wdfComponent componentType, double value1=0.0, double value2=0.0)
Definition: fxobjects.h:7173
The PhaseShifter object implements a six-stage phaser.
Definition: fxobjects.h:3558
void setParameters(const ZVAFilterParameters ¶ms)
Definition: fxobjects.h:5208
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:8764
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:9618
virtual double getOutput1()
Definition: fxobjects.h:7621
double modCounterQP
Quad Phase modulo counter [0.0, +1.0].
Definition: fxobjects.h:3046
LFO modLFO
LFO.
Definition: fxobjects.h:4332
double decimateAudio(DecimatorInput data)
Definition: fxobjects.h:9961
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6749
OscillatorParameters & operator=(const OscillatorParameters ¶ms)
Definition: fxobjects.h:2962
void setSourceResistance(double _sourceResistance)
Definition: fxobjects.h:7154
double Q
brickwall Q
Definition: fxobjects.h:573
void createCircularBuffer(unsigned int _bufferLength)
Definition: fxobjects.h:2305
FastConvolver convolver
the convolver
Definition: fxobjects.h:9861
void setParameters(const LRFilterBankParameters &_parameters)
Definition: fxobjects.h:1744
virtual void updateComponentResistance()
Definition: fxobjects.h:6480
WdfParallelAdaptor parallelAdaptor_L2C2
adaptor for L2 and C2
Definition: fxobjects.h:8136
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4232
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6288
double lfoRate_Hz
LFO rate in Hz, if enabled.
Definition: fxobjects.h:4182
bool mirrorMag
optionally mirror the output array
Definition: fxobjects.h:577
virtual void setComponentValue_RL(double _componentValue_R, double _componentValue_L)
Definition: fxobjects.h:6610
double Q
filter Q
Definition: fxobjects.h:8175
double lowShelfBoostCut_dB
LSF shelf gain/cut.
Definition: fxobjects.h:5785
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5699
bool polyphase
enable polyphase decomposition
Definition: fxobjects.h:9989
void initialize(unsigned int _filterImpulseLength)
Definition: fxobjects.h:8960
double RL
RL value.
Definition: fxobjects.h:6436
double lpf_g
gain value for LPF (if enabled)
Definition: fxobjects.h:4013
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5982
double highShelf_fc
high shelf fc
Definition: fxobjects.h:4738
double phi
bin phase angle
Definition: fxobjects.h:9131
double delay_Samples
current delay in samples; other objects may need to access this information
Definition: fxobjects.h:3835
double componentResistance
equivalent resistance of pair of componen
Definition: fxobjects.h:6683
double * inputBuffer
input timeline (x)
Definition: fxobjects.h:8887
The TwoBandShelvingFilter object implements two shelving filters in series in the standard "Bass and ...
Definition: fxobjects.h:4589
double ha
ha = N/4 — 75% overlap
Definition: fxobjects.h:9585
Custom output structure for interpolator; it holds an arry of interpolated output samples...
Definition: fxobjects.h:9759
Custom parameter structure for the EnvelopeFollower object.
Definition: fxobjects.h:5401
double sampleRate
sample rate
Definition: fxobjects.h:6439
BinData binDataPrevious[PSM_FFT_LEN]
array of BinData structures for previous FFT frame
Definition: fxobjects.h:9591
PSMVocoderParameters getParameters()
Definition: fxobjects.h:9558
virtual double getOutput2()
Definition: fxobjects.h:7412
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6180
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1928
virtual void setInput3(double _in3)
Definition: fxobjects.h:7406
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8448
virtual void updateComponentResistance()
Definition: fxobjects.h:6285
virtual double getComponentResistance()
Definition: fxobjects.h:6842
EnvelopeFollowerParameters & operator=(const EnvelopeFollowerParameters ¶ms)
Definition: fxobjects.h:5405
delayUpdateType
Use this strongly typed enum to easily set the delay update type; this varies depending on the design...
Definition: fxobjects.h:2657
WDFParameters & operator=(const WDFParameters ¶ms)
Definition: fxobjects.h:8161
The BitCrusher object implements a quantizing bitcrusher algorithm.
Definition: fxobjects.h:5953
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:6641
TriodeClassAParameters & operator=(const TriodeClassAParameters ¶ms)
Definition: fxobjects.h:5592
bool enableSidechain
enable external sidechain input to object
Definition: fxobjects.h:2017
double outputGain
outputGain level
Definition: fxobjects.h:5618
virtual void updateComponentResistance()
Definition: fxobjects.h:6203
double zRegister_C
storage register for L
Definition: fxobjects.h:6796
edgeTransition
Use this strongly typed enum to easily set the edge direction (rising or falling) of a transition ban...
Definition: fxobjects.h:593
double lfoMaxModulation_mSec
max modulation time if LFO is enabled
Definition: fxobjects.h:4383
analogFilter
Use this strongy typed enum to set the analog filter type for the AnalogMagData structure.
Definition: fxobjects.h:820
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5989
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5040
Custom parameter structure for the ZVAFilter object.
Definition: fxobjects.h:5131
Use this interface for objects in the WDF Ladder Filter library; see book for more information...
Definition: fxobjects.h:6015
bool resample(double *input, double *output, uint32_t inLength, uint32_t outLength, interpolation interpType=interpolation::kLinear, double scalar=1.0, double *outWindow=nullptr)
function that resamples an input array of length N into an output array of length M...
Definition: fxobjects.h:1060
virtual double getOutput2()
Definition: fxobjects.h:6415
double asymmetry
asymmetry level
Definition: fxobjects.h:5617
double RC
RC value.
Definition: fxobjects.h:7049
ReverbTankParameters getParameters()
Definition: fxobjects.h:4905
fftw_complex * ifft_result
array for IFFT output
Definition: fxobjects.h:8879
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:2590
void createWDF()
Definition: fxobjects.h:8016
virtual double getComponentValue_L()
Definition: fxobjects.h:6390
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:224
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:7246
filterCoeff
Use this enum to easily access coefficents inside of arrays.
Definition: fxobjects.h:1282
The WDFBesselBSF3 object implements a 3rd order Bessel BSF NOTE: designed with Elsie www...
Definition: fxobjects.h:7978
virtual double getComponentValue_L()
Definition: fxobjects.h:6510
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6885
bool enableLFO
flag to enable the modulated delay
Definition: fxobjects.h:4380
virtual void setComponentValue_LC(double _componentValue_L, double _componentValue_C)
Definition: fxobjects.h:6368
virtual double getOutput1()
Definition: fxobjects.h:6297
The WdfSeriesAdaptor object implements the series reflection-free (non-terminated) adaptor...
Definition: fxobjects.h:7327
fftw_complex * doInverseFFT(double *inputReal, double *inputImag)
perform the IFFT operation
Definition: fxobjects.cpp:1204
Custom parameter structure for the Biquad object. Default version defines the biquad structure used i...
Definition: fxobjects.h:9149
unsigned int wrapMaskOut
output wrap mask
Definition: fxobjects.h:8896
ComplexNumber complexMultiply(ComplexNumber c1, ComplexNumber c2)
returns the complex product of two complex numbers
Definition: fxobjects.h:494
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8267
bool calculateFilterCoeffs()
Definition: fxobjects.cpp:153
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6383
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3002
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5223
double C
value of C component
Definition: fxobjects.h:7119
double analogMatchSigma
analog matching Sigma value (see book)
Definition: fxobjects.h:5386
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:5904
virtual void updateComponentResistance()
Definition: fxobjects.h:6360
int previousPeakBin
index of peak bin in previous FFT
Definition: fxobjects.h:9134
virtual void setInput2(double _in2)
Definition: fxobjects.h:6666
WDFParameters getParameters()
Definition: fxobjects.h:8382
Custom parameter structure for the BitCrusher object.
Definition: fxobjects.h:5919
double coeffArray[numCoeffs]
Definition: fxobjects.h:1435
AnalogFIRFilterParameters getParameters()
Definition: fxobjects.h:2584
bool matchAnalogNyquistLPF
match analog gain at Nyquist
Definition: fxobjects.h:5157
unsigned int frameLength
current FFT length
Definition: fxobjects.h:8910
virtual double getComponentResistance()
Definition: fxobjects.h:6718
double wetLevel_dB
wet output level in dB
Definition: fxobjects.h:4741
double feedback_Pct
feedback in %
Definition: fxobjects.h:3305
virtual double getR2()
Definition: fxobjects.h:7442
void boundValue(double &value, double minValue, double maxValue)
Bound a value to min and max limits.
Definition: fxobjects.h:167
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:516
OscillatorParameters getParameters()
Definition: fxobjects.h:3018
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6988
virtual double getComponentValue_L()
Definition: fxobjects.h:6756
virtual void initialize(double _R1)
Definition: fxobjects.h:7556
virtual double getOutput3()
Definition: fxobjects.h:6224
void initialize(unsigned int _frameLength, windowType _window)
initialize the Fast FFT object for operation
Definition: fxobjects.cpp:1082
Custom structure that holds magnitude information about a brickwall filter.
Definition: fxobjects.h:561
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2571
double fc
filter fc
Definition: fxobjects.h:8174
double lastEnvelope
output register
Definition: fxobjects.h:1945
virtual double getComponentValue()
Definition: fxobjects.h:6113
virtual double getComponentResistance()
Definition: fxobjects.h:6354
double innerAPF_g
g coefficient for inner APF
Definition: fxobjects.h:4377
double psi[PSM_FFT_LEN]
array of phase correction values for classic algorithm
Definition: fxobjects.h:9587
virtual double getOutput3()
Definition: fxobjects.h:6538
double releaseTime
release time coefficient
Definition: fxobjects.h:1943
double alpha0
input scalar, correct delay-free loop
Definition: fxobjects.h:5379
virtual double getComponentConductance()
Definition: fxobjects.h:6721
bool clampToUnityMax
clamp output to 1.0 (set false for true log detectors)
Definition: fxobjects.h:1810
ClassATubePreParameters parameters
object parameters
Definition: fxobjects.h:5899
double phaseInc
phase inc = fo/fs
Definition: fxobjects.h:3045
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7985
delayAlgorithm
Use this strongly typed enum to easily set the delay algorithm.
Definition: fxobjects.h:2641
double highShelfBoostCut_dB
HSF shelf frequency.
Definition: fxobjects.h:5787
The PhaseVocoder provides a basic phase vocoder that is initialized to N = 4096 and 75% overlap; the ...
Definition: fxobjects.h:8823
virtual double getOutput1()
Definition: fxobjects.h:6900
virtual double getOutput2()
Definition: fxobjects.h:6535
double makeUpGain_dB
stored makeup gain (dB)
Definition: fxobjects.h:5098
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6516
bool enableLPF
flag to enable LPF in structure
Definition: fxobjects.h:4178
double * windowBuff
buffer for window
Definition: fxobjects.h:9596
double sourceResistance
source impedance; OK for this to be set to 0.0 for Rs = 0
Definition: fxobjects.h:7313
double componentValue_R
component value R
Definition: fxobjects.h:6800
BitCrusherParameters & operator=(const BitCrusherParameters ¶ms)
Definition: fxobjects.h:5923
virtual double getComponentConductance()
Definition: fxobjects.h:6598
virtual double getOutput1()
Definition: fxobjects.h:7023
WdfSeriesAdaptor seriesAdaptor_R
adaptor for series R
Definition: fxobjects.h:8661
virtual double getOutput3()=0
DelayAPFParameters & operator=(const DelayAPFParameters ¶ms)
Definition: fxobjects.h:4158
windowType window
window type
Definition: fxobjects.h:8799
fftw_plan plan_backward
FFTW plan for IFFT.
Definition: fxobjects.h:8795
unsigned int startBin
starting bin for transition band
Definition: fxobjects.h:611
double RR
RR value.
Definition: fxobjects.h:6681
double fixeDelayWeight_Pct
fixed delay max weighying
Definition: fxobjects.h:4729
double g
simple LPF g value
Definition: fxobjects.h:3731
BinData & operator=(const BinData ¶ms)
Definition: fxobjects.h:9099
fftw_complex * doFFT(double *inputReal, double *inputImag=nullptr)
perform the FFT operation
Definition: fxobjects.cpp:1176
double phi[PSM_FFT_LEN]
array of phase values for classic algorithm
Definition: fxobjects.h:9586
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5960
unsigned int localPeakBin
index of peak-boss
Definition: fxobjects.h:9133
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4085
double dryLevel_dB
dry output level in dB
Definition: fxobjects.h:2696
virtual void setInput2(double _in2)
Definition: fxobjects.h:7505
virtual double getOutput()
Definition: fxobjects.h:6529
The WDFIdealRLCHPF object implements an ideal RLC HPF using the WDF library.
Definition: fxobjects.h:8319
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6929
void setParameters(const BiquadParameters &_parameters)
Definition: fxobjects.h:1404
double outerAPF_g
g coefficient for outer APF
Definition: fxobjects.h:4376
The NestedDelayAPF object implements a pair of nested Delaying APF structures. These are labled the o...
Definition: fxobjects.h:4406
PhaseShifterParameters getParameters()
Definition: fxobjects.h:3681
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:9725
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2770
The WdfParallelRL object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6699
T readBuffer(double delayInFractionalSamples)
Definition: fxobjects.h:2357