39const double kSmallestPositiveFloatValue = 1.175494351e-38;
40const double kSmallestNegativeFloatValue = -1.175494351e-38;
41const double kSqrtTwo = pow(2.0, 0.5);
42const double kMinFilterFrequency = 20.0;
43const double kMaxFilterFrequency = 20480.0;
44const 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]);
167inline 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;
358inline double sgn(
double xn)
360 return (xn > 0) - (xn < 0);
373inline 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));
448inline 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--];
935inline 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);
1041enum class interpolation {kLinear, kLagrange4};
1060inline 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;
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;
1768const unsigned int TLD_AUDIO_DETECT_MODE_PEAK = 0;
1769const unsigned int TLD_AUDIO_DETECT_MODE_MS = 1;
1770const unsigned int TLD_AUDIO_DETECT_MODE_RMS = 2;
1771const 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;
2231template <
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;
2293template <
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++)
2491const 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)
3501const unsigned int PHASER_STAGES = 6;
3523const double apf0_minF = 32.0;
3524const double apf0_maxF = 1500.0;
3526const double apf1_minF = 68.0;
3527const double apf1_maxF = 3400.0;
3529const double apf2_minF = 96.0;
3530const double apf2_maxF = 4800.0;
3532const double apf3_minF = 212.0;
3533const double apf3_maxF = 10000.0;
3535const double apf4_minF = 320.0;
3536const double apf4_maxF = 16000.0;
3538const double apf5_minF = 636.0;
3539const 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)
4746const unsigned int NUM_BRANCHES = 4;
4747const 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;
5742const 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));
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)
7074enum 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));
8685enum class windowType {kNoWindow, kRectWindow, kHannWindow, kBlackmanHarrisWindow, kHammingWindow };
8697inline 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;
9080const 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 };
9619const 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];
9725inline 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++)
The AnalogFIRFilter object implements a somewhat silly algorithm that implaments an analog magnitude ...
Definition: fxobjects.h:2547
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2571
AnalogFIRFilterParameters getParameters()
Definition: fxobjects.h:2584
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2578
void setParameters(AnalogFIRFilterParameters _parameters)
Definition: fxobjects.h:2590
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2554
The AudioDelay object implements a stereo audio delay with multiple delay algorithms.
Definition: fxobjects.h:2723
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2752
void createDelayBuffers(double _sampleRate, double _bufferLength_mSec)
Definition: fxobjects.h:2899
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:2773
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2770
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2730
AudioDelayParameters getParameters()
Definition: fxobjects.h:2854
void setParameters(AudioDelayParameters _parameters)
Definition: fxobjects.h:2860
The AudioDetector object implements the audio detector defined in the book source below....
Definition: fxobjects.h:1832
AudioDetectorParameters audioDetectorParameters
parameters for object
Definition: fxobjects.h:1941
double sampleRate
stored sample rate
Definition: fxobjects.h:1944
double releaseTime
release time coefficient
Definition: fxobjects.h:1943
void setParameters(const AudioDetectorParameters ¶meters)
Definition: fxobjects.h:1917
void setAttackTime(double attack_in_ms, bool forceCalc=false)
sets the new attack time and re-calculates the time constant
Definition: fxobjects.cpp:958
double lastEnvelope
output register
Definition: fxobjects.h:1945
double attackTime
attack time coefficient
Definition: fxobjects.h:1942
virtual double processAudioSample(double xn)
Definition: fxobjects.h:1854
AudioDetectorParameters getParameters()
Definition: fxobjects.h:1908
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1847
void setReleaseTime(double release_in_ms, bool forceCalc=false)
sets the new release time and re-calculates the time constant
Definition: fxobjects.cpp:974
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1839
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1928
The AudioFilter object implements all filters in Designing Audio Effects Plugins in C++ 2nd Ed....
Definition: fxobjects.h:1521
double getG_value()
Definition: fxobjects.h:1584
double coeffArray[numCoeffs]
our local copy of biquad coeffs
Definition: fxobjects.h:1594
double sampleRate
current sample rate
Definition: fxobjects.h:1598
virtual double processAudioSample(double xn)
process one sample through the audio filter
Definition: fxobjects.cpp:944
AudioFilterParameters audioFilterParameters
parameters
Definition: fxobjects.h:1597
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1528
AudioFilterParameters getParameters()
Definition: fxobjects.h:1559
double getS_value()
Definition: fxobjects.h:1587
void setParameters(const AudioFilterParameters ¶meters)
Definition: fxobjects.h:1562
bool calculateFilterCoeffs()
Definition: fxobjects.cpp:153
Biquad biquad
the biquad object
Definition: fxobjects.h:1591
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1552
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1542
The Biquad object implements a first or second order H(z) transfer function using one of four standar...
Definition: fxobjects.h:1370
void setCoefficients(double *coeffs)
Definition: fxobjects.h:1408
void setParameters(const BiquadParameters &_parameters)
Definition: fxobjects.h:1404
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1378
double * getCoefficients()
Definition: fxobjects.h:1414
BiquadParameters getParameters()
Definition: fxobjects.h:1398
BiquadParameters parameters
Definition: fxobjects.h:1441
double getG_value()
Definition: fxobjects.h:1428
double * getStateArray()
Definition: fxobjects.h:1421
double getS_value()
returns the storage component S(n) for delay-free loop solutions
Definition: fxobjects.cpp:32
virtual double processAudioSample(double xn)
process one sample through the biquad
Definition: fxobjects.cpp:67
double storageComponent
Definition: fxobjects.h:1444
double coeffArray[numCoeffs]
Definition: fxobjects.h:1435
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1385
double stateArray[numStates]
Definition: fxobjects.h:1438
The BitCrusher object implements a quantizing bitcrusher algorithm.
Definition: fxobjects.h:5954
double QL
the quantization level
Definition: fxobjects.h:5996
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5982
BitCrusherParameters getParameters()
Definition: fxobjects.h:5966
BitCrusherParameters parameters
object parameters
Definition: fxobjects.h:5995
void setParameters(const BitCrusherParameters ¶ms)
Definition: fxobjects.h:5972
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5989
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5960
The CircularBuffer object implements a simple circular buffer. It uses a wrap mask to wrap the read o...
Definition: fxobjects.h:2295
void flushBuffer()
Definition: fxobjects.h:2301
T readBuffer(int delayInSamples)
Definition: fxobjects.h:2342
void writeBuffer(T input)
Definition: fxobjects.h:2332
void createCircularBufferPowerOfTwo(unsigned int _bufferLengthPowerOfTwo)
Definition: fxobjects.h:2313
void createCircularBuffer(unsigned int _bufferLength)
Definition: fxobjects.h:2305
T readBuffer(double delayInFractionalSamples)
Definition: fxobjects.h:2357
void setInterpolate(bool b)
Definition: fxobjects.h:2378
The ClassATubePre object implements a simple cascade of four (4) triode tube models.
Definition: fxobjects.h:5809
ClassATubePreParameters parameters
object parameters
Definition: fxobjects.h:5899
double outputLevel
output level (not in dB)
Definition: fxobjects.h:5904
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5885
ClassATubePreParameters getParameters()
Definition: fxobjects.h:5843
void setParameters(const ClassATubePreParameters ¶ms)
Definition: fxobjects.h:5849
TwoBandShelvingFilter shelvingFilter
shelving filters
Definition: fxobjects.h:5901
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5878
TriodeClassA triodes[NUM_TUBES]
array of triode tube objects
Definition: fxobjects.h:5900
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5815
double inputLevel
input level (not in dB)
Definition: fxobjects.h:5903
The CombFilter object implements a comb filter with optional LPF in feedback loop....
Definition: fxobjects.h:4036
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4085
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4059
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4043
CombFilterParameters getParameters()
Definition: fxobjects.h:4091
void setParameters(const CombFilterParameters ¶ms)
Definition: fxobjects.h:4100
void createDelayBuffer(double _sampleRate, double delay_mSec)
Definition: fxobjects.h:4120
The DFOscillator object implements generates a very pure sinusoidal oscillator by placing poles direc...
Definition: fxobjects.h:3156
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3162
OscillatorParameters parameters
object parameters
Definition: fxobjects.h:3247
OscillatorParameters getParameters()
Definition: fxobjects.h:3174
double stateArray[numDFOStates]
array of state registers
Definition: fxobjects.h:3250
double coeffArray[numDFOCoeffs]
array of coefficients
Definition: fxobjects.h:3251
virtual const SignalGenData renderAudioOutput()
Definition: fxobjects.h:3193
void updateDFO()
Definition: fxobjects.h:3210
void setParameters(const OscillatorParameters ¶ms)
Definition: fxobjects.h:3183
double sampleRate
sample rate
Definition: fxobjects.h:3254
The Decimator object implements a sample rate decimator. Ana array of M input samples is decimated to...
Definition: fxobjects.h:9910
unsigned int FIRLength
FIR length.
Definition: fxobjects.h:9985
FastConvolver convolver
fast convolver
Definition: fxobjects.h:9981
bool polyphase
enable polyphase decomposition
Definition: fxobjects.h:9989
rateConversionRatio ratio
conversion ration
Definition: fxobjects.h:9986
FastConvolver polyPhaseConvolvers[maxSamplingRatio]
a set of sub-band convolvers for polyphase operation
Definition: fxobjects.h:9990
unsigned int sampleRate
sample rate
Definition: fxobjects.h:9984
void initialize(unsigned int _FIRLength, rateConversionRatio _ratio, unsigned int _sampleRate, bool _polyphase=true)
Definition: fxobjects.h:9922
double decimateAudio(DecimatorInput data)
Definition: fxobjects.h:9961
The DelayAPF object implements a delaying APF with optional LPF and optional modulated delay time wit...
Definition: fxobjects.h:4206
double lpf_state
LPF state register (z^-1)
Definition: fxobjects.h:4335
DelayAPFParameters delayAPFParameters
obeject parameters
Definition: fxobjects.h:4324
DelayAPFParameters getParameters()
Definition: fxobjects.h:4293
SimpleDelay delay
delay
Definition: fxobjects.h:4329
LFO modLFO
LFO.
Definition: fxobjects.h:4332
double sampleRate
current sample rate
Definition: fxobjects.h:4325
void createDelayBuffer(double _sampleRate, double delay_mSec)
Definition: fxobjects.h:4313
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4232
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4213
double bufferLength_mSec
total buffer length in mSec
Definition: fxobjects.h:4326
void setParameters(const DelayAPFParameters ¶ms)
Definition: fxobjects.h:4302
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4287
The DynamicsProcessor object implements a dynamics processor suite: compressor, limiter,...
Definition: fxobjects.h:2046
virtual void enableAuxInput(bool enableAuxInput)
Definition: fxobjects.h:2068
DynamicsProcessorParameters getParameters()
Definition: fxobjects.h:2081
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2065
double computeGain(double detect_dB)
Definition: fxobjects.h:2136
double sidechainInputSample
storage for sidechain sample
Definition: fxobjects.h:2133
AudioDetector detector
the sidechain audio detector
Definition: fxobjects.h:2130
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2107
DynamicsProcessorParameters parameters
object parameters
Definition: fxobjects.h:2129
virtual double processAuxInputAudioSample(double xn)
Definition: fxobjects.h:2071
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2053
void setParameters(const DynamicsProcessorParameters &_parameters)
Definition: fxobjects.h:2087
The EnvelopeFollower object implements a traditional envelope follower effect modulating a LPR fc val...
Definition: fxobjects.h:5448
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5473
EnvelopeFollowerParameters parameters
object parameters
Definition: fxobjects.h:5555
void setParameters(const EnvelopeFollowerParameters ¶ms)
Definition: fxobjects.h:5490
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5521
EnvelopeFollowerParameters getParameters()
Definition: fxobjects.h:5484
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5514
AudioDetector detector
detector to track input signal
Definition: fxobjects.h:5559
ZVAFilter filter
filter to modulate
Definition: fxobjects.h:5558
The FastConvolver provides a fast convolver - the user supplies the filter IR and the object snapshot...
Definition: fxobjects.h:8943
FastFFT filterFastFFT
FastFFT object.
Definition: fxobjects.h:9072
unsigned int getFilterIRLength()
Definition: fxobjects.h:9068
unsigned int inputCount
input sample counter
Definition: fxobjects.h:9075
void setFilterIR(double *irBuffer)
Definition: fxobjects.h:8989
unsigned int filterImpulseLength
IR length.
Definition: fxobjects.h:9076
void initialize(unsigned int _filterImpulseLength)
Definition: fxobjects.h:8960
double * filterIR
filter IR
Definition: fxobjects.h:9074
double processAudioSample(double input)
Definition: fxobjects.h:9019
unsigned int getFrameLength()
Definition: fxobjects.h:9065
PhaseVocoder vocoder
vocoder object
Definition: fxobjects.h:9071
fftw_complex * filterFFT
filterFFT output arrays
Definition: fxobjects.h:9073
The FastFFT provides a simple wrapper for the FFTW FFT operation - it is ultra-thin and simple to use...
Definition: fxobjects.h:8765
fftw_complex * fft_input
array for FFT input
Definition: fxobjects.h:8790
void initialize(unsigned int _frameLength, windowType _window)
initialize the Fast FFT object for operation
Definition: fxobjects.cpp:1082
fftw_plan plan_forward
FFTW plan for FFT.
Definition: fxobjects.h:8794
fftw_complex * ifft_input
array for IFFT input
Definition: fxobjects.h:8792
unsigned int getFrameLength()
Definition: fxobjects.h:8786
windowType window
window type
Definition: fxobjects.h:8799
double * windowBuffer
buffer for window (naked)
Definition: fxobjects.h:8797
double windowGainCorrection
window gain correction
Definition: fxobjects.h:8798
fftw_complex * ifft_result
array for IFFT output
Definition: fxobjects.h:8793
void destroyFFTW()
destroys the FFTW arrays and plans.
Definition: fxobjects.cpp:1051
fftw_complex * fft_result
array for FFT output
Definition: fxobjects.h:8791
fftw_complex * doInverseFFT(double *inputReal, double *inputImag)
perform the IFFT operation
Definition: fxobjects.cpp:1204
unsigned int frameLength
current FFT length
Definition: fxobjects.h:8800
fftw_complex * doFFT(double *inputReal, double *inputImag=nullptr)
perform the FFT operation
Definition: fxobjects.cpp:1176
fftw_plan plan_backward
FFTW plan for IFFT.
Definition: fxobjects.h:8795
Use this interface for objects that render an output without an input, such as oscillators....
Definition: fxobjects.h:1240
virtual bool reset(double _sampleRate)=0
virtual const SignalGenData renderAudioOutput()=0
Use this interface for objects that process audio input samples to produce audio output samples....
Definition: fxobjects.h:1160
virtual bool reset(double _sampleRate)=0
virtual void enableAuxInput(bool enableAuxInput)
Definition: fxobjects.h:1179
virtual double processAudioSample(double xn)=0
virtual double processAuxInputAudioSample(double xn)
Definition: fxobjects.h:1183
virtual bool canProcessAudioFrame()=0
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:1193
virtual void setSampleRate(double _sampleRate)
Definition: fxobjects.h:1176
Use this interface for objects in the WDF Ladder Filter library; see book for more information.
Definition: fxobjects.h:6016
virtual void updateComponentResistance()
Definition: fxobjects.h:6059
virtual void setInput3(double _in3)=0
virtual void setInput(double _in)
Definition: fxobjects.h:6025
virtual double getOutput()
Definition: fxobjects.h:6028
virtual void setInput2(double _in2)=0
virtual void setComponentValue_LC(double componentValue_L, double componentValue_C)
Definition: fxobjects.h:6065
virtual double getOutput2()=0
virtual void initializeAdaptorChain()
Definition: fxobjects.h:6022
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6062
virtual double getComponentValue()
Definition: fxobjects.h:6074
virtual void setComponentValue_RL(double componentValue_R, double componentValue_L)
Definition: fxobjects.h:6068
virtual double getOutput3()=0
virtual void setComponentValue_RC(double componentValue_R, double componentValue_C)
Definition: fxobjects.h:6071
virtual double getComponentResistance()
Definition: fxobjects.h:6053
virtual void initialize(double _R1)
Definition: fxobjects.h:6019
virtual double getOutput1()=0
virtual void setInput1(double _in1)=0
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6050
virtual double getComponentConductance()
Definition: fxobjects.h:6056
The ImpulseConvolver object implements a linear conovlver. NOTE: compile in Release mode or you may e...
Definition: fxobjects.h:2408
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:2416
void init(unsigned int lengthPowerOfTwo)
Definition: fxobjects.h:2456
virtual double processAudioSample(double xn)
Definition: fxobjects.h:2428
LinearBuffer< double > irBuffer
linear buffer for the IR
Definition: fxobjects.h:2485
void setImpulseResponse(double *irArray, unsigned int lengthPowerOfTwo)
Definition: fxobjects.h:2465
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:2453
unsigned int length
length of convolution (buffer)
Definition: fxobjects.h:2487
CircularBuffer< double > signalBuffer
circulat buffer for the signal
Definition: fxobjects.h:2484
The Interpolator object implements a sample rate interpolator. One input sample yields N output sampl...
Definition: fxobjects.h:9785
rateConversionRatio ratio
conversion ration
Definition: fxobjects.h:9866
InterpolatorOutput interpolateAudio(double xn)
Definition: fxobjects.h:9836
unsigned int sampleRate
sample rate
Definition: fxobjects.h:9864
void initialize(unsigned int _FIRLength, rateConversionRatio _ratio, unsigned int _sampleRate, bool _polyphase=true)
Definition: fxobjects.h:9797
bool polyphase
enable polyphase decomposition
Definition: fxobjects.h:9869
unsigned int FIRLength
FIR length.
Definition: fxobjects.h:9865
FastConvolver convolver
the convolver
Definition: fxobjects.h:9861
FastConvolver polyPhaseConvolvers[maxSamplingRatio]
a set of sub-band convolvers for polyphase operation
Definition: fxobjects.h:9870
The LFO object implements a mathematically perfect LFO generator for modulation uses only....
Definition: fxobjects.h:2996
virtual const SignalGenData renderAudioOutput()
generates the oscillator output for one sample interval; note that there are multiple outputs.
Definition: fxobjects.cpp:986
double phaseInc
phase inc = fo/fs
Definition: fxobjects.h:3045
bool checkAndWrapModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3049
OscillatorParameters lfoParameters
obejcgt parameters
Definition: fxobjects.h:3038
double sampleRate
sample rate
Definition: fxobjects.h:3041
double parabolicSine(double angle)
Definition: fxobjects.h:3098
OscillatorParameters getParameters()
Definition: fxobjects.h:3018
void setParameters(const OscillatorParameters ¶ms)
Definition: fxobjects.h:3024
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3002
double modCounter
modulo counter [0.0, +1.0]
Definition: fxobjects.h:3044
void advanceModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3092
bool advanceAndCheckWrapModulo(double &moduloCounter, double phaseInc)
Definition: fxobjects.h:3069
double modCounterQP
Quad Phase modulo counter [0.0, +1.0].
Definition: fxobjects.h:3046
The LRFilterBank object implements 2 Linkwitz-Riley Filters in a parallel filter bank to split the si...
Definition: fxobjects.h:1679
FilterBankOutput processFilterBank(double xn)
Definition: fxobjects.h:1717
LRFilterBankParameters parameters
parameters for the object
Definition: fxobjects.h:1764
virtual double processAudioSample(double xn)
Definition: fxobjects.h:1711
LRFilterBankParameters getParameters()
Definition: fxobjects.h:1735
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:1696
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:1704
AudioFilter hpFilter
high-band filter
Definition: fxobjects.h:1761
AudioFilter lpFilter
low-band filter
Definition: fxobjects.h:1760
void setParameters(const LRFilterBankParameters &_parameters)
Definition: fxobjects.h:1744
The LinearBuffer object implements a linear buffer of type T. It allows easy wrapping of a smart poin...
Definition: fxobjects.h:2233
void createLinearBuffer(unsigned int _bufferLength)
Definition: fxobjects.h:2243
void writeBuffer(unsigned int index, T input)
Definition: fxobjects.h:2256
void flushBuffer()
Definition: fxobjects.h:2239
T readBuffer(unsigned int index)
Definition: fxobjects.h:2265
The ModulatedDelay object implements the three basic algorithms: flanger, chorus, vibrato.
Definition: fxobjects.h:3326
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3363
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3334
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:3366
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3354
void setParameters(ModulatedDelayParameters _parameters)
Definition: fxobjects.h:3441
ModulatedDelayParameters getParameters()
Definition: fxobjects.h:3435
The NestedDelayAPF object implements a pair of nested Delaying APF structures. These are labled the o...
Definition: fxobjects.h:4407
NestedDelayAPFParameters getParameters()
Definition: fxobjects.h:4492
void setParameters(const NestedDelayAPFParameters ¶ms)
Definition: fxobjects.h:4498
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4430
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4414
void createDelayBuffers(double _sampleRate, double delay_mSec, double nestedAPFDelay_mSec)
Definition: fxobjects.h:4524
The PSMVocoder object implements a phase vocoder pitch shifter. Phase locking and peak tracking are o...
Definition: fxobjects.h:9190
int findPreviousNearestPeak(int peakIndex)
Definition: fxobjects.h:9260
unsigned int outputBufferLength
lenght of resampled output array
Definition: fxobjects.h:9599
double ha
ha = N/4 — 75% overlap
Definition: fxobjects.h:9585
int peakBinsPrevious[PSM_FFT_LEN]
array of previous peak bin index values (-1 = not peak)
Definition: fxobjects.h:9594
const double hs
hs = N/4 — 75% overlap
Definition: fxobjects.h:9584
void findPeaksAndRegionsOfInfluence()
Definition: fxobjects.h:9292
BinData binDataPrevious[PSM_FFT_LEN]
array of BinData structures for previous FFT frame
Definition: fxobjects.h:9591
double alphaStretchRatio
alpha stretch ratio = hs/ha
Definition: fxobjects.h:9581
double windowCorrection
window correction value
Definition: fxobjects.h:9598
void setPitchShift(double semitones)
Definition: fxobjects.h:9225
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:9202
double * windowBuff
buffer for window
Definition: fxobjects.h:9596
double * outputBuff
buffer for resampled output
Definition: fxobjects.h:9597
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:9222
int peakBins[PSM_FFT_LEN]
array of current peak bin index values (-1 = not peak)
Definition: fxobjects.h:9593
PhaseVocoder vocoder
vocoder to perform PSM
Definition: fxobjects.h:9580
double phi[PSM_FFT_LEN]
array of phase values for classic algorithm
Definition: fxobjects.h:9586
void setParameters(const PSMVocoderParameters ¶ms)
Definition: fxobjects.h:9567
BinData binData[PSM_FFT_LEN]
array of BinData structures for current FFT frame
Definition: fxobjects.h:9590
PSMVocoderParameters getParameters()
Definition: fxobjects.h:9558
double psi[PSM_FFT_LEN]
array of phase correction values for classic algorithm
Definition: fxobjects.h:9587
PSMVocoderParameters parameters
object parameters
Definition: fxobjects.h:9579
virtual double processAudioSample(double input)
Definition: fxobjects.h:9396
The PeakLimiter object implements a simple peak limiter; it is really a simplified and hard-wired ver...
Definition: fxobjects.h:5017
void setMakeUpGain_dB(double _makeUpGain_dB)
Definition: fxobjects.h:5093
void setThreshold_dB(double _threshold_dB)
Definition: fxobjects.h:5090
double computeGain(double detect_dB)
Definition: fxobjects.h:5053
AudioDetector detector
the detector object
Definition: fxobjects.h:5096
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5040
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5047
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5023
double makeUpGain_dB
stored makeup gain (dB)
Definition: fxobjects.h:5098
double threshold_dB
stored threshold (dB)
Definition: fxobjects.h:5097
The PhaseShifter object implements a six-stage phaser.
Definition: fxobjects.h:3559
AudioFilter apf[PHASER_STAGES]
six APF objects
Definition: fxobjects.h:3702
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3599
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3675
LFO lfo
the one and only LFO
Definition: fxobjects.h:3703
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3581
PhaseShifterParameters getParameters()
Definition: fxobjects.h:3681
PhaseShifterParameters parameters
the object parameters
Definition: fxobjects.h:3701
void setParameters(const PhaseShifterParameters ¶ms)
Definition: fxobjects.h:3687
The PhaseVocoder provides a basic phase vocoder that is initialized to N = 4096 and 75% overlap; the ...
Definition: fxobjects.h:8824
double overlap
overlap as raw value (75% = 0.75)
Definition: fxobjects.h:8915
unsigned int hopSize
hop: ha = hs
Definition: fxobjects.h:8914
unsigned int outputReadIndex
circular buffer index: output read
Definition: fxobjects.h:8894
double windowHopCorrection
window correction including hop/overlap
Definition: fxobjects.h:8900
double getOverlap()
Definition: fxobjects.h:8868
unsigned int getFrameLength()
Definition: fxobjects.h:8862
unsigned int outputWriteIndex
circular buffer index: output write
Definition: fxobjects.h:8892
bool advanceAndCheckFFT()
advance the sample counter and check to see if we need to do the FFT.
Definition: fxobjects.cpp:1422
bool addZeroPad(unsigned int count)
zero pad the input timeline
Definition: fxobjects.cpp:1392
fftw_plan plan_forward
FFTW plan for FFT.
Definition: fxobjects.h:8880
double * inputBuffer
input timeline (x)
Definition: fxobjects.h:8887
bool needOverlapAdd
internal flag to signal overlap/add required
Definition: fxobjects.h:8904
fftw_complex * getFFTData()
Definition: fxobjects.h:8850
void setOverlapAddOnly(bool b)
Definition: fxobjects.h:8873
double * windowBuffer
array for window
Definition: fxobjects.h:8884
unsigned int fftCounter
FFT sample counter.
Definition: fxobjects.h:8911
unsigned int frameLength
current FFT length
Definition: fxobjects.h:8910
fftw_complex * fft_result
array for FFT output
Definition: fxobjects.h:8878
bool needInverseFFT
internal flag to signal IFFT required
Definition: fxobjects.h:8903
bool overlapAddOnly
flag for overlap-add-only algorithms
Definition: fxobjects.h:8919
double * outputBuffer
output timeline (y)
Definition: fxobjects.h:8888
windowType window
window type
Definition: fxobjects.h:8907
void doInverseFFT()
perform the inverse FFT on the processed data
Definition: fxobjects.cpp:1516
unsigned int wrapMask
input wrap mask
Definition: fxobjects.h:8895
fftw_complex * fft_input
array for FFT input
Definition: fxobjects.h:8877
unsigned int inputReadIndex
circular buffer index: input read
Definition: fxobjects.h:8893
fftw_complex * getIFFTData()
Definition: fxobjects.h:8853
unsigned int inputWriteIndex
circular buffer index: input write
Definition: fxobjects.h:8891
unsigned int wrapMaskOut
output wrap mask
Definition: fxobjects.h:8896
fftw_plan plan_backward
FFTW plan for IFFT.
Definition: fxobjects.h:8881
void destroyFFTW()
destroys the FFTW arrays and plans.
Definition: fxobjects.cpp:1225
fftw_complex * ifft_result
array for IFFT output
Definition: fxobjects.h:8879
void initialize(unsigned int _frameLength, unsigned int _hopSize, windowType _window)
initialize the Fast FFT object for operation
Definition: fxobjects.cpp:1251
void doOverlapAdd(double *outputData=nullptr, int length=0)
perform the overlap/add on the IFFT data
Definition: fxobjects.cpp:1535
double processAudioSample(double input, bool &fftReady)
process one input sample throug the vocoder to produce one output sample
Definition: fxobjects.cpp:1476
unsigned int getHopSize()
Definition: fxobjects.h:8865
The ReverbTank object implements the cyclic reverb tank in the FX book listed below.
Definition: fxobjects.h:4767
ReverbTankParameters getParameters()
Definition: fxobjects.h:4905
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4808
void setParameters(const ReverbTankParameters ¶ms)
Definition: fxobjects.h:4911
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4801
virtual bool processAudioFrame(const float *inputFrame, float *outputFrame, uint32_t inputChannels, uint32_t outputChannels)
Definition: fxobjects.h:4817
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4773
The SimpleDelay object implements a basic delay line without feedback.
Definition: fxobjects.h:3856
void createDelayBuffer(double _sampleRate, double _bufferLength_mSec)
Definition: fxobjects.h:3923
SimpleDelayParameters getParameters()
Definition: fxobjects.h:3883
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3863
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3920
double readDelayAtPercentage(double delayPercent)
Definition: fxobjects.h:3955
double readDelayAtTime_mSec(double _delay_mSec)
Definition: fxobjects.h:3945
void setParameters(const SimpleDelayParameters ¶ms)
Definition: fxobjects.h:3892
void writeDelay(double xn)
Definition: fxobjects.h:3962
double readDelay()
Definition: fxobjects.h:3938
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3904
The SimpleLPF object implements a first order one-pole LPF using one coefficient "g" value.
Definition: fxobjects.h:3752
virtual double processAudioSample(double xn)
Definition: fxobjects.h:3788
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:3759
SimpleLPFParameters getParameters()
Definition: fxobjects.h:3769
void setParameters(const SimpleLPFParameters ¶ms)
Definition: fxobjects.h:3778
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:3797
The TriodeClassA object simulates a triode in class A configuration. This is a very simple and basic ...
Definition: fxobjects.h:5648
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5699
TriodeClassAParameters parameters
object parameters
Definition: fxobjects.h:5737
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5664
AudioFilter outputLSF
LSF to simulate shelf caused by cathode self-biasing cap.
Definition: fxobjects.h:5739
AudioFilter outputHPF
HPF to simulate output DC blocking cap.
Definition: fxobjects.h:5738
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5706
void setParameters(const TriodeClassAParameters ¶ms)
Definition: fxobjects.h:5683
TriodeClassAParameters getParameters()
Definition: fxobjects.h:5677
The TwoBandShelvingFilter object implements two shelving filters in series in the standard "Bass and ...
Definition: fxobjects.h:4590
void setParameters(const TwoBandShelvingFilterParameters ¶ms)
Definition: fxobjects.h:4643
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:4606
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:4614
virtual double processAudioSample(double xn)
Definition: fxobjects.h:4621
TwoBandShelvingFilterParameters getParameters()
Definition: fxobjects.h:4634
The WDFBesselBSF3 object implements a 3rd order Bessel BSF NOTE: designed with Elsie www....
Definition: fxobjects.h:7979
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L3C3
adaptor for L3 and C3
Definition: fxobjects.h:8040
WdfParallelAdaptor parallelAdaptor_L2C2
adaptor for L2 and C2
Definition: fxobjects.h:8039
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8006
WdfSeriesAdaptor seriesAdaptor_L1C1
adaptor for L1 and C1
Definition: fxobjects.h:8038
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7999
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7985
void createWDF()
Definition: fxobjects.h:8016
The WDFButterLPF3 object implements a 3rd order Butterworth ladder filter. NOTE: designed with Elsie ...
Definition: fxobjects.h:7788
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7807
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7794
WdfSeriesAdaptor seriesAdaptor_L1
adaptor for L1
Definition: fxobjects.h:7849
void createWDF()
Definition: fxobjects.h:7824
virtual double processAudioSample(double xn)
Definition: fxobjects.h:7814
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L2
adaptor for L2
Definition: fxobjects.h:7851
WdfParallelAdaptor parallelAdaptor_C1
adaptor for C1
Definition: fxobjects.h:7850
The WDFConstKBPF6 object implements a 6th order constant K BPF NOTE: designed with Elsie www....
Definition: fxobjects.h:8063
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_L6C6
adaptor for L6 and C6
Definition: fxobjects.h:8142
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8094
WdfSeriesAdaptor seriesAdaptor_L5C5
adaptor for L5 and C5
Definition: fxobjects.h:8141
WdfSeriesAdaptor seriesAdaptor_L3C3
adaptor for L3 and C3
Definition: fxobjects.h:8138
void createWDF()
Definition: fxobjects.h:8106
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8069
WdfParallelAdaptor parallelAdaptor_L2C2
adaptor for L2 and C2
Definition: fxobjects.h:8136
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8087
WdfSeriesAdaptor seriesAdaptor_L1C1
adaptor for L1 and C1
Definition: fxobjects.h:8135
WdfParallelAdaptor parallelAdaptor_L4C4
adaptor for L4 and C4
Definition: fxobjects.h:8139
The WDFIdealRLCBPF object implements an ideal RLC BPF using the WDF library.
Definition: fxobjects.h:8442
WdfSeriesAdaptor seriesAdaptor_LC
adaptor for LC
Definition: fxobjects.h:8539
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8468
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8448
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8510
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8461
WDFParameters getParameters()
Definition: fxobjects.h:8504
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_R
adaptor for R
Definition: fxobjects.h:8540
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8536
void createWDF()
Definition: fxobjects.h:8480
The WDFIdealRLCBSF object implements an ideal RLC BSF using the WDF library.
Definition: fxobjects.h:8564
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8583
WdfSeriesAdaptor seriesAdaptor_R
adaptor for series R
Definition: fxobjects.h:8661
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8590
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8658
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_LC
adaptor for parallel LC
Definition: fxobjects.h:8662
WDFParameters getParameters()
Definition: fxobjects.h:8626
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8632
void createWDF()
Definition: fxobjects.h:8602
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8570
double sampleRate
sample rate storage
Definition: fxobjects.h:8664
The WDFIdealRLCHPF object implements an ideal RLC HPF using the WDF library.
Definition: fxobjects.h:8320
void createWDF()
Definition: fxobjects.h:8358
WDFParameters getParameters()
Definition: fxobjects.h:8382
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8339
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8415
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8346
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8326
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_L
adaptor for L
Definition: fxobjects.h:8419
double sampleRate
sample rate storage
Definition: fxobjects.h:8421
WdfSeriesAdaptor seriesAdaptor_RC
adaptor for RC
Definition: fxobjects.h:8418
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8388
The WDFIdealRLCLPF object implements an ideal RLC LPF using the WDF library.
Definition: fxobjects.h:8198
WDFParameters wdfParameters
object parameters
Definition: fxobjects.h:8292
WDFParameters getParameters()
Definition: fxobjects.h:8261
void setParameters(const WDFParameters &_wdfParameters)
Definition: fxobjects.h:8267
WdfSeriesAdaptor seriesAdaptor_RL
adaptor for series RL
Definition: fxobjects.h:8295
virtual double processAudioSample(double xn)
Definition: fxobjects.h:8225
void createWDF()
Definition: fxobjects.h:8237
WdfParallelTerminatedAdaptor parallelTerminatedAdaptor_C
adaptopr for parallel C
Definition: fxobjects.h:8296
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:8218
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:8204
The WDFTunableButterLPF3 object implements a tunable 3rd order Butterworth ladder filter....
Definition: fxobjects.h:7874
bool useFrequencyWarping
flag for freq warping
Definition: fxobjects.h:7956
WdfSeriesTerminatedAdaptor seriesTerminatedAdaptor_L2
adaptor for L2
Definition: fxobjects.h:7950
void setFilterFc(double fc_Hz)
Definition: fxobjects.h:7933
double sampleRate
stored sample rate
Definition: fxobjects.h:7957
WdfSeriesAdaptor seriesAdaptor_L1
adaptor for L1
Definition: fxobjects.h:7948
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:7894
virtual double processAudioSample(double xn)
Definition: fxobjects.h:7901
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:7880
WdfParallelAdaptor parallelAdaptor_C1
adaptor for C1
Definition: fxobjects.h:7949
void setUsePostWarping(bool b)
Definition: fxobjects.h:7930
void createWDF()
Definition: fxobjects.h:7911
The WdfAdaptorBase object acts as the base class for all WDF Adaptors; the static members allow for s...
Definition: fxobjects.h:7137
double terminalResistance
value of terminal (load) resistance
Definition: fxobjects.h:7309
double R1
input port resistance
Definition: fxobjects.h:7291
virtual void setComponentValue_LC(double componentValue_L, double componentValue_C)
Definition: fxobjects.h:7253
virtual void setComponentValue_RL(double componentValue_R, double componentValue_L)
Definition: fxobjects.h:7260
void setOpenTerminalResistance(bool _openTerminalResistance=true)
Definition: fxobjects.h:7146
virtual void reset(double _sampleRate)
Definition: fxobjects.h:7166
virtual void setComponentValue_RC(double componentValue_R, double componentValue_C)
Definition: fxobjects.h:7267
bool openTerminalResistance
flag for open circuit load
Definition: fxobjects.h:7310
IComponentAdaptor * port2CompAdaptor
componant or adaptor connected to port 2
Definition: fxobjects.h:7286
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:7246
IComponentAdaptor * getPort1_CompAdaptor()
Definition: fxobjects.h:7274
void setPort1_CompAdaptor(IComponentAdaptor *_port1CompAdaptor)
Definition: fxobjects.h:7157
double out1
stored port 1 output; not used in this implementation but may be required for extended versions
Definition: fxobjects.h:7304
double R3
component resistance
Definition: fxobjects.h:7293
IComponentAdaptor * getPort3_CompAdaptor()
Definition: fxobjects.h:7280
void setComponent(wdfComponent componentType, double value1=0.0, double value2=0.0)
Definition: fxobjects.h:7173
void setPort3_CompAdaptor(IComponentAdaptor *_port3CompAdaptor)
Definition: fxobjects.h:7163
double out2
stored port 2 output; it is y(n) for this library
Definition: fxobjects.h:7305
IComponentAdaptor * wdfComponent
WDF componant connected to port 3 (default operation)
Definition: fxobjects.h:7288
double in1
stored port 1 input; not used in this implementation but may be required for extended versions
Definition: fxobjects.h:7297
double in2
stored port 2 input; not used in this implementation but may be required for extended versions
Definition: fxobjects.h:7298
double sourceResistance
source impedance; OK for this to be set to 0.0 for Rs = 0
Definition: fxobjects.h:7313
void setSourceResistance(double _sourceResistance)
Definition: fxobjects.h:7154
double out3
stored port 3 output; not used in this implementation but may be required for extended versions
Definition: fxobjects.h:7306
static void connectAdaptors(WdfAdaptorBase *upstreamAdaptor, WdfAdaptorBase *downstreamAdaptor)
Definition: fxobjects.h:7233
IComponentAdaptor * port1CompAdaptor
componant or adaptor connected to port 1
Definition: fxobjects.h:7285
IComponentAdaptor * getPort2_CompAdaptor()
Definition: fxobjects.h:7277
void setPort2_CompAdaptor(IComponentAdaptor *_port2CompAdaptor)
Definition: fxobjects.h:7160
IComponentAdaptor * port3CompAdaptor
componant or adaptor connected to port 3
Definition: fxobjects.h:7287
double R2
output port resistance
Definition: fxobjects.h:7292
double in3
stored port 3 input; not used in this implementation but may be required for extended versions
Definition: fxobjects.h:7299
void setTerminalResistance(double _terminalResistance)
Definition: fxobjects.h:7143
virtual void initializeAdaptorChain()
Definition: fxobjects.h:7240
The WdfCapacitor object implements the reflection coefficient and signal flow through a WDF simulated...
Definition: fxobjects.h:6173
virtual double getComponentResistance()
Definition: fxobjects.h:6187
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6196
virtual double getOutput3()
Definition: fxobjects.h:6224
virtual void setInput1(double _in1)
Definition: fxobjects.h:6227
virtual void setInput(double in)
Definition: fxobjects.h:6212
virtual void setInput2(double _in2)
Definition: fxobjects.h:6230
virtual double getOutput()
Definition: fxobjects.h:6215
double componentResistance
simulated resistance
Definition: fxobjects.h:6238
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6237
double sampleRate
sample rate
Definition: fxobjects.h:6239
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6236
virtual double getOutput1()
Definition: fxobjects.h:6218
virtual double getComponentValue()
Definition: fxobjects.h:6193
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6209
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6180
virtual void updateComponentResistance()
Definition: fxobjects.h:6203
virtual double getComponentConductance()
Definition: fxobjects.h:6190
virtual void setInput3(double _in3)
Definition: fxobjects.h:6233
virtual double getOutput2()
Definition: fxobjects.h:6221
The WdfInductor object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6255
double sampleRate
sample rate
Definition: fxobjects.h:6318
virtual double getOutput1()
Definition: fxobjects.h:6297
virtual double getOutput()
Definition: fxobjects.h:6294
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6278
virtual double getComponentResistance()
Definition: fxobjects.h:6269
double componentResistance
simulated resistance
Definition: fxobjects.h:6317
virtual double getComponentValue()
Definition: fxobjects.h:6275
virtual void setInput2(double _in2)
Definition: fxobjects.h:6309
virtual void setInput3(double _in3)
Definition: fxobjects.h:6312
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6316
virtual double getOutput2()
Definition: fxobjects.h:6300
virtual double getComponentConductance()
Definition: fxobjects.h:6272
virtual void setInput(double in)
Definition: fxobjects.h:6291
virtual double getOutput3()
Definition: fxobjects.h:6303
virtual void setInput1(double _in1)
Definition: fxobjects.h:6306
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6262
virtual void updateComponentResistance()
Definition: fxobjects.h:6285
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6288
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6315
The WdfParallelAdaptor object implements the parallel reflection-free (non-terminated) adaptor.
Definition: fxobjects.h:7538
virtual double getOutput2()
Definition: fxobjects.h:7624
virtual double getOutput1()
Definition: fxobjects.h:7621
virtual double getOutput3()
Definition: fxobjects.h:7627
virtual double getR2()
Definition: fxobjects.h:7544
virtual void setInput1(double _in1)
Definition: fxobjects.h:7578
virtual void setInput2(double _in2)
Definition: fxobjects.h:7597
virtual void initialize(double _R1)
Definition: fxobjects.h:7556
virtual void setInput3(double _in3)
Definition: fxobjects.h:7618
The WdfParallelLC object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6456
virtual double getOutput1()
Definition: fxobjects.h:6532
double zRegister_L
storage register for L
Definition: fxobjects.h:6550
double componentValue_C
component value C
Definition: fxobjects.h:6554
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6558
virtual double getComponentValue_L()
Definition: fxobjects.h:6510
virtual void setInput3(double _in3)
Definition: fxobjects.h:6547
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6503
double RL
RL value.
Definition: fxobjects.h:6556
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6496
virtual void setInput1(double _in1)
Definition: fxobjects.h:6541
virtual void setInput(double in)
Definition: fxobjects.h:6519
double componentValue_L
component value L
Definition: fxobjects.h:6553
virtual void setComponentValue_LC(double _componentValue_L, double _componentValue_C)
Definition: fxobjects.h:6488
virtual double getOutput3()
Definition: fxobjects.h:6538
virtual double getOutput()
Definition: fxobjects.h:6529
double zRegister_C
storage register for C
Definition: fxobjects.h:6551
virtual void updateComponentResistance()
Definition: fxobjects.h:6480
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6467
virtual void setInput2(double _in2)
Definition: fxobjects.h:6544
virtual double getComponentConductance()
Definition: fxobjects.h:6477
double RC
RC value.
Definition: fxobjects.h:6557
virtual double getComponentValue_C()
Definition: fxobjects.h:6513
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6516
virtual double getComponentResistance()
Definition: fxobjects.h:6474
double sampleRate
sample rate
Definition: fxobjects.h:6559
virtual double getOutput2()
Definition: fxobjects.h:6535
The WdfParallelRC object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6947
virtual double getComponentValue_R()
Definition: fxobjects.h:7002
double componentValue_C
component value C
Definition: fxobjects.h:7045
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6995
virtual double getOutput()
Definition: fxobjects.h:7014
virtual double getComponentConductance()
Definition: fxobjects.h:6968
double zRegister_C
storage register for C
Definition: fxobjects.h:7042
double zRegister_L
storage register for L
Definition: fxobjects.h:7041
virtual void setComponentValue_RC(double _componentValue_R, double _componentValue_C)
Definition: fxobjects.h:6980
double RL
RL value.
Definition: fxobjects.h:7048
double RC
RC value.
Definition: fxobjects.h:7049
virtual void setInput2(double _in2)
Definition: fxobjects.h:7035
virtual double getOutput1()
Definition: fxobjects.h:7023
virtual double getOutput3()
Definition: fxobjects.h:7029
virtual void setInput1(double _in1)
Definition: fxobjects.h:7032
virtual double getComponentResistance()
Definition: fxobjects.h:6965
virtual void setInput3(double _in3)
Definition: fxobjects.h:7038
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6988
double componentValue_R
component value R
Definition: fxobjects.h:7046
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:7052
double RR
RR value.
Definition: fxobjects.h:7050
double sampleRate
sample rate
Definition: fxobjects.h:7053
virtual void updateComponentResistance()
Definition: fxobjects.h:6971
virtual void setInput(double in)
Definition: fxobjects.h:7011
virtual void reset(double _sampleRate)
Definition: fxobjects.h:7008
virtual double getComponentValue_C()
Definition: fxobjects.h:7005
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6958
virtual double getOutput2()
Definition: fxobjects.h:7026
The WdfParallelRL object implements the reflection coefficient and signal flow through a WDF simulate...
Definition: fxobjects.h:6700
virtual double getOutput3()
Definition: fxobjects.h:6783
virtual void updateComponentResistance()
Definition: fxobjects.h:6724
virtual void setComponentValue_RL(double _componentValue_R, double _componentValue_L)
Definition: fxobjects.h:6734
virtual double getOutput2()
Definition: fxobjects.h:6780
virtual double getComponentConductance()
Definition: fxobjects.h:6721
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6742
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6711
virtual double getComponentValue_L()
Definition: fxobjects.h:6756
double zRegister_L
storage register for L
Definition: fxobjects.h:6795
virtual void setInput1(double _in1)
Definition: fxobjects.h:6786
double RR
RR value.
Definition: fxobjects.h:6804
virtual void setInput2(double _in2)
Definition: fxobjects.h:6789
double RL
RL value.
Definition: fxobjects.h:6802
virtual double getOutput()
Definition: fxobjects.h:6768
virtual double getOutput1()
Definition: fxobjects.h:6777
double componentValue_L
component value L
Definition: fxobjects.h:6799
double K
K value.
Definition: fxobjects.h:6797
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6806
double componentValue_R
component value R
Definition: fxobjects.h:6800
virtual void setInput(double in)
Definition: fxobjects.h:6765
double RC
RC value.
Definition: fxobjects.h:6803
virtual void setInput3(double _in3)
Definition: fxobjects.h:6792
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6749
virtual double getComponentValue_R()
Definition: fxobjects.h:6759
double sampleRate
sample rate
Definition: fxobjects.h:6807
virtual double getComponentResistance()
Definition: fxobjects.h:6718
double zRegister_C
storage register for L
Definition: fxobjects.h:6796
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6762
The WdfParallelTerminatedAdaptor object implements the parallel terminated (non-reflection-free) adap...
Definition: fxobjects.h:7648
virtual void setInput3(double _in3)
Definition: fxobjects.h:7723
virtual double getOutput2()
Definition: fxobjects.h:7729
virtual double getR2()
Definition: fxobjects.h:7654
virtual void initialize(double _R1)
Definition: fxobjects.h:7666
virtual double getOutput1()
Definition: fxobjects.h:7726
virtual double getOutput3()
Definition: fxobjects.h:7732
virtual void setInput1(double _in1)
Definition: fxobjects.h:7692
virtual void setInput2(double _in2)
Definition: fxobjects.h:7720
The WdfResistor object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6093
virtual double getComponentResistance()
Definition: fxobjects.h:6107
virtual double getOutput2()
Definition: fxobjects.h:6138
double componentResistance
simulated resistance
Definition: fxobjects.h:6155
virtual void updateComponentResistance()
Definition: fxobjects.h:6123
double componentValue
component value in electronic form (ohm, farad, henry)
Definition: fxobjects.h:6154
virtual void setInput2(double _in2)
Definition: fxobjects.h:6147
virtual void setInput3(double _in3)
Definition: fxobjects.h:6150
virtual double getComponentConductance()
Definition: fxobjects.h:6110
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6100
virtual void setInput1(double _in1)
Definition: fxobjects.h:6144
virtual void setComponentValue(double _componentValue)
Definition: fxobjects.h:6116
virtual double getOutput3()
Definition: fxobjects.h:6141
double sampleRate
sample rate
Definition: fxobjects.h:6156
virtual double getOutput1()
Definition: fxobjects.h:6135
virtual void setInput(double in)
Definition: fxobjects.h:6129
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6126
virtual double getOutput()
Definition: fxobjects.h:6132
virtual double getComponentValue()
Definition: fxobjects.h:6113
double zRegister
storage register (not used with resistor)
Definition: fxobjects.h:6153
The WdfSeriesAdaptor object implements the series reflection-free (non-terminated) adaptor.
Definition: fxobjects.h:7328
virtual double getR2()
Definition: fxobjects.h:7334
virtual void setInput1(double _in1)
Definition: fxobjects.h:7366
virtual double getOutput3()
Definition: fxobjects.h:7415
virtual double getOutput1()
Definition: fxobjects.h:7409
virtual double getOutput2()
Definition: fxobjects.h:7412
virtual void initialize(double _R1)
Definition: fxobjects.h:7345
virtual void setInput3(double _in3)
Definition: fxobjects.h:7406
virtual void setInput2(double _in2)
Definition: fxobjects.h:7385
The WdfSeriesLC object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6336
virtual void setInput3(double _in3)
Definition: fxobjects.h:6427
virtual double getComponentResistance()
Definition: fxobjects.h:6354
virtual void setInput1(double _in1)
Definition: fxobjects.h:6421
virtual double getOutput3()
Definition: fxobjects.h:6418
virtual double getOutput()
Definition: fxobjects.h:6409
virtual double getOutput1()
Definition: fxobjects.h:6412
double sampleRate
sample rate
Definition: fxobjects.h:6439
double componentValue_L
component value L
Definition: fxobjects.h:6433
virtual void setInput2(double _in2)
Definition: fxobjects.h:6424
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6396
virtual double getOutput2()
Definition: fxobjects.h:6415
double zRegister_C
storage register for C
Definition: fxobjects.h:6431
double RC
RC value.
Definition: fxobjects.h:6437
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6347
virtual double getComponentValue_C()
Definition: fxobjects.h:6393
double RL
RL value.
Definition: fxobjects.h:6436
double zRegister_L
storage register for L
Definition: fxobjects.h:6430
virtual void updateComponentResistance()
Definition: fxobjects.h:6360
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6438
virtual double getComponentValue_L()
Definition: fxobjects.h:6390
virtual double getComponentConductance()
Definition: fxobjects.h:6357
double componentValue_C
component value C
Definition: fxobjects.h:6434
virtual void setInput(double in)
Definition: fxobjects.h:6399
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6376
virtual void setComponentValue_LC(double _componentValue_L, double _componentValue_C)
Definition: fxobjects.h:6368
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6383
The WdfSeriesRC object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6824
virtual void setComponentValue_C(double _componentValue_C)
Definition: fxobjects.h:6872
virtual void setInput(double in)
Definition: fxobjects.h:6888
virtual void updateComponentResistance()
Definition: fxobjects.h:6848
double RC
RC value.
Definition: fxobjects.h:6926
virtual double getComponentValue_R()
Definition: fxobjects.h:6879
virtual double getOutput3()
Definition: fxobjects.h:6906
double RR
RR value.
Definition: fxobjects.h:6927
virtual void setInput1(double _in1)
Definition: fxobjects.h:6909
double componentResistance
equivalent resistance of pair of components
Definition: fxobjects.h:6929
double RL
RL value.
Definition: fxobjects.h:6925
virtual void setInput2(double _in2)
Definition: fxobjects.h:6912
virtual double getComponentValue_C()
Definition: fxobjects.h:6882
virtual double getOutput1()
Definition: fxobjects.h:6900
double zRegister_L
storage register for L
Definition: fxobjects.h:6918
virtual void setInput3(double _in3)
Definition: fxobjects.h:6915
virtual double getOutput()
Definition: fxobjects.h:6891
virtual double getComponentConductance()
Definition: fxobjects.h:6845
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6865
virtual double getComponentResistance()
Definition: fxobjects.h:6842
double zRegister_C
storage register for C
Definition: fxobjects.h:6919
virtual void setComponentValue_RC(double _componentValue_R, double _componentValue_C)
Definition: fxobjects.h:6857
double componentValue_R
component value R
Definition: fxobjects.h:6922
virtual double getOutput2()
Definition: fxobjects.h:6903
double sampleRate
sample rate
Definition: fxobjects.h:6930
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6835
double componentValue_C
component value C
Definition: fxobjects.h:6923
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6885
The WdfSeriesRL object implements the reflection coefficient and signal flow through a WDF simulated ...
Definition: fxobjects.h:6577
void setSampleRate(double _sampleRate)
Definition: fxobjects.h:6588
virtual void reset(double _sampleRate)
Definition: fxobjects.h:6638
virtual double getOutput2()
Definition: fxobjects.h:6657
virtual double getOutput()
Definition: fxobjects.h:6644
virtual void setInput1(double _in1)
Definition: fxobjects.h:6663
virtual void setInput2(double _in2)
Definition: fxobjects.h:6666
virtual void setInput3(double _in3)
Definition: fxobjects.h:6669
virtual double getComponentResistance()
Definition: fxobjects.h:6595
virtual void updateComponentResistance()
Definition: fxobjects.h:6601
double RC
RC value.
Definition: fxobjects.h:6680
virtual double getComponentValue_R()
Definition: fxobjects.h:6635
virtual double getOutput1()
Definition: fxobjects.h:6654
virtual void setComponentValue_RL(double _componentValue_R, double _componentValue_L)
Definition: fxobjects.h:6610
virtual double getComponentValue_L()
Definition: fxobjects.h:6632
double RL
RL value.
Definition: fxobjects.h:6679
double zRegister_L
storage register for L
Definition: fxobjects.h:6672
virtual void setInput(double in)
Definition: fxobjects.h:6641
double RR
RR value.
Definition: fxobjects.h:6681
virtual void setComponentValue_R(double _componentValue_R)
Definition: fxobjects.h:6625
double componentValue_R
component value R
Definition: fxobjects.h:6677
double zRegister_C
storage register for C (not used)
Definition: fxobjects.h:6673
double sampleRate
sample rate
Definition: fxobjects.h:6684
virtual void setComponentValue_L(double _componentValue_L)
Definition: fxobjects.h:6618
double componentResistance
equivalent resistance of pair of componen
Definition: fxobjects.h:6683
double componentValue_L
component value L
Definition: fxobjects.h:6676
virtual double getOutput3()
Definition: fxobjects.h:6660
virtual double getComponentConductance()
Definition: fxobjects.h:6598
The WdfSeriesTerminatedAdaptor object implements the series terminated (non-reflection-free) adaptor.
Definition: fxobjects.h:7436
virtual double getOutput3()
Definition: fxobjects.h:7517
virtual double getOutput1()
Definition: fxobjects.h:7511
virtual void initialize(double _R1)
Definition: fxobjects.h:7453
virtual void setInput2(double _in2)
Definition: fxobjects.h:7505
virtual void setInput3(double _in3)
Definition: fxobjects.h:7508
virtual double getOutput2()
Definition: fxobjects.h:7514
virtual void setInput1(double _in1)
Definition: fxobjects.h:7474
virtual double getR2()
Definition: fxobjects.h:7442
The ZVAFilter object implements multpile Zavalishin VA Filters. Audio I/O:
Definition: fxobjects.h:5180
ZVAFilterParameters zvaFilterParameters
object parameters
Definition: fxobjects.h:5372
double analogMatchSigma
analog matching Sigma value (see book)
Definition: fxobjects.h:5386
ZVAFilterParameters getParameters()
Definition: fxobjects.h:5199
void setBeta(double _beta)
Definition: fxobjects.h:5366
virtual double processAudioSample(double xn)
Definition: fxobjects.h:5230
double alpha0
input scalar, correct delay-free loop
Definition: fxobjects.h:5379
double sampleRate
current sample rate
Definition: fxobjects.h:5373
void setParameters(const ZVAFilterParameters ¶ms)
Definition: fxobjects.h:5208
virtual bool reset(double _sampleRate)
Definition: fxobjects.h:5186
double integrator_z[2]
state variables
Definition: fxobjects.h:5376
void calculateFilterCoeffs()
Definition: fxobjects.h:5330
double alpha
alpha is (wcT/2)
Definition: fxobjects.h:5380
double getBeta()
Definition: fxobjects.h:5369
double rho
p = 2R + g (feedback)
Definition: fxobjects.h:5381
double beta
beta value, not used
Definition: fxobjects.h:5383
virtual bool canProcessAudioFrame()
Definition: fxobjects.h:5223
hard-coded arrays of FIR filter coefficients for the sample rate conversion objects (Interpolator and...
filterCoeff
Use this enum to easily access coefficents inside of arrays.
Definition: fxobjects.h:1282
analogFilter
Use this strongy typed enum to set the analog filter type for the AnalogMagData structure.
Definition: fxobjects.h:820
edgeTransition
Use this strongly typed enum to easily set the edge direction (rising or falling) of a transition ban...
Definition: fxobjects.h:593
modDelaylgorithm
Use this strongly typed enum to easily set modulated delay algorithm.
Definition: fxobjects.h:3271
filterAlgorithm
Use this strongly typed enum to easily set the filter algorithm for the AudioFilter object or any oth...
Definition: fxobjects.h:1461
wdfComponent
Use this strongly typed enum to easily set the wdfComponent type.
Definition: fxobjects.h:7074
delayAlgorithm
Use this strongly typed enum to easily set the delay algorithm.
Definition: fxobjects.h:2641
windowType
Use this strongly typed enum to easily set the windowing type for FFT algorithms that use it.
Definition: fxobjects.h:8685
generatorWaveform
Use this strongly typed enum to easily set the oscillator waveform.
Definition: fxobjects.h:2945
const double kTwoPi
2pi to 80 decimal places
Definition: guiconstants.h:191
DFOscillatorCoeffs
Use this non-typed enum to easily access the direct form oscillator coefficients.
Definition: fxobjects.h:3119
delayUpdateType
Use this strongly typed enum to easily set the delay update type; this varies depending on the design...
Definition: fxobjects.h:2657
dynamicsProcessorType
Use this strongly typed enum to set the dynamics processor type.
Definition: fxobjects.h:1972
vaFilterAlgorithm
Use this strongly typed enum to easily set the virtual analog filter algorithm.
Definition: fxobjects.h:5115
DFOscillatorStates
Use this non-typed enum to easily access the direct form oscillator state registers.
Definition: fxobjects.h:3134
const uint32_t ENVELOPE_DETECT_MODE_PEAK
|x|
Definition: guiconstants.h:199
stateReg
Use this enum to easily access z^-1 state values inside of arrays. For some structures,...
Definition: fxobjects.h:1304
biquadAlgorithm
Use this strongly typed enum to easily set the biquad calculation type.
Definition: fxobjects.h:1321
reverbDensity
Use this strongly typed enum to easily set the density in the reverb object.
Definition: fxobjects.h:4676
brickwallFilter
Use this strongly typed enum to easily set brickwall filter type for functions that need it.
Definition: fxobjects.h:548
rateConversionRatio
Use this strongly typed enum to easily set up or down sampling ratios.
Definition: fxobjects.h:9618
distortionModel
Use this strongly typed enum to easily set the waveshaper model for the Triode objects.
Definition: fxobjects.h:5575
const double kPi
pi to 80 decimal places
Definition: guiconstants.h:184
double tanhWaveShaper(double xn, double saturation)
calculates hyptan waveshaper
Definition: fxobjects.h:402
double dBPeakGainFor_Q(double Q)
calculates the peak magnitude in dB for a given Q
Definition: fxobjects.h:317
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
void boundValue(double &value, double minValue, double maxValue)
Bound a value to min and max limits.
Definition: fxobjects.h:167
double peakGainFor_Q(double Q)
calculates the peak magnitude for a given Q
Definition: fxobjects.h:301
bool calculateBrickwallMagArray(BrickwallMagData &magData)
calculate an arra of magnitude points from brickwall specifications
Definition: fxobjects.h:687
double doLagrangeInterpolation(double *x, double *y, int n, double xbar)
implements n-order Lagrange Interpolation
Definition: fxobjects.h:138
void freqSample(int N, double A[], double h[], int symm)
calcuate the IR for an array of magnitude points using the frequency sampling method....
Definition: fxobjects.h:935
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
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
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
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
double softClipWaveShaper(double xn, double saturation)
calculates hyptan waveshaper
Definition: fxobjects.h:416
double getPhase(double re, double im)
calculates phase of a complex numb er
Definition: fxobjects.h:1018
double getMagnitude(double re, double im)
calculates magnitude of a complex numb er
Definition: fxobjects.h:1003
double dB2Raw(double dB)
converts dB to raw value
Definition: fxobjects.h:287
int findEdgeTargetBin(double testFreq, double bin1Freq)
find bin for target frequency
Definition: fxobjects.h:627
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
bool calculateAnalogMagArray(AnalogMagData &magData)
calculate an arra of magnitude points from analog filter specifications
Definition: fxobjects.h:858
double calcWSGain(double xn, double saturation, double asymmetry)
calculates gain of a waveshaper
Definition: fxobjects.h:373
double unipolarToBipolar(double value)
calculates the bipolar [-1.0, +1.0] value FROM a unipolar [0.0, +1.0] value
Definition: fxobjects.h:245
unsigned int countForRatio(rateConversionRatio ratio)
returns the up or downsample ratio as a numeric value
Definition: fxobjects.h:9630
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 bipolarToUnipolar(double value)
calculates the unipolar [0.0, +1.0] value FROM a bipolar [-1.0, +1.0] value
Definition: fxobjects.h:259
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
double atanWaveShaper(double xn, double saturation)
calculates arctangent waveshaper
Definition: fxobjects.h:388
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
double doWhiteNoise()
calculates a random value between -1.0 and +1.0
Definition: fxobjects.h:329
bool checkFloatUnderflow(double &value)
Perform underflow check; returns true if we did underflow (user may not care)
Definition: fxobjects.h:62
double sgn(double xn)
calculates sgn( ) of input
Definition: fxobjects.h:358
ComplexNumber complexMultiply(ComplexNumber c1, ComplexNumber c2)
returns the complex product of two complex numbers
Definition: fxobjects.h:494
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 raw2dB(double raw)
calculates dB for given input
Definition: fxobjects.h:273
double * getFilterIRTable(unsigned int FIRLength, rateConversionRatio ratio, unsigned int sampleRate)
returns the up or downsample ratio as a numeric value
Definition: fxobjects.h:9652
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
double fuzzExp1WaveShaper(double xn, double saturation, double asymmetry)
calculates fuzz exp1 waveshaper
Definition: fxobjects.h:431
globally utilized constants and enumerations
Custom parameter structure for the AnalogFIRFilter object. This is a somewhat silly object that impla...
Definition: fxobjects.h:2506
AnalogFIRFilterParameters & operator=(const AnalogFIRFilterParameters ¶ms)
Definition: fxobjects.h:2509
analogFilter filterType
filter type
Definition: fxobjects.h:2522
double Q
filter Q
Definition: fxobjects.h:2524
double fc
filter fc
Definition: fxobjects.h:2523
Custom parameter structure calculating analog magnitude response arrays with calculateAnalogMagArray(...
Definition: fxobjects.h:834
Custom parameter structure for the AudioDelay object.
Definition: fxobjects.h:2672
double wetLevel_dB
wet output level in dB
Definition: fxobjects.h:2695
AudioDelayParameters & operator=(const AudioDelayParameters ¶ms)
Definition: fxobjects.h:2675
double delayRatio_Pct
dela ratio: right length = (delayRatio)*(left length)
Definition: fxobjects.h:2702
double rightDelay_mSec
right delay time
Definition: fxobjects.h:2701
double dryLevel_dB
dry output level in dB
Definition: fxobjects.h:2696
double feedback_Pct
feedback as a % value
Definition: fxobjects.h:2697
delayAlgorithm algorithm
delay algorithm
Definition: fxobjects.h:2694
double leftDelay_mSec
left delay time
Definition: fxobjects.h:2700
delayUpdateType updateType
update algorithm
Definition: fxobjects.h:2699
Custom parameter structure for the AudioDetector object. NOTE: this object uses constant defintions:
Definition: fxobjects.h:1790
double attackTime_mSec
attack time in milliseconds
Definition: fxobjects.h:1806
unsigned int detectMode
detect mode, see TLD_ constants above
Definition: fxobjects.h:1808
bool detect_dB
detect in dB DEFAULT = false (linear NOT log)
Definition: fxobjects.h:1809
bool clampToUnityMax
clamp output to 1.0 (set false for true log detectors)
Definition: fxobjects.h:1810
AudioDetectorParameters & operator=(const AudioDetectorParameters ¶ms)
Definition: fxobjects.h:1793
double releaseTime_mSec
release time in milliseconds
Definition: fxobjects.h:1807
Custom parameter structure for the AudioFilter object.
Definition: fxobjects.h:1481
AudioFilterParameters & operator=(const AudioFilterParameters ¶ms)
Definition: fxobjects.h:1484
double fc
filter cutoff or center frequency (Hz)
Definition: fxobjects.h:1498
filterAlgorithm algorithm
filter algorithm
Definition: fxobjects.h:1497
double boostCut_dB
filter gain; note not used in all types
Definition: fxobjects.h:1500
double Q
filter Q
Definition: fxobjects.h:1499
Custom structure that holds information about each FFT bin. This includes all information needed to p...
Definition: fxobjects.h:9096
bool isPeak
flag for peak bins
Definition: fxobjects.h:9129
unsigned int localPeakBin
index of peak-boss
Definition: fxobjects.h:9133
double updatedPhase
phase update value
Definition: fxobjects.h:9135
double phi
bin phase angle
Definition: fxobjects.h:9131
BinData & operator=(const BinData ¶ms)
Definition: fxobjects.h:9099
int previousPeakBin
index of peak bin in previous FFT
Definition: fxobjects.h:9134
double magnitude
bin magnitude angle
Definition: fxobjects.h:9130
double psi
bin phase correction
Definition: fxobjects.h:9132
void reset()
Definition: fxobjects.h:9117
Custom parameter structure for the Biquad object. Default version defines the biquad structure used i...
Definition: fxobjects.h:1336
BiquadParameters & operator=(const BiquadParameters ¶ms)
Definition: fxobjects.h:1340
biquadAlgorithm biquadCalcType
biquad structure to use
Definition: fxobjects.h:1349
Custom parameter structure for the BitCrusher object.
Definition: fxobjects.h:5920
BitCrusherParameters & operator=(const BitCrusherParameters ¶ms)
Definition: fxobjects.h:5923
double quantizedBitDepth
bid depth of quantizer
Definition: fxobjects.h:5933
Custom structure that holds magnitude information about a brickwall filter.
Definition: fxobjects.h:562
double fc
brickwall fc
Definition: fxobjects.h:572
double Q
brickwall Q
Definition: fxobjects.h:573
double f_High
brickwall f_high
Definition: fxobjects.h:575
bool mirrorMag
optionally mirror the output array
Definition: fxobjects.h:577
double f_Low
brickwall f_low
Definition: fxobjects.h:574
unsigned int relaxationBins
relaxation bins for FIR specification
Definition: fxobjects.h:576
Custom parameter structure for the ClassATubePre object.
Definition: fxobjects.h:5756
double outputLevel_dB
input level in dB
Definition: fxobjects.h:5781
double asymmetry
input level in dB
Definition: fxobjects.h:5780
double lowShelfBoostCut_dB
LSF shelf gain/cut.
Definition: fxobjects.h:5785
double highShelfBoostCut_dB
HSF shelf frequency.
Definition: fxobjects.h:5787
ClassATubePreParameters & operator=(const ClassATubePreParameters ¶ms)
Definition: fxobjects.h:5759
double saturation
input level in dB
Definition: fxobjects.h:5779
double lowShelf_fc
LSF shelf frequency.
Definition: fxobjects.h:5784
double inputLevel_dB
input level in dB
Definition: fxobjects.h:5778
double highShelf_fc
HSF shelf frequency.
Definition: fxobjects.h:5786
Custom parameter structure for the CombFilter object. Used for reverb algorithms in book.
Definition: fxobjects.h:3993
CombFilterParameters & operator=(const CombFilterParameters ¶ms)
Definition: fxobjects.h:3996
double RT60Time_mSec
RT 60 time ini mSec.
Definition: fxobjects.h:4011
double lpf_g
gain value for LPF (if enabled)
Definition: fxobjects.h:4013
bool enableLPF
enable LPF flag
Definition: fxobjects.h:4012
bool interpolate
interpolation flag (diagnostics)
Definition: fxobjects.h:4014
double delayTime_mSec
delay time in mSec
Definition: fxobjects.h:4010
Structure to hold a complex value.
Definition: fxobjects.h:474
double imag
imaginary part
Definition: fxobjects.h:483
double real
real part
Definition: fxobjects.h:482
Custom parameter structure for the DelayAPF object. Used for reverb algorithms in book.
Definition: fxobjects.h:4155
DelayAPFParameters & operator=(const DelayAPFParameters ¶ms)
Definition: fxobjects.h:4158
bool interpolate
interpolate flag (diagnostics)
Definition: fxobjects.h:4180
double lfoDepth
LFO deoth (not in %) if enabled.
Definition: fxobjects.h:4183
double delayTime_mSec
APF delay time.
Definition: fxobjects.h:4176
bool enableLFO
flag to enable LFO
Definition: fxobjects.h:4181
double apf_g
APF g coefficient.
Definition: fxobjects.h:4177
double lfoMaxModulation_mSec
LFO maximum modulation time in mSec.
Definition: fxobjects.h:4184
bool enableLPF
flag to enable LPF in structure
Definition: fxobjects.h:4178
double lfoRate_Hz
LFO rate in Hz, if enabled.
Definition: fxobjects.h:4182
double lpf_g
LPF g coefficient (if enabled)
Definition: fxobjects.h:4179
Custom parameter structure for the DynamicsProcessor object. Ths struct includes all information need...
Definition: fxobjects.h:1987
bool softKnee
soft knee flag
Definition: fxobjects.h:2016
DynamicsProcessorParameters & operator=(const DynamicsProcessorParameters ¶ms)
Definition: fxobjects.h:1990
double outputGain_dB
make up gain
Definition: fxobjects.h:2021
double gainReduction
output value for gain reduction that occurred
Definition: fxobjects.h:2024
bool hardLimitGate
threshold in dB
Definition: fxobjects.h:2015
double gainReduction_dB
output value for gain reduction that occurred in dB
Definition: fxobjects.h:2025
dynamicsProcessorType calculation
processor calculation type
Definition: fxobjects.h:2018
double releaseTime_mSec
release mSec
Definition: fxobjects.h:2020
double threshold_dB
threshold in dB
Definition: fxobjects.h:2013
bool enableSidechain
enable external sidechain input to object
Definition: fxobjects.h:2017
double ratio
processor I/O gain ratio
Definition: fxobjects.h:2012
double kneeWidth_dB
knee width in dB for soft-knee operation
Definition: fxobjects.h:2014
double attackTime_mSec
attack mSec
Definition: fxobjects.h:2019
Custom parameter structure for the EnvelopeFollower object.
Definition: fxobjects.h:5402
double fc
filter fc
Definition: fxobjects.h:5421
double sensitivity
detector sensitivity
Definition: fxobjects.h:5426
double attackTime_mSec
detector attack time
Definition: fxobjects.h:5423
double Q
filter Q
Definition: fxobjects.h:5422
double threshold_dB
detector threshold in dB
Definition: fxobjects.h:5425
double releaseTime_mSec
detector release time
Definition: fxobjects.h:5424
EnvelopeFollowerParameters & operator=(const EnvelopeFollowerParameters ¶ms)
Definition: fxobjects.h:5405
Custom output structure for filter bank objects that split the inptu into multiple frequency channels...
Definition: fxobjects.h:1618
double HFOut
high frequency output sample
Definition: fxobjects.h:1623
double LFOut
low frequency output sample
Definition: fxobjects.h:1622
Custom output structure for interpolator; it holds an arry of interpolated output samples.
Definition: fxobjects.h:9760
unsigned int count
number of samples in output array
Definition: fxobjects.h:9763
double audioData[maxSamplingRatio]
array of interpolated output samples
Definition: fxobjects.h:9762
Custom parameter structure for the LRFilterBank object which splits the input signal into multiple ba...
Definition: fxobjects.h:1643
double splitFrequency
LF/HF split frequency.
Definition: fxobjects.h:1655
LRFilterBankParameters & operator=(const LRFilterBankParameters ¶ms)
Definition: fxobjects.h:1646
Custom parameter structure for the ModulatedDelay object.
Definition: fxobjects.h:3286
double feedback_Pct
feedback in %
Definition: fxobjects.h:3305
double lfoDepth_Pct
mod delay LFO depth in %
Definition: fxobjects.h:3304
modDelaylgorithm algorithm
mod delay algorithm
Definition: fxobjects.h:3302
ModulatedDelayParameters & operator=(const ModulatedDelayParameters ¶ms)
Definition: fxobjects.h:3289
double lfoRate_Hz
mod delay LFO rate in Hz
Definition: fxobjects.h:3303
Custom parameter structure for the NestedDelayAPF object. Used for reverb algorithms in book.
Definition: fxobjects.h:4351
double innerAPFdelayTime_mSec
delay time for inner APF
Definition: fxobjects.h:4375
double outerAPF_g
g coefficient for outer APF
Definition: fxobjects.h:4376
double lfoMaxModulation_mSec
max modulation time if LFO is enabled
Definition: fxobjects.h:4383
double outerAPFdelayTime_mSec
delay time for outer APF
Definition: fxobjects.h:4374
double innerAPF_g
g coefficient for inner APF
Definition: fxobjects.h:4377
NestedDelayAPFParameters & operator=(const NestedDelayAPFParameters ¶ms)
Definition: fxobjects.h:4354
double lfoDepth
LFO depth (not in %) (if enabled)
Definition: fxobjects.h:4382
bool enableLFO
flag to enable the modulated delay
Definition: fxobjects.h:4380
double lfoRate_Hz
LFO rate in Hz (if enabled)
Definition: fxobjects.h:4381
Custom parameter structure for the LFO and DFOscillator objects.
Definition: fxobjects.h:2959
OscillatorParameters & operator=(const OscillatorParameters ¶ms)
Definition: fxobjects.h:2962
double frequency_Hz
oscillator frequency
Definition: fxobjects.h:2974
generatorWaveform waveform
the current waveform
Definition: fxobjects.h:2973
Custom parameter structure for the Biquad object. Default version defines the biquad structure used i...
Definition: fxobjects.h:9150
PSMVocoderParameters & operator=(const PSMVocoderParameters ¶ms)
Definition: fxobjects.h:9153
bool enablePeakTracking
flag to enable peak tracking
Definition: fxobjects.h:9168
double pitchShiftSemitones
pitch shift in half-steps
Definition: fxobjects.h:9166
bool enablePeakPhaseLocking
flag to enable phase lock
Definition: fxobjects.h:9167
Custom parameter structure for the PhaseShifter object.
Definition: fxobjects.h:3478
double intensity_Pct
phaser feedback in %
Definition: fxobjects.h:3496
double lfoDepth_Pct
phaser LFO depth in %
Definition: fxobjects.h:3495
PhaseShifterParameters & operator=(const PhaseShifterParameters ¶ms)
Definition: fxobjects.h:3481
double lfoRate_Hz
phaser LFO rate in Hz
Definition: fxobjects.h:3494
bool quadPhaseLFO
quad phase LFO flag
Definition: fxobjects.h:3497
Custom parameter structure for the ReverbTank object.
Definition: fxobjects.h:4690
double lowShelfBoostCut_dB
low shelf gain
Definition: fxobjects.h:4737
double wetLevel_dB
wet output level in dB
Definition: fxobjects.h:4741
double preDelayTime_mSec
pre-delay time in mSec
Definition: fxobjects.h:4732
double apfDelayMax_mSec
APF max delay time.
Definition: fxobjects.h:4726
double fixeDelayMax_mSec
fixed delay max time
Definition: fxobjects.h:4728
reverbDensity density
density setting thick or thin
Definition: fxobjects.h:4721
double kRT
reverb time, 0 to 1
Definition: fxobjects.h:4734
double apfDelayWeight_Pct
APF max delay weighying.
Definition: fxobjects.h:4727
double fixeDelayWeight_Pct
fixed delay max weighying
Definition: fxobjects.h:4729
double highShelfBoostCut_dB
high shelf gain
Definition: fxobjects.h:4739
double highShelf_fc
high shelf fc
Definition: fxobjects.h:4738
double lowShelf_fc
low shelf fc
Definition: fxobjects.h:4736
ReverbTankParameters & operator=(const ReverbTankParameters ¶ms)
Definition: fxobjects.h:4693
double lpf_g
LPF g coefficient.
Definition: fxobjects.h:4733
double dryLevel_dB
dry output level in dB
Definition: fxobjects.h:4742
This is the output structure for audio generator objects that can render up to four outputs.
Definition: fxobjects.h:1216
double quadPhaseOutput_neg
-90 degrees out
Definition: fxobjects.h:1222
double normalOutput
normal
Definition: fxobjects.h:1219
double invertedOutput
inverted
Definition: fxobjects.h:1220
double quadPhaseOutput_pos
90 degrees out
Definition: fxobjects.h:1221
Custom parameter structure for the SimpleDelay object. Used for reverb algorithms in book.
Definition: fxobjects.h:3816
double delay_Samples
current delay in samples; other objects may need to access this information
Definition: fxobjects.h:3835
bool interpolate
interpolation flag (diagnostics usually)
Definition: fxobjects.h:3832
double delayTime_mSec
delay tine in mSec
Definition: fxobjects.h:3831
SimpleDelayParameters & operator=(const SimpleDelayParameters ¶ms)
Definition: fxobjects.h:3819
Custom parameter structure for the SimpleLPFP object. Used for reverb algorithms in book.
Definition: fxobjects.h:3718
SimpleLPFParameters & operator=(const SimpleLPFParameters ¶ms)
Definition: fxobjects.h:3721
double g
simple LPF g value
Definition: fxobjects.h:3731
Custom structure that holds transition band information for FIR filter calculations.
Definition: fxobjects.h:607
edgeTransition edgeType
edge type
Definition: fxobjects.h:610
unsigned int startBin
starting bin for transition band
Definition: fxobjects.h:611
double slopeIncrement
transition slope
Definition: fxobjects.h:613
unsigned int stopBin
ending bin for transition band
Definition: fxobjects.h:612
Custom parameter structure for the TriodeClassA object.
Definition: fxobjects.h:5589
bool enableHPF
HPF simulates DC blocking cap on output.
Definition: fxobjects.h:5621
TriodeClassAParameters & operator=(const TriodeClassAParameters ¶ms)
Definition: fxobjects.h:5592
bool enableLSF
LSF simulates shelf due to cathode self biasing.
Definition: fxobjects.h:5622
double lsf_BoostCut_dB
boost/cut due to cathode self biasing
Definition: fxobjects.h:5626
double outputGain
outputGain level
Definition: fxobjects.h:5618
double saturation
saturation level
Definition: fxobjects.h:5616
bool invertOutput
invertOutput - triodes invert output
Definition: fxobjects.h:5620
double lsf_Fshelf
shelf fc from self bias cap
Definition: fxobjects.h:5625
double asymmetry
asymmetry level
Definition: fxobjects.h:5617
distortionModel waveshaper
waveshaper
Definition: fxobjects.h:5614
double hpf_Fc
fc of DC blocking cap
Definition: fxobjects.h:5624
Custom parameter structure for the TwoBandShelvingFilter object. Used for reverb algorithms in book.
Definition: fxobjects.h:4550
double lowShelf_fc
fc for low shelf
Definition: fxobjects.h:4566
double highShelf_fc
fc for high shelf
Definition: fxobjects.h:4568
TwoBandShelvingFilterParameters & operator=(const TwoBandShelvingFilterParameters ¶ms)
Definition: fxobjects.h:4553
double highShelfBoostCut_dB
high shelf gain
Definition: fxobjects.h:4569
double lowShelfBoostCut_dB
low shelf gain
Definition: fxobjects.h:4567
Custom parameter structure for the WDF filter examples.
Definition: fxobjects.h:8158
double fc
filter fc
Definition: fxobjects.h:8174
double boostCut_dB
filter boost or cut in dB
Definition: fxobjects.h:8176
bool frequencyWarping
enable frequency warping
Definition: fxobjects.h:8177
WDFParameters & operator=(const WDFParameters ¶ms)
Definition: fxobjects.h:8161
double Q
filter Q
Definition: fxobjects.h:8175
Custom structure to hold component information.
Definition: fxobjects.h:7088
wdfComponent componentType
selected component type
Definition: fxobjects.h:7120
double R
value of R component
Definition: fxobjects.h:7117
double L
value of L component
Definition: fxobjects.h:7118
double C
value of C component
Definition: fxobjects.h:7119
Custom parameter structure for the ZVAFilter object.
Definition: fxobjects.h:5132
ZVAFilterParameters & operator=(const ZVAFilterParameters ¶ms)
Definition: fxobjects.h:5135
bool enableNLP
enable non linear processing (use oversampling for best results)
Definition: fxobjects.h:5159
bool selfOscillate
enable selfOscillation
Definition: fxobjects.h:5158
double Q
va filter Q
Definition: fxobjects.h:5154
bool enableGainComp
enable gain compensation (see book)
Definition: fxobjects.h:5156
double fc
va filter fc
Definition: fxobjects.h:5153
bool matchAnalogNyquistLPF
match analog gain at Nyquist
Definition: fxobjects.h:5157
vaFilterAlgorithm filterAlgorithm
va filter algorithm
Definition: fxobjects.h:5152
double filterOutputGain_dB
va filter gain (normally unused)
Definition: fxobjects.h:5155