//----------------------------------------------------------
// name: "norm1"
//
// Code generated with Faust 2.81.2 (https://faust.grame.fr)
//----------------------------------------------------------

/* link with  */
#include <math.h>
#ifndef FAUSTFLOAT
#define FAUSTFLOAT float
#endif 


#ifndef FAUSTCLASS 
#define FAUSTCLASS mydsp
#endif

class mydsp : public dsp {
  private:
	FAUSTFLOAT 	fslider0;
	FAUSTFLOAT 	fslider1;
	FAUSTFLOAT 	fslider2;
	FAUSTFLOAT 	fslider3;
	FAUSTFLOAT 	fslider4;
	FAUSTFLOAT 	fslider5;
	FAUSTFLOAT 	fslider6;
	FAUSTFLOAT 	fslider7;
	FAUSTFLOAT 	fslider8;
	FAUSTFLOAT 	fslider9;
	FAUSTFLOAT 	fslider10;
	FAUSTFLOAT 	fslider11;
	FAUSTFLOAT 	fslider12;
	FAUSTFLOAT 	fslider13;
	FAUSTFLOAT 	fslider14;
	FAUSTFLOAT 	fslider15;
	FAUSTFLOAT 	fslider16;
	FAUSTFLOAT 	fslider17;
	FAUSTFLOAT 	fslider18;
	FAUSTFLOAT 	fslider19;
	FAUSTFLOAT 	fslider20;
	FAUSTFLOAT 	fslider21;
	FAUSTFLOAT 	fslider22;
	FAUSTFLOAT 	fslider23;
	FAUSTFLOAT 	fslider24;
	FAUSTFLOAT 	fslider25;
	FAUSTFLOAT 	fslider26;
	FAUSTFLOAT 	fslider27;
	FAUSTFLOAT 	fslider28;
	FAUSTFLOAT 	fslider29;
	FAUSTFLOAT 	fslider30;
	FAUSTFLOAT 	fslider31;
	FAUSTFLOAT 	fslider32;
	FAUSTFLOAT 	fslider33;
	FAUSTFLOAT 	fslider34;
	FAUSTFLOAT 	fslider35;
	FAUSTFLOAT 	fslider36;
	FAUSTFLOAT 	fslider37;
	FAUSTFLOAT 	fslider38;
	FAUSTFLOAT 	fslider39;
	FAUSTFLOAT 	fslider40;
	FAUSTFLOAT 	fslider41;
	FAUSTFLOAT 	fslider42;
	FAUSTFLOAT 	fslider43;
	FAUSTFLOAT 	fslider44;
	FAUSTFLOAT 	fslider45;
	FAUSTFLOAT 	fslider46;
	FAUSTFLOAT 	fslider47;
	FAUSTFLOAT 	fslider48;
	FAUSTFLOAT 	fslider49;
	FAUSTFLOAT 	fslider50;
	FAUSTFLOAT 	fslider51;
	FAUSTFLOAT 	fslider52;
	int fSampleRate;

  public:
	virtual void metadata(Meta* m) { 
		m->declare("filename", "norm1.dsp");
		m->declare("name", "norm1");
	}

