fuxxass

Fuzz Face emualator (sort of...)
Author: Pasquale Fersini
License: BSD
Github: rbrt/fx/fuxxass.axo

Inlets

frac32buffer input

Outlets

frac32buffer output

Parameters

frac32.u.map fuzz

frac32.u.map level

Declaration
float fConst0;
float fConst1;
float fConst2;
float fslider0;
float fRec0[2];
float fConst3;
float fConst4;
float fConst5;
float fslider1;
float fRec1[2];
float fConst6;
float fConst7;
float fConst8;
float fConst9;
float fConst10;
float fConst11;
float fConst12;
float fConst13;
float fConst14;
float fConst15;
float fConst16;
float fConst17;
float fConst18;
float fConst19;
float fConst20;
float fConst21;
float fConst22;
float fConst23;
float fConst24;
float fConst25;
float fConst26;
float fConst27;
float fConst28;
float fConst29;
float fConst30;
float fConst31;
float fConst32;
float fRec2[6];
float fConst33;
float fConst34;
float fConst35;
float fConst36;
float fConst37;
float fConst38;
float fConst39;
float fConst40;
float fConst41;
float fConst42;
float fConst43;
float fConst44;
float fConst45;
float fConst46;
float fConst47;
float fConst48;
float fConst49;
float fConst50;
float fConst51;
float fConst52;
float fConst53;
float fConst54;
float fConst55;
float fConst56;
float fConst57;
float fConst58;
float fConst59;
float fConst60;
float fConst61;
float fConst62;

float int2f(int32_t val) { return val * (float)(1.0f / (1 << 27)); }

int32_t f2int(float val) { return (int)(val * (float)(1 << 27)); }
Init
// fConst0 = double(min(192000, max(1, fSamplingFreq)));
fConst0 = 48000;
fConst1 = (3.98985774247549e-22 * fConst0);
fConst2 = (5.31230624730483e-11 +
           (fConst0 * (1.83615604104971e-13 +
                       (fConst0 * (1.99042653510896e-15 + fConst1)))));
fConst3 = (3.73292075290073e-29 * fConst0);
fConst4 = ((fConst0 *
            ((fConst0 * ((fConst0 * (0 - (1.05633134620746e-20 + fConst3))) -
                         3.11506369039915e-14)) -
             2.30719916990074e-11)) -
           1.07493164710329e-09);
fConst5 =
    (1.07449105454163e-09 +
     (fConst0 * (2.29636966370042e-11 +
                 (fConst0 * (2.91602352831988e-14 +
                             (fConst0 * (1.01643277726662e-20 + fConst3)))))));
fConst6 = (4.76991513499346e-20 * fConst0);
fConst7 = (5.00346713698171e-13 + fConst6);
fConst8 = (0 - fConst7);
fConst9 = (fConst6 - 5.38351707988916e-15);
fConst10 = (5.38351707988916e-15 - fConst6);
fConst11 = (5.05730339185222e-13 * fConst0);
fConst12 = (fConst11 - 1.16162215422261e-12);
fConst13 = (1.16162215422261e-12 - fConst11);
fConst14 = ((fConst0 * (1.83615604104971e-13 +
                        (fConst0 * (fConst1 - 1.99042653510896e-15)))) -
            5.31230624730483e-11);
fConst15 =
    (1.07493164710329e-09 +
     (fConst0 * ((fConst0 * (3.11506369039915e-14 +
                             (fConst0 * (fConst3 - 1.05633134620746e-20)))) -
                 2.30719916990074e-11)));
fConst16 =
    ((fConst0 * (2.29636966370042e-11 +
                 (fConst0 * ((fConst0 * (1.01643277726662e-20 - fConst3)) -
                             2.91602352831988e-14)))) -
     1.07449105454163e-09);
fConst17 = (1.19695732274265e-21 * fConst0);
fConst18 = ((fConst0 * (1.83615604104971e-13 +
                        (fConst0 * (1.99042653510896e-15 - fConst17)))) -
            1.59369187419145e-10);
fConst19 = (1.86646037645036e-28 * fConst0);
fConst20 =
    (3.22479494130986e-09 +
     (fConst0 * ((fConst0 * ((fConst0 * (3.16899403862238e-20 - fConst19)) -
                             3.11506369039915e-14)) -
                 2.30719916990074e-11)));
fConst21 =
    ((fConst0 * (2.29636966370042e-11 +
                 (fConst0 * (2.91602352831988e-14 +
                             (fConst0 * (fConst19 - 3.04929833179984e-20)))))) -
     3.22347316362488e-09);
fConst22 = (7.97971548495099e-22 * fConst0);
fConst23 = ((fConst0 * ((fConst0 * (3.98085307021793e-15 + fConst22)) -
                        3.67231208209942e-13)) -
            1.06246124946097e-10);
fConst24 = (3.73292075290073e-28 * fConst0);
fConst25 =
    (2.14986329420657e-09 +
     (fConst0 * (4.61439833980148e-11 +
                 (fConst0 * ((fConst0 * (fConst24 - 2.11266269241492e-20)) -
                             6.2301273807983e-14)))));
fConst26 =
    ((fConst0 * ((fConst0 * (5.83204705663976e-14 +
                             (fConst0 * (2.03286555453323e-20 - fConst24)))) -
                 4.59273932740084e-11)) -
     2.14898210908325e-09);
fConst27 = (1.06246124946097e-10 +
            (fConst0 * ((fConst0 * (fConst22 - 3.98085307021793e-15)) -
                        3.67231208209942e-13)));
fConst28 =
    ((fConst0 *
      (4.61439833980148e-11 +
       (fConst0 * (6.2301273807983e-14 +
                   (fConst0 * (0 - (2.11266269241492e-20 + fConst24))))))) -
     2.14986329420657e-09);
fConst29 =
    (2.14898210908325e-09 +
     (fConst0 * ((fConst0 * ((fConst0 * (2.03286555453323e-20 + fConst24)) -
                             5.83204705663976e-14)) -
                 4.59273932740084e-11)));
fConst30 = (1.59369187419145e-10 +
            (fConst0 * (1.83615604104971e-13 +
                        (fConst0 * (0 - (1.99042653510896e-15 + fConst17))))));
fConst31 =
    ((fConst0 * ((fConst0 * (3.11506369039915e-14 +
                             (fConst0 * (3.16899403862238e-20 + fConst19)))) -
                 2.30719916990074e-11)) -
     3.22479494130986e-09);
fConst32 = (3.22347316362488e-09 +
            (fConst0 *
             (2.29636966370042e-11 +
              (fConst0 * ((fConst0 * (0 - (3.04929833179984e-20 + fConst19))) -
                          2.91602352831988e-14)))));
fConst33 = (1.43097454049804e-19 * fConst0);
fConst34 = (5.00346713698171e-13 + fConst33);
fConst35 = (0 - fConst34);
fConst36 = (5.38351707988916e-15 - fConst33);
fConst37 = (fConst33 - 5.38351707988916e-15);
fConst38 = (1.16162215422261e-12 + fConst11);
fConst39 = (0 - fConst38);
fConst40 = (1.01146067837044e-12 * fConst0);
fConst41 = (2.32324430844522e-12 - fConst40);
fConst42 = (9.53983026998693e-20 * fConst0);
fConst43 = (1.00069342739634e-12 - fConst42);
fConst44 = (1.07670341597783e-14 + fConst42);
fConst45 = (0 - fConst44);
fConst46 = (fConst42 - 1.00069342739634e-12);
fConst47 = (fConst40 - 2.32324430844522e-12);
fConst48 = (2.32324430844522e-12 + fConst40);
fConst49 = (0 - fConst48);
fConst50 = (1.00069342739634e-12 + fConst42);
fConst51 = (0 - fConst50);
fConst52 = (fConst42 - 1.07670341597783e-14);
fConst53 = (1.07670341597783e-14 - fConst42);
fConst54 = (5.00346713698171e-13 - fConst33);
fConst55 = (fConst33 - 5.00346713698171e-13);
fConst56 = (5.38351707988916e-15 + fConst33);
fConst57 = (0 - fConst56);
fConst58 = (5.00346713698171e-13 - fConst6);
fConst59 = (5.38351707988916e-15 + fConst6);
fConst60 = (0 - fConst59);
fConst61 = (fConst6 - 5.00346713698171e-13);
// fConst62 = faustpower<2>(fConst0);
fConst62 = fConst0 * fConst0;

for (int i = 0; i < 2; i++)
  fRec0[i] = 0;