	virtual int getNumInputs() { return 0; }
	virtual int getNumOutputs() { return 35; }
	static void classInit(int sample_rate) {
	}
	virtual void instanceConstants(int sample_rate) {
		fSampleRate = sample_rate;
	}
	virtual void instanceResetUserInterface() {
		fslider0 = 0.0f;
		fslider1 = 0.0f;
		fslider2 = 0.0f;
		fslider3 = 0.0f;
		fslider4 = 0.0f;
		fslider5 = 0.0f;
		fslider6 = 0.0f;
		fslider7 = 0.0f;
		fslider8 = 0.0f;
		fslider9 = 0.0f;
		fslider10 = 0.0f;
		fslider11 = 0.0f;
		fslider12 = 0.0f;
		fslider13 = 0.0f;
		fslider14 = 0.0f;
		fslider15 = 0.0f;
		fslider16 = 0.0f;
		fslider17 = 1.0f;
		fslider18 = 0.0f;
		fslider19 = 0.0f;
		fslider20 = 0.0f;
		fslider21 = 0.0f;
		fslider22 = 0.0f;
		fslider23 = 0.0f;
		fslider24 = 0.0f;
		fslider25 = 0.0f;
		fslider26 = 0.0f;
		fslider27 = 0.0f;
		fslider28 = 0.0f;
		fslider29 = 0.0f;
		fslider30 = 0.0f;
		fslider31 = 0.0f;
		fslider32 = 0.0f;
		fslider33 = 0.0f;
		fslider34 = 0.0f;
		fslider35 = 0.0f;
		fslider36 = 0.0f;
		fslider37 = 0.0f;
		fslider38 = 0.0f;
		fslider39 = 0.0f;
		fslider40 = 0.0f;
		fslider41 = 0.0f;
		fslider42 = 0.0f;
		fslider43 = 0.0f;
		fslider44 = 0.0f;
		fslider45 = 0.0f;
		fslider46 = 0.0f;
		fslider47 = 0.0f;
		fslider48 = 0.0f;
		fslider49 = 0.0f;
		fslider50 = 0.0f;
		fslider51 = 0.0f;
		fslider52 = 1.0f;
	}
	virtual void instanceClear() {
	}
	virtual void init(int sample_rate) {
		classInit(sample_rate);
		instanceInit(sample_rate);
	}
	virtual void instanceInit(int sample_rate) {
		instanceConstants(sample_rate);
		instanceResetUserInterface();
		instanceClear();
	}
	virtual mydsp* clone() {
		return new mydsp();
	}
	virtual int getSampleRate() {
		return fSampleRate;
	}
	virtual void buildUserInterface(UI* ui_interface) {
		ui_interface->openVerticalBox("norm1");
		ui_interface->addHorizontalSlider("1.1_x", &fslider42, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("1.2_x", &fslider44, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("1.2_y", &fslider43, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("1.3_x", &fslider20, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("1.4_x", &fslider45, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("1.5_y", &fslider0, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("1.6_x", &fslider21, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.1_x", &fslider1, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.1_y", &fslider2, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.2_x", &fslider3, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.2_y", &fslider4, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.3_x", &fslider5, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.3_y", &fslider6, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.3_z", &fslider7, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.4_x", &fslider23, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.4_y", &fslider24, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.4_z", &fslider22, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.5_x", &fslider26, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("2.5_y", &fslider25, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("3.1_x", &fslider8, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("3.2_x", &fslider9, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("3.3_x", &fslider10, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("3.6_z", &fslider11, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("3.7_y", &fslider12, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.1_x", &fslider14, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.1_y", &fslider15, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.2_x", &fslider28, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.2_y", &fslider27, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.2_z", &fslider29, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.3_x", &fslider48, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.3_y", &fslider47, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.3_z", &fslider46, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.4_y", &fslider13, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.5_x", &fslider30, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("4.5_y", &fslider31, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("5.1_x", &fslider16, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("5.2_x", &fslider49, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("5.3_x", &fslider50, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("5.3_y", &fslider51, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("5.4_x", &fslider17, 1.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("5.5_x", &fslider52, 1.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.1_x", &fslider32, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.1_y", &fslider33, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.1_z", &fslider34, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.2_x", &fslider18, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.2_y", &fslider19, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.3_x", &fslider35, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.3_y", &fslider36, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.4_x", &fslider37, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.5_a", &fslider40, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.5_b", &fslider41, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.5_x", &fslider38, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->addHorizontalSlider("6.5_y", &fslider39, 0.0f, -1e+01f, 1e+01f, 0.1f);
		ui_interface->closeBox();
	}
	virtual void compute (int count, FAUSTFLOAT** input, FAUSTFLOAT** output) {
		float 	fSlow0 = float(fslider0); // step: 3
		float 	fSlow1 = (float(fslider1) + float(fslider2)); // step: 6
		float 	fSlow2 = (float(fslider3) * float(fslider4)); // step: 9
		float 	fSlow3 = ((float(fslider5) + float(fslider6)) + float(fslider7)); // step: 14
		float 	fSlow4 = float(fslider8); // step: 15
		float 	fSlow5 = float(fslider9); // step: 16
		float 	fSlow6 = float(fslider10); // step: 17
		float 	fSlow7 = float(fslider11); // step: 18
		float 	fSlow8 = float(fslider12); // step: 19
		float 	fSlow9 = float(fslider13); // step: 20
		float 	fSlow10 = (2.0f * (float(fslider14) + float(fslider15))); // step: 25
		float 	fSlow11 = powf(float(fslider16),2.0f); // step: 27
		float 	fSlow12 = float(fslider17); // step: 28
		float 	fSlow13 = (powf(fSlow12,5.0f) / powf(fSlow12,3.0f)); // step: 33
		float 	fSlow14 = ((4.0f * float(fslider18)) + (2.0f * float(fslider19))); // step: 39
		float 	fSlow15 = (3.0f * float(fslider20)); // step: 41
		float 	fSlow16 = (3.7f * float(fslider21)); // step: 44
		float 	fSlow17 = (float(fslider22) + (float(fslider23) + float(fslider24))); // step: 49
		float 	fSlow18 = (2.0f * (float(fslider25) + float(fslider26))); // step: 53
		float 	fSlow19 = ((float(fslider28) + float(fslider29)) - float(fslider27)); // step: 58
		float 	fSlow20 = (0.5f * (float(fslider30) + float(fslider31))); // step: 63
		float 	fSlow21 = (float(fslider32) * (float(fslider33) + float(fslider34))); // step: 68
		float 	fSlow22 = float(fslider35); // step: 69
		float 	fSlow23 = float(fslider36); // step: 70
		float 	fSlow24 = ((fSlow22 * fSlow23) * (fSlow22 + fSlow23)); // step: 73
		float 	fSlow25 = float(fslider37); // step: 74
		float 	fSlow26 = (fSlow25 * ((3.0f * fSlow25) + -6.0f)); // step: 78
		float 	fSlow27 = ((float(fslider38) + float(fslider39)) * (float(fslider40) + float(fslider41))); // step: 85
		float 	fSlow28 = (2.0f * float(fslider42)); // step: 87
		float 	fSlow29 = (float(fslider43) + (2.0f * float(fslider44))); // step: 91
		float 	fSlow30 = ((powf(float(fslider48),2.0f) * float(fslider47)) * float(fslider46)); // step: 101
		float 	fSlow31 = powf(float(fslider49),2.0f); // step: 103
		float 	fSlow32 = (powf(float(fslider50),2.0f) * powf(float(fslider51),3.0f)); // step: 108
		float 	fSlow33 = powf(float(fslider52),2.0f); // step: 110
		float 	fSlow34 = (fSlow33 / fSlow33); // step: 111
		int fullcount = count;
		for (int index = 0; index < fullcount; index += 32) {
			int count = min(32, fullcount-index);
			FAUSTFLOAT* output0 = &output[0][index]; // Zone 3
			FAUSTFLOAT* output1 = &output[1][index]; // Zone 3
			FAUSTFLOAT* output2 = &output[2][index]; // Zone 3
			FAUSTFLOAT* output3 = &output[3][index]; // Zone 3
			FAUSTFLOAT* output4 = &output[4][index]; // Zone 3
			FAUSTFLOAT* output5 = &output[5][index]; // Zone 3
			FAUSTFLOAT* output6 = &output[6][index]; // Zone 3
			FAUSTFLOAT* output7 = &output[7][index]; // Zone 3
			FAUSTFLOAT* output8 = &output[8][index]; // Zone 3
			FAUSTFLOAT* output9 = &output[9][index]; // Zone 3
			FAUSTFLOAT* output10 = &output[10][index]; // Zone 3
			FAUSTFLOAT* output11 = &output[11][index]; // Zone 3
			FAUSTFLOAT* output12 = &output[12][index]; // Zone 3
			FAUSTFLOAT* output13 = &output[13][index]; // Zone 3
			FAUSTFLOAT* output14 = &output[14][index]; // Zone 3
			FAUSTFLOAT* output15 = &output[15][index]; // Zone 3
			FAUSTFLOAT* output16 = &output[16][index]; // Zone 3
			FAUSTFLOAT* output17 = &output[17][index]; // Zone 3
			FAUSTFLOAT* output18 = &output[18][index]; // Zone 3
			FAUSTFLOAT* output19 = &output[19][index]; // Zone 3
			FAUSTFLOAT* output20 = &output[20][index]; // Zone 3
			FAUSTFLOAT* output21 = &output[21][index]; // Zone 3
			FAUSTFLOAT* output22 = &output[22][index]; // Zone 3
			FAUSTFLOAT* output23 = &output[23][index]; // Zone 3
			FAUSTFLOAT* output24 = &output[24][index]; // Zone 3
			FAUSTFLOAT* output25 = &output[25][index]; // Zone 3
			FAUSTFLOAT* output26 = &output[26][index]; // Zone 3
			FAUSTFLOAT* output27 = &output[27][index]; // Zone 3
			FAUSTFLOAT* output28 = &output[28][index]; // Zone 3
			FAUSTFLOAT* output29 = &output[29][index]; // Zone 3
			FAUSTFLOAT* output30 = &output[30][index]; // Zone 3
			FAUSTFLOAT* output31 = &output[31][index]; // Zone 3
			FAUSTFLOAT* output32 = &output[32][index]; // Zone 3
			FAUSTFLOAT* output33 = &output[33][index]; // Zone 3
			FAUSTFLOAT* output34 = &output[34][index]; // Zone 3
			for (int i=0; i<count; i++) {
				output0[i] = (FAUSTFLOAT)(fSlow28);  // Zone Exec Code
				output1[i] = (FAUSTFLOAT)(fSlow29);  // Zone Exec Code
				output2[i] = (FAUSTFLOAT)(fSlow15);  // Zone Exec Code
				output3[i] = (FAUSTFLOAT)(-(3.0f * float(fslider45)));  // Zone Exec Code
				output4[i] = (FAUSTFLOAT)(fSlow0);  // Zone Exec Code
				output5[i] = (FAUSTFLOAT)(fSlow16);  // Zone Exec Code
				output6[i] = (FAUSTFLOAT)(fSlow1);  // Zone Exec Code
				output7[i] = (FAUSTFLOAT)(fSlow1);  // Zone Exec Code
				output8[i] = (FAUSTFLOAT)(fSlow2);  // Zone Exec Code
				output9[i] = (FAUSTFLOAT)(fSlow2);  // Zone Exec Code
				output10[i] = (FAUSTFLOAT)(fSlow3);  // Zone Exec Code
				output11[i] = (FAUSTFLOAT)(fSlow17);  // Zone Exec Code
				output12[i] = (FAUSTFLOAT)(fSlow18);  // Zone Exec Code
				output13[i] = (FAUSTFLOAT)(fSlow4);  // Zone Exec Code
				output14[i] = (FAUSTFLOAT)(fSlow5);  // Zone Exec Code
				output15[i] = (FAUSTFLOAT)(fSlow6);  // Zone Exec Code
				output16[i] = (FAUSTFLOAT)(0.0f);  // Zone Exec Code
				output17[i] = (FAUSTFLOAT)(0);  // Zone Exec Code
				output18[i] = (FAUSTFLOAT)(fSlow7);  // Zone Exec Code
				output19[i] = (FAUSTFLOAT)(fSlow8);  // Zone Exec Code
				output20[i] = (FAUSTFLOAT)(fSlow10);  // Zone Exec Code
				output21[i] = (FAUSTFLOAT)(fSlow19);  // Zone Exec Code
				output22[i] = (FAUSTFLOAT)(fSlow30);  // Zone Exec Code
				output23[i] = (FAUSTFLOAT)(fSlow9);  // Zone Exec Code
				output24[i] = (FAUSTFLOAT)(fSlow20);  // Zone Exec Code
				output25[i] = (FAUSTFLOAT)(fSlow11);  // Zone Exec Code
				output26[i] = (FAUSTFLOAT)(fSlow31);  // Zone Exec Code
				output27[i] = (FAUSTFLOAT)(fSlow32);  // Zone Exec Code
				output28[i] = (FAUSTFLOAT)(fSlow13);  // Zone Exec Code
				output29[i] = (FAUSTFLOAT)(fSlow34);  // Zone Exec Code
				output30[i] = (FAUSTFLOAT)(fSlow21);  // Zone Exec Code
				output31[i] = (FAUSTFLOAT)(fSlow14);  // Zone Exec Code
				output32[i] = (FAUSTFLOAT)(fSlow24);  // Zone Exec Code
				output33[i] = (FAUSTFLOAT)(fSlow26);  // Zone Exec Code
				output34[i] = (FAUSTFLOAT)(fSlow27);  // Zone Exec Code
			}
		}
	}
};