for (int i = 0; i < 2; i++)
  fRec1[i] = 0;
for (int i = 0; i < 6; i++)
  fRec2[i] = 0;
Control Rate
{
  // float 	fSlow0 = (0.007000000000000006 * (1 - double(fslider0)));
  // float 	fSlow1 = (0.007000000000000006 * (1 - double(fslider1)));
  int count = 16;
  float fSlow0 = (0.007000000000000006 * (1 - (param_fuzz / 256)));
  float fSlow1 = (0.007000000000000006 * (1 - (param_level / 256)));

  for (int i = 0; i < count; i++) {
    fRec0[0] = ((0.993 * fRec0[1]) + fSlow0);
    float fTemp0 =
        (2.44402781742033e-09 +
         (fConst0 * ((fRec0[0] * (fConst5 + (fConst4 * fRec0[0]))) + fConst2)));
    fRec1[0] = ((0.993 * fRec1[1]) + fSlow1);
    float fTemp1 = (fConst12 * fRec1[0]);
    fRec2[0] =
        (int2f(inlet_i1[i]) -
         ((((((fRec2[1] *
               (1.22201390871017e-08 +
                (fConst0 * ((fRec0[0] * (fConst32 + (fConst31 * fRec0[0]))) +
                            fConst30)))) +
              (fRec2[2] *
               (2.44402781742033e-08 +
                (fConst0 * ((fRec0[0] * (fConst29 + (fConst28 * fRec0[0]))) +
                            fConst27))))) +
             (fRec2[3] *
              (2.44402781742033e-08 +
               (fConst0 * ((fRec0[0] * (fConst26 + (fConst25 * fRec0[0]))) +
                           fConst23))))) +
            (fRec2[4] *
             (1.22201390871017e-08 +
              (fConst0 * ((fRec0[0] * (fConst21 + (fConst20 * fRec0[0]))) +
                          fConst18))))) +
           (fRec2[5] *
            (2.44402781742033e-09 +
             (fConst0 *
              ((fRec0[0] * (fConst16 + (fConst15 * fRec0[0]))) + fConst14))))) /
          fTemp0));
    float fTemp2 = (fConst39 * fRec1[0]);
    outlet_o[i] = f2int(
        fConst62 *
        (((((((fRec2[0] *
               (fConst38 +
                ((fConst0 * (fRec0[0] *
                             (fConst61 +
                              ((fRec0[0] * (fConst60 + (fConst59 * fRec1[0]))) +
                               (fConst58 * fRec1[0]))))) +
                 fTemp2))) +
              (fRec2[1] *
               (((fConst0 * (fRec0[0] *
                             (((fRec0[0] * (fConst56 + (fConst57 * fRec1[0]))) +
                               (fConst55 * fRec1[0])) +
                              fConst54))) +
                 fTemp1) +
                fConst13))) +
             (fRec2[2] *
              (((fConst0 *
                 (fRec0[0] *
                  (fConst50 + ((fRec0[0] * (fConst53 + (fConst52 * fRec1[0]))) +
                               (fConst51 * fRec1[0]))))) +
                (fConst48 * fRec1[0])) +
               fConst49))) +
            (fRec2[3] *
             (fConst47 +
              ((fConst0 *
                (fRec0[0] *
                 (fConst46 + ((fRec0[0] * (fConst45 + (fConst44 * fRec1[0]))) +
                              (fConst43 * fRec1[0]))))) +
               (fConst41 * fRec1[0]))))) +
           (fRec2[4] *
            (fConst38 +
             (fTemp2 +
              (fConst0 *
               (fRec0[0] * (((fRec0[0] * (fConst37 + (fConst36 * fRec1[0]))) +
                             (fConst34 * fRec1[0])) +
                            fConst35))))))) +
          (fRec2[5] *
           (fConst13 +
            (fTemp1 +
             (fConst0 *
              (fRec0[0] *
               (fConst7 + ((fRec0[0] * (fConst10 + (fConst9 * fRec1[0]))) +
                           (fConst8 * fRec1[0]))))))))) /
         fTemp0));
    //// post processing
    // for (int i=5; i>0; i--)
    // fRec2[i] = fRec2[i-1];
    // fRec1[1] = fRec1[0];
    // fRec0[1] = fRec0[0];
  }
}

Privacy

© 2024 Zrna Research