ref: 03bbdd2116025795128eed80b55bfbb2fcdb71c2
dir: /dsp/piano.c/
/* ------------------------------------------------------------ author: "Romain Michon (rmichon@ccrma.stanford.edu)" copyright: "Romain Michon" name: "Piano" version: "1.0" Code generated with Faust 2.23.10 (https://faust.grame.fr) Compilation options: -lang c -scal -ftz 0 ------------------------------------------------------------ */ #ifndef __Piano_H__ #define __Piano_H__ /* Piano Plan 9 C architecture for Faust. */ #include <u.h> #include <libc.h> #include "uiglue.h" #define max(x,y) (((x) > (y)) ? (x) : (y)) #define min(x,y) (((x) < (y)) ? (x) : (y)) #ifndef FAUSTFLOAT #define FAUSTFLOAT float #endif #ifdef __cplusplus extern "C" { #endif /* link with : "" */ #include <math.h> #include <piano.h> #include <stdlib.h> static float Piano_faustpower2_f(float value) { return (value * value); } #ifndef FAUSTCLASS #define FAUSTCLASS Piano #endif #ifdef __APPLE__ #define exp10f __exp10f #define exp10 __exp10 #endif typedef struct { int fSampleRate; float fConst0; float fConst1; float fConst2; float fConst3; float fConst4; FAUSTFLOAT fHslider0; float fConst5; float fConst6; float fConst7; float fConst8; float fRec11[2]; float fRec10[2]; int IOTA; float fVec0[16384]; float fConst9; int iConst10; FAUSTFLOAT fHslider1; FAUSTFLOAT fHslider2; float fRec12[2]; FAUSTFLOAT fHslider3; float fConst11; FAUSTFLOAT fHslider4; int iRec23[2]; FAUSTFLOAT fButton0; float fRec25[2]; float fConst12; FAUSTFLOAT fHslider5; float fRec24[2]; float fConst13; float fConst14; float fConst15; FAUSTFLOAT fHslider6; float fConst16; float fRec26[2]; float fVec1[2]; float fVec2[2]; float fRec22[2]; float fRec21[2]; float fRec20[2]; float fRec19[2]; float fRec18[2]; float fConst17; float fRec17[3]; float fRec16[3]; float fRec15[3]; float fRec14[3]; float fRec13[2]; float fConst18; FAUSTFLOAT fHslider7; FAUSTFLOAT fHslider8; float fRec33[2]; float fRec38[2]; float fRec37[2]; float fRec36[2]; float fRec35[2]; float fRec34[2]; float fVec3[2]; float fRec32[2]; float fRec31[2]; float fRec30[8192]; float fVec4[2]; float fRec42[2]; float fRec41[2]; float fRec40[8192]; float fVec5[2]; float fRec39[2]; float fRec27[2]; float fRec28[2]; float fConst19; float fConst20; float fRec43[3]; float fVec6[8192]; float fVec7[4096]; int iConst21; float fVec8[2048]; int iConst22; float fRec8[2]; float fConst23; float fConst24; float fConst25; float fConst26; float fRec47[2]; float fRec46[2]; float fVec9[16384]; float fConst27; int iConst28; float fVec10[4096]; int iConst29; float fRec44[2]; float fConst30; float fConst31; float fConst32; float fConst33; float fRec51[2]; float fRec50[2]; float fVec11[32768]; float fConst34; int iConst35; float fConst36; FAUSTFLOAT fHslider9; float fVec12[4096]; float fVec13[2048]; int iConst37; float fRec48[2]; float fConst38; float fConst39; float fConst40; float fConst41; float fRec55[2]; float fRec54[2]; float fVec14[32768]; float fConst42; int iConst43; float fVec15[4096]; int iConst44; float fRec52[2]; float fConst45; float fConst46; float fConst47; float fConst48; float fRec59[2]; float fRec58[2]; float fVec16[32768]; float fConst49; int iConst50; float fVec17[4096]; int iConst51; float fRec56[2]; float fConst52; float fConst53; float fConst54; float fConst55; float fRec63[2]; float fRec62[2]; float fVec18[16384]; float fConst56; int iConst57; float fVec19[2048]; int iConst58; float fRec60[2]; float fConst59; float fConst60; float fConst61; float fConst62; float fRec67[2]; float fRec66[2]; float fVec20[16384]; float fConst63; int iConst64; float fVec21[4096]; int iConst65; float fRec64[2]; float fConst66; float fConst67; float fConst68; float fConst69; float fRec71[2]; float fRec70[2]; float fVec22[16384]; float fConst70; int iConst71; float fVec23[4096]; int iConst72; float fRec68[2]; float fRec0[3]; float fRec1[3]; float fRec2[3]; float fRec3[3]; float fRec4[3]; float fRec5[3]; float fRec6[3]; float fRec7[3]; } Piano; Piano* newPiano(void) { Piano* dsp = (Piano*)calloc(1, sizeof(Piano)); return dsp; } void deletePiano(Piano* dsp) { USED(dsp); free(dsp); } void metadataPiano(MetaGlue* m) { m->declare(m->metaInterface, "author", "Romain Michon (rmichon@ccrma.stanford.edu)"); m->declare(m->metaInterface, "basics.lib/name", "Faust Basic Element Library"); m->declare(m->metaInterface, "basics.lib/version", "0.1"); m->declare(m->metaInterface, "copyright", "Romain Michon"); m->declare(m->metaInterface, "delays.lib/name", "Faust Delay Library"); m->declare(m->metaInterface, "delays.lib/version", "0.1"); m->declare(m->metaInterface, "description", "WaveGuide Commuted Piano"); m->declare(m->metaInterface, "filename", "piano.dsp"); m->declare(m->metaInterface, "filters.lib/allpass_comb:author", "Julius O. Smith III"); m->declare(m->metaInterface, "filters.lib/allpass_comb:copyright", "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>"); m->declare(m->metaInterface, "filters.lib/allpass_comb:license", "MIT-style STK-4.3 license"); m->declare(m->metaInterface, "filters.lib/lowpass0_highpass1", "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>"); m->declare(m->metaInterface, "filters.lib/lowpass0_highpass1:author", "Julius O. Smith III"); m->declare(m->metaInterface, "filters.lib/lowpass:author", "Julius O. Smith III"); m->declare(m->metaInterface, "filters.lib/lowpass:copyright", "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>"); m->declare(m->metaInterface, "filters.lib/lowpass:license", "MIT-style STK-4.3 license"); m->declare(m->metaInterface, "filters.lib/name", "Faust Filters Library"); m->declare(m->metaInterface, "filters.lib/tf1:author", "Julius O. Smith III"); m->declare(m->metaInterface, "filters.lib/tf1:copyright", "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>"); m->declare(m->metaInterface, "filters.lib/tf1:license", "MIT-style STK-4.3 license"); m->declare(m->metaInterface, "filters.lib/tf1s:author", "Julius O. Smith III"); m->declare(m->metaInterface, "filters.lib/tf1s:copyright", "Copyright (C) 2003-2019 by Julius O. Smith III <jos@ccrma.stanford.edu>"); m->declare(m->metaInterface, "filters.lib/tf1s:license", "MIT-style STK-4.3 license"); m->declare(m->metaInterface, "group", "Synthesis"); m->declare(m->metaInterface, "instruments.lib/author", "Romain Michon (rmichon@ccrma.stanford.edu)"); m->declare(m->metaInterface, "instruments.lib/copyright", "Romain Michon"); m->declare(m->metaInterface, "instruments.lib/licence", "STK-4.3"); m->declare(m->metaInterface, "instruments.lib/name", "Faust-STK Tools Library"); m->declare(m->metaInterface, "instruments.lib/version", "1.0"); m->declare(m->metaInterface, "licence", "STK-4.3"); m->declare(m->metaInterface, "maths.lib/author", "GRAME"); m->declare(m->metaInterface, "maths.lib/copyright", "GRAME"); m->declare(m->metaInterface, "maths.lib/license", "LGPL with exception"); m->declare(m->metaInterface, "maths.lib/name", "Faust Math Library"); m->declare(m->metaInterface, "maths.lib/version", "2.3"); m->declare(m->metaInterface, "name", "Piano"); m->declare(m->metaInterface, "noises.lib/name", "Faust Noise Generator Library"); m->declare(m->metaInterface, "noises.lib/version", "0.0"); m->declare(m->metaInterface, "platform.lib/name", "Generic Platform Library"); m->declare(m->metaInterface, "platform.lib/version", "0.1"); m->declare(m->metaInterface, "reverbs.lib/name", "Faust Reverb Library"); m->declare(m->metaInterface, "reverbs.lib/version", "0.0"); m->declare(m->metaInterface, "routes.lib/name", "Faust Signal Routing Library"); m->declare(m->metaInterface, "routes.lib/version", "0.2"); m->declare(m->metaInterface, "signals.lib/name", "Faust Signal Routing Library"); m->declare(m->metaInterface, "signals.lib/version", "0.0"); m->declare(m->metaInterface, "version", "1.0"); } int getSampleRatePiano(Piano* dsp) { USED(dsp); return dsp->fSampleRate; } int getNumInputsPiano(Piano* dsp) { USED(dsp); return 0; } int getNumOutputsPiano(Piano* dsp) { USED(dsp); return 2; } int getInputRatePiano(Piano* dsp, int channel) { USED(dsp); int rate; switch ((channel)) { default: { rate = -1; break; } } return rate; } int getOutputRatePiano(Piano* dsp, int channel) { USED(dsp); int rate; switch ((channel)) { case 0: { rate = 1; break; } case 1: { rate = 1; break; } default: { rate = -1; break; } } return rate; } void classInitPiano(int sample_rate) { USED(sample_rate); } void instanceResetUserInterfacePiano(Piano* dsp) { USED(dsp); dsp->fHslider0 = (FAUSTFLOAT)0.71999999999999997f; dsp->fHslider1 = (FAUSTFLOAT)0.59999999999999998f; dsp->fHslider2 = (FAUSTFLOAT)0.13700000000000001f; dsp->fHslider3 = (FAUSTFLOAT)440.0f; dsp->fHslider4 = (FAUSTFLOAT)0.0f; dsp->fButton0 = (FAUSTFLOAT)0.0f; dsp->fHslider5 = (FAUSTFLOAT)1.0f; dsp->fHslider6 = (FAUSTFLOAT)0.10000000000000001f; dsp->fHslider7 = (FAUSTFLOAT)0.28000000000000003f; dsp->fHslider8 = (FAUSTFLOAT)0.10000000000000001f; dsp->fHslider9 = (FAUSTFLOAT)0.5f; } void instanceClearPiano(Piano* dsp) { USED(dsp); /* C99 loop */ { int l0; for (l0 = 0; (l0 < 2); l0 = (l0 + 1)) { dsp->fRec11[l0] = 0.0f; } } /* C99 loop */ { int l1; for (l1 = 0; (l1 < 2); l1 = (l1 + 1)) { dsp->fRec10[l1] = 0.0f; } } dsp->IOTA = 0; /* C99 loop */ { int l2; for (l2 = 0; (l2 < 16384); l2 = (l2 + 1)) { dsp->fVec0[l2] = 0.0f; } } /* C99 loop */ { int l3; for (l3 = 0; (l3 < 2); l3 = (l3 + 1)) { dsp->fRec12[l3] = 0.0f; } } /* C99 loop */ { int l4; for (l4 = 0; (l4 < 2); l4 = (l4 + 1)) { dsp->iRec23[l4] = 0; } } /* C99 loop */ { int l5; for (l5 = 0; (l5 < 2); l5 = (l5 + 1)) { dsp->fRec25[l5] = 0.0f; } } /* C99 loop */ { int l6; for (l6 = 0; (l6 < 2); l6 = (l6 + 1)) { dsp->fRec24[l6] = 0.0f; } } /* C99 loop */ { int l7; for (l7 = 0; (l7 < 2); l7 = (l7 + 1)) { dsp->fRec26[l7] = 0.0f; } } /* C99 loop */ { int l8; for (l8 = 0; (l8 < 2); l8 = (l8 + 1)) { dsp->fVec1[l8] = 0.0f; } } /* C99 loop */ { int l9; for (l9 = 0; (l9 < 2); l9 = (l9 + 1)) { dsp->fVec2[l9] = 0.0f; } } /* C99 loop */ { int l10; for (l10 = 0; (l10 < 2); l10 = (l10 + 1)) { dsp->fRec22[l10] = 0.0f; } } /* C99 loop */ { int l11; for (l11 = 0; (l11 < 2); l11 = (l11 + 1)) { dsp->fRec21[l11] = 0.0f; } } /* C99 loop */ { int l12; for (l12 = 0; (l12 < 2); l12 = (l12 + 1)) { dsp->fRec20[l12] = 0.0f; } } /* C99 loop */ { int l13; for (l13 = 0; (l13 < 2); l13 = (l13 + 1)) { dsp->fRec19[l13] = 0.0f; } } /* C99 loop */ { int l14; for (l14 = 0; (l14 < 2); l14 = (l14 + 1)) { dsp->fRec18[l14] = 0.0f; } } /* C99 loop */ { int l15; for (l15 = 0; (l15 < 3); l15 = (l15 + 1)) { dsp->fRec17[l15] = 0.0f; } } /* C99 loop */ { int l16; for (l16 = 0; (l16 < 3); l16 = (l16 + 1)) { dsp->fRec16[l16] = 0.0f; } } /* C99 loop */ { int l17; for (l17 = 0; (l17 < 3); l17 = (l17 + 1)) { dsp->fRec15[l17] = 0.0f; } } /* C99 loop */ { int l18; for (l18 = 0; (l18 < 3); l18 = (l18 + 1)) { dsp->fRec14[l18] = 0.0f; } } /* C99 loop */ { int l19; for (l19 = 0; (l19 < 2); l19 = (l19 + 1)) { dsp->fRec13[l19] = 0.0f; } } /* C99 loop */ { int l20; for (l20 = 0; (l20 < 2); l20 = (l20 + 1)) { dsp->fRec33[l20] = 0.0f; } } /* C99 loop */ { int l21; for (l21 = 0; (l21 < 2); l21 = (l21 + 1)) { dsp->fRec38[l21] = 0.0f; } } /* C99 loop */ { int l22; for (l22 = 0; (l22 < 2); l22 = (l22 + 1)) { dsp->fRec37[l22] = 0.0f; } } /* C99 loop */ { int l23; for (l23 = 0; (l23 < 2); l23 = (l23 + 1)) { dsp->fRec36[l23] = 0.0f; } } /* C99 loop */ { int l24; for (l24 = 0; (l24 < 2); l24 = (l24 + 1)) { dsp->fRec35[l24] = 0.0f; } } /* C99 loop */ { int l25; for (l25 = 0; (l25 < 2); l25 = (l25 + 1)) { dsp->fRec34[l25] = 0.0f; } } /* C99 loop */ { int l26; for (l26 = 0; (l26 < 2); l26 = (l26 + 1)) { dsp->fVec3[l26] = 0.0f; } } /* C99 loop */ { int l27; for (l27 = 0; (l27 < 2); l27 = (l27 + 1)) { dsp->fRec32[l27] = 0.0f; } } /* C99 loop */ { int l28; for (l28 = 0; (l28 < 2); l28 = (l28 + 1)) { dsp->fRec31[l28] = 0.0f; } } /* C99 loop */ { int l29; for (l29 = 0; (l29 < 8192); l29 = (l29 + 1)) { dsp->fRec30[l29] = 0.0f; } } /* C99 loop */ { int l30; for (l30 = 0; (l30 < 2); l30 = (l30 + 1)) { dsp->fVec4[l30] = 0.0f; } } /* C99 loop */ { int l31; for (l31 = 0; (l31 < 2); l31 = (l31 + 1)) { dsp->fRec42[l31] = 0.0f; } } /* C99 loop */ { int l32; for (l32 = 0; (l32 < 2); l32 = (l32 + 1)) { dsp->fRec41[l32] = 0.0f; } } /* C99 loop */ { int l33; for (l33 = 0; (l33 < 8192); l33 = (l33 + 1)) { dsp->fRec40[l33] = 0.0f; } } /* C99 loop */ { int l34; for (l34 = 0; (l34 < 2); l34 = (l34 + 1)) { dsp->fVec5[l34] = 0.0f; } } /* C99 loop */ { int l35; for (l35 = 0; (l35 < 2); l35 = (l35 + 1)) { dsp->fRec39[l35] = 0.0f; } } /* C99 loop */ { int l36; for (l36 = 0; (l36 < 2); l36 = (l36 + 1)) { dsp->fRec27[l36] = 0.0f; } } /* C99 loop */ { int l37; for (l37 = 0; (l37 < 2); l37 = (l37 + 1)) { dsp->fRec28[l37] = 0.0f; } } /* C99 loop */ { int l38; for (l38 = 0; (l38 < 3); l38 = (l38 + 1)) { dsp->fRec43[l38] = 0.0f; } } /* C99 loop */ { int l39; for (l39 = 0; (l39 < 8192); l39 = (l39 + 1)) { dsp->fVec6[l39] = 0.0f; } } /* C99 loop */ { int l40; for (l40 = 0; (l40 < 4096); l40 = (l40 + 1)) { dsp->fVec7[l40] = 0.0f; } } /* C99 loop */ { int l41; for (l41 = 0; (l41 < 2048); l41 = (l41 + 1)) { dsp->fVec8[l41] = 0.0f; } } /* C99 loop */ { int l42; for (l42 = 0; (l42 < 2); l42 = (l42 + 1)) { dsp->fRec8[l42] = 0.0f; } } /* C99 loop */ { int l43; for (l43 = 0; (l43 < 2); l43 = (l43 + 1)) { dsp->fRec47[l43] = 0.0f; } } /* C99 loop */ { int l44; for (l44 = 0; (l44 < 2); l44 = (l44 + 1)) { dsp->fRec46[l44] = 0.0f; } } /* C99 loop */ { int l45; for (l45 = 0; (l45 < 16384); l45 = (l45 + 1)) { dsp->fVec9[l45] = 0.0f; } } /* C99 loop */ { int l46; for (l46 = 0; (l46 < 4096); l46 = (l46 + 1)) { dsp->fVec10[l46] = 0.0f; } } /* C99 loop */ { int l47; for (l47 = 0; (l47 < 2); l47 = (l47 + 1)) { dsp->fRec44[l47] = 0.0f; } } /* C99 loop */ { int l48; for (l48 = 0; (l48 < 2); l48 = (l48 + 1)) { dsp->fRec51[l48] = 0.0f; } } /* C99 loop */ { int l49; for (l49 = 0; (l49 < 2); l49 = (l49 + 1)) { dsp->fRec50[l49] = 0.0f; } } /* C99 loop */ { int l50; for (l50 = 0; (l50 < 32768); l50 = (l50 + 1)) { dsp->fVec11[l50] = 0.0f; } } /* C99 loop */ { int l51; for (l51 = 0; (l51 < 4096); l51 = (l51 + 1)) { dsp->fVec12[l51] = 0.0f; } } /* C99 loop */ { int l52; for (l52 = 0; (l52 < 2048); l52 = (l52 + 1)) { dsp->fVec13[l52] = 0.0f; } } /* C99 loop */ { int l53; for (l53 = 0; (l53 < 2); l53 = (l53 + 1)) { dsp->fRec48[l53] = 0.0f; } } /* C99 loop */ { int l54; for (l54 = 0; (l54 < 2); l54 = (l54 + 1)) { dsp->fRec55[l54] = 0.0f; } } /* C99 loop */ { int l55; for (l55 = 0; (l55 < 2); l55 = (l55 + 1)) { dsp->fRec54[l55] = 0.0f; } } /* C99 loop */ { int l56; for (l56 = 0; (l56 < 32768); l56 = (l56 + 1)) { dsp->fVec14[l56] = 0.0f; } } /* C99 loop */ { int l57; for (l57 = 0; (l57 < 4096); l57 = (l57 + 1)) { dsp->fVec15[l57] = 0.0f; } } /* C99 loop */ { int l58; for (l58 = 0; (l58 < 2); l58 = (l58 + 1)) { dsp->fRec52[l58] = 0.0f; } } /* C99 loop */ { int l59; for (l59 = 0; (l59 < 2); l59 = (l59 + 1)) { dsp->fRec59[l59] = 0.0f; } } /* C99 loop */ { int l60; for (l60 = 0; (l60 < 2); l60 = (l60 + 1)) { dsp->fRec58[l60] = 0.0f; } } /* C99 loop */ { int l61; for (l61 = 0; (l61 < 32768); l61 = (l61 + 1)) { dsp->fVec16[l61] = 0.0f; } } /* C99 loop */ { int l62; for (l62 = 0; (l62 < 4096); l62 = (l62 + 1)) { dsp->fVec17[l62] = 0.0f; } } /* C99 loop */ { int l63; for (l63 = 0; (l63 < 2); l63 = (l63 + 1)) { dsp->fRec56[l63] = 0.0f; } } /* C99 loop */ { int l64; for (l64 = 0; (l64 < 2); l64 = (l64 + 1)) { dsp->fRec63[l64] = 0.0f; } } /* C99 loop */ { int l65; for (l65 = 0; (l65 < 2); l65 = (l65 + 1)) { dsp->fRec62[l65] = 0.0f; } } /* C99 loop */ { int l66; for (l66 = 0; (l66 < 16384); l66 = (l66 + 1)) { dsp->fVec18[l66] = 0.0f; } } /* C99 loop */ { int l67; for (l67 = 0; (l67 < 2048); l67 = (l67 + 1)) { dsp->fVec19[l67] = 0.0f; } } /* C99 loop */ { int l68; for (l68 = 0; (l68 < 2); l68 = (l68 + 1)) { dsp->fRec60[l68] = 0.0f; } } /* C99 loop */ { int l69; for (l69 = 0; (l69 < 2); l69 = (l69 + 1)) { dsp->fRec67[l69] = 0.0f; } } /* C99 loop */ { int l70; for (l70 = 0; (l70 < 2); l70 = (l70 + 1)) { dsp->fRec66[l70] = 0.0f; } } /* C99 loop */ { int l71; for (l71 = 0; (l71 < 16384); l71 = (l71 + 1)) { dsp->fVec20[l71] = 0.0f; } } /* C99 loop */ { int l72; for (l72 = 0; (l72 < 4096); l72 = (l72 + 1)) { dsp->fVec21[l72] = 0.0f; } } /* C99 loop */ { int l73; for (l73 = 0; (l73 < 2); l73 = (l73 + 1)) { dsp->fRec64[l73] = 0.0f; } } /* C99 loop */ { int l74; for (l74 = 0; (l74 < 2); l74 = (l74 + 1)) { dsp->fRec71[l74] = 0.0f; } } /* C99 loop */ { int l75; for (l75 = 0; (l75 < 2); l75 = (l75 + 1)) { dsp->fRec70[l75] = 0.0f; } } /* C99 loop */ { int l76; for (l76 = 0; (l76 < 16384); l76 = (l76 + 1)) { dsp->fVec22[l76] = 0.0f; } } /* C99 loop */ { int l77; for (l77 = 0; (l77 < 4096); l77 = (l77 + 1)) { dsp->fVec23[l77] = 0.0f; } } /* C99 loop */ { int l78; for (l78 = 0; (l78 < 2); l78 = (l78 + 1)) { dsp->fRec68[l78] = 0.0f; } } /* C99 loop */ { int l79; for (l79 = 0; (l79 < 3); l79 = (l79 + 1)) { dsp->fRec0[l79] = 0.0f; } } /* C99 loop */ { int l80; for (l80 = 0; (l80 < 3); l80 = (l80 + 1)) { dsp->fRec1[l80] = 0.0f; } } /* C99 loop */ { int l81; for (l81 = 0; (l81 < 3); l81 = (l81 + 1)) { dsp->fRec2[l81] = 0.0f; } } /* C99 loop */ { int l82; for (l82 = 0; (l82 < 3); l82 = (l82 + 1)) { dsp->fRec3[l82] = 0.0f; } } /* C99 loop */ { int l83; for (l83 = 0; (l83 < 3); l83 = (l83 + 1)) { dsp->fRec4[l83] = 0.0f; } } /* C99 loop */ { int l84; for (l84 = 0; (l84 < 3); l84 = (l84 + 1)) { dsp->fRec5[l84] = 0.0f; } } /* C99 loop */ { int l85; for (l85 = 0; (l85 < 3); l85 = (l85 + 1)) { dsp->fRec6[l85] = 0.0f; } } /* C99 loop */ { int l86; for (l86 = 0; (l86 < 3); l86 = (l86 + 1)) { dsp->fRec7[l86] = 0.0f; } } } void instanceConstantsPiano(Piano* dsp, int sample_rate) { USED(sample_rate); USED(dsp); dsp->fSampleRate = sample_rate; dsp->fConst0 = fminf(192000.0f, fmaxf(1.0f, (float)dsp->fSampleRate)); dsp->fConst1 = cosf((37699.1133f / dsp->fConst0)); dsp->fConst2 = floorf(((0.125f * dsp->fConst0) + 0.5f)); dsp->fConst3 = ((0.0f - (6.90775537f * dsp->fConst2)) / dsp->fConst0); dsp->fConst4 = (0.5f * dsp->fConst3); dsp->fConst5 = (0.333333343f * dsp->fConst3); dsp->fConst6 = (1.0f / tanf((628.318542f / dsp->fConst0))); dsp->fConst7 = (1.0f / (dsp->fConst6 + 1.0f)); dsp->fConst8 = (1.0f - dsp->fConst6); dsp->fConst9 = floorf(((0.0134579996f * dsp->fConst0) + 0.5f)); dsp->iConst10 = (int)fminf(8192.0f, fmaxf(0.0f, (dsp->fConst2 - dsp->fConst9))); dsp->fConst11 = (0.0500000007f / dsp->fConst0); dsp->fConst12 = (7.0f / dsp->fConst0); dsp->fConst13 = expf((0.0f - (5.0f / dsp->fConst0))); dsp->fConst14 = expf((0.0f - (0.5f / dsp->fConst0))); dsp->fConst15 = (0.100000001f * dsp->fConst0); dsp->fConst16 = (10.0f / dsp->fConst0); dsp->fConst17 = (6.28318548f / dsp->fConst0); dsp->fConst18 = (0.159154937f * dsp->fConst0); dsp->fConst19 = (1.0f / Piano_faustpower2_f(dsp->fConst0)); dsp->fConst20 = (2.0f / dsp->fConst0); dsp->iConst21 = (int)fminf(8192.0f, fmaxf(0.0f, (0.0199999996f * dsp->fConst0))); dsp->iConst22 = (int)fminf(1024.0f, fmaxf(0.0f, (dsp->fConst9 + -1.0f))); dsp->fConst23 = floorf(((0.174713001f * dsp->fConst0) + 0.5f)); dsp->fConst24 = ((0.0f - (6.90775537f * dsp->fConst23)) / dsp->fConst0); dsp->fConst25 = (0.5f * dsp->fConst24); dsp->fConst26 = (0.333333343f * dsp->fConst24); dsp->fConst27 = floorf(((0.0229039993f * dsp->fConst0) + 0.5f)); dsp->iConst28 = (int)fminf(8192.0f, fmaxf(0.0f, (dsp->fConst23 - dsp->fConst27))); dsp->iConst29 = (int)fminf(2048.0f, fmaxf(0.0f, (dsp->fConst27 + -1.0f))); dsp->fConst30 = floorf(((0.219990999f * dsp->fConst0) + 0.5f)); dsp->fConst31 = ((0.0f - (6.90775537f * dsp->fConst30)) / dsp->fConst0); dsp->fConst32 = (0.5f * dsp->fConst31); dsp->fConst33 = (0.333333343f * dsp->fConst31); dsp->fConst34 = floorf(((0.0191229992f * dsp->fConst0) + 0.5f)); dsp->iConst35 = (int)fminf(16384.0f, fmaxf(0.0f, (dsp->fConst30 - dsp->fConst34))); dsp->fConst36 = (0.5f * dsp->fConst0); dsp->iConst37 = (int)fminf(1024.0f, fmaxf(0.0f, (dsp->fConst34 + -1.0f))); dsp->fConst38 = floorf(((0.256891012f * dsp->fConst0) + 0.5f)); dsp->fConst39 = ((0.0f - (6.90775537f * dsp->fConst38)) / dsp->fConst0); dsp->fConst40 = (0.5f * dsp->fConst39); dsp->fConst41 = (0.333333343f * dsp->fConst39); dsp->fConst42 = floorf(((0.0273330007f * dsp->fConst0) + 0.5f)); dsp->iConst43 = (int)fminf(16384.0f, fmaxf(0.0f, (dsp->fConst38 - dsp->fConst42))); dsp->iConst44 = (int)fminf(2048.0f, fmaxf(0.0f, (dsp->fConst42 + -1.0f))); dsp->fConst45 = floorf(((0.210389003f * dsp->fConst0) + 0.5f)); dsp->fConst46 = ((0.0f - (6.90775537f * dsp->fConst45)) / dsp->fConst0); dsp->fConst47 = (0.5f * dsp->fConst46); dsp->fConst48 = (0.333333343f * dsp->fConst46); dsp->fConst49 = floorf(((0.0244210009f * dsp->fConst0) + 0.5f)); dsp->iConst50 = (int)fminf(16384.0f, fmaxf(0.0f, (dsp->fConst45 - dsp->fConst49))); dsp->iConst51 = (int)fminf(2048.0f, fmaxf(0.0f, (dsp->fConst49 + -1.0f))); dsp->fConst52 = floorf(((0.153128996f * dsp->fConst0) + 0.5f)); dsp->fConst53 = ((0.0f - (6.90775537f * dsp->fConst52)) / dsp->fConst0); dsp->fConst54 = (0.5f * dsp->fConst53); dsp->fConst55 = (0.333333343f * dsp->fConst53); dsp->fConst56 = floorf(((0.0203460008f * dsp->fConst0) + 0.5f)); dsp->iConst57 = (int)fminf(8192.0f, fmaxf(0.0f, (dsp->fConst52 - dsp->fConst56))); dsp->iConst58 = (int)fminf(1024.0f, fmaxf(0.0f, (dsp->fConst56 + -1.0f))); dsp->fConst59 = floorf(((0.127837002f * dsp->fConst0) + 0.5f)); dsp->fConst60 = ((0.0f - (6.90775537f * dsp->fConst59)) / dsp->fConst0); dsp->fConst61 = (0.5f * dsp->fConst60); dsp->fConst62 = (0.333333343f * dsp->fConst60); dsp->fConst63 = floorf(((0.0316039994f * dsp->fConst0) + 0.5f)); dsp->iConst64 = (int)fminf(8192.0f, fmaxf(0.0f, (dsp->fConst59 - dsp->fConst63))); dsp->iConst65 = (int)fminf(2048.0f, fmaxf(0.0f, (dsp->fConst63 + -1.0f))); dsp->fConst66 = floorf(((0.192303002f * dsp->fConst0) + 0.5f)); dsp->fConst67 = ((0.0f - (6.90775537f * dsp->fConst66)) / dsp->fConst0); dsp->fConst68 = (0.5f * dsp->fConst67); dsp->fConst69 = (0.333333343f * dsp->fConst67); dsp->fConst70 = floorf(((0.0292910002f * dsp->fConst0) + 0.5f)); dsp->iConst71 = (int)fminf(8192.0f, fmaxf(0.0f, (dsp->fConst66 - dsp->fConst70))); dsp->iConst72 = (int)fminf(2048.0f, fmaxf(0.0f, (dsp->fConst70 + -1.0f))); } void instanceInitPiano(Piano* dsp, int sample_rate) { USED(sample_rate); USED(dsp); instanceConstantsPiano(dsp, sample_rate); instanceResetUserInterfacePiano(dsp); instanceClearPiano(dsp); } void initPiano(Piano* dsp, int sample_rate) { USED(sample_rate); USED(dsp); classInitPiano(sample_rate); instanceInitPiano(dsp, sample_rate); } void buildUserInterfacePiano(Piano* dsp, UIGlue* ui_interface) { USED(dsp); ui_interface->openVerticalBox(ui_interface->uiInterface, "Piano"); ui_interface->openHorizontalBox(ui_interface->uiInterface, "Basic"); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider3, "1", ""); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider3, "tooltip", "Tone frequency"); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider3, "unit", "Hz"); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "Freq", &dsp->fHslider3, 440.0f, 20.0f, 20000.0f, 1.0f); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider5, "1", ""); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider5, "tooltip", "Gain (value between 0 and 1)"); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "Gain", &dsp->fHslider5, 1.0f, 0.0f, 1.0f, 0.00999999978f); ui_interface->declare(ui_interface->uiInterface, &dsp->fButton0, "1", ""); ui_interface->declare(ui_interface->uiInterface, &dsp->fButton0, "tooltip", "noteOn = 1, noteOff = 0"); ui_interface->addButton(ui_interface->uiInterface, "Gate", &dsp->fButton0); ui_interface->closeBox(ui_interface->uiInterface); ui_interface->openVerticalBox(ui_interface->uiInterface, "Physical"); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider4, "2", ""); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider4, "tooltip", "A value between 0 and 1"); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "Brightness Factor", &dsp->fHslider4, 0.0f, 0.0f, 1.0f, 0.00999999978f); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider8, "2", ""); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider8, "tooltip", "A value between 0 and 1"); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "Detuning Factor", &dsp->fHslider8, 0.100000001f, 0.0f, 1.0f, 0.00999999978f); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider6, "2", ""); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider6, "tooltip", "A value between 0 and 1"); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "Hammer Hardness", &dsp->fHslider6, 0.100000001f, 0.0f, 1.0f, 0.00999999978f); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider7, "2", ""); ui_interface->declare(ui_interface->uiInterface, &dsp->fHslider7, "tooltip", "A value between 0 and 1"); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "Stiffness Factor", &dsp->fHslider7, 0.280000001f, 0.0f, 1.0f, 0.00999999978f); ui_interface->closeBox(ui_interface->uiInterface); ui_interface->openVerticalBox(ui_interface->uiInterface, "Reverb"); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "reverbGain", &dsp->fHslider2, 0.136999995f, 0.0f, 1.0f, 0.00999999978f); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "roomSize", &dsp->fHslider0, 0.720000029f, 0.00999999978f, 2.0f, 0.00999999978f); ui_interface->closeBox(ui_interface->uiInterface); ui_interface->openVerticalBox(ui_interface->uiInterface, "Spat"); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "pan angle", &dsp->fHslider1, 0.600000024f, 0.0f, 1.0f, 0.00999999978f); ui_interface->addHorizontalSlider(ui_interface->uiInterface, "spatial width", &dsp->fHslider9, 0.5f, 0.0f, 1.0f, 0.00999999978f); ui_interface->closeBox(ui_interface->uiInterface); ui_interface->closeBox(ui_interface->uiInterface); } void computePiano(Piano* dsp, int count, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) { USED(inputs); USED(dsp); FAUSTFLOAT* output0 = outputs[0]; FAUSTFLOAT* output1 = outputs[1]; float fSlow0 = (float)dsp->fHslider0; float fSlow1 = expf((dsp->fConst4 / fSlow0)); float fSlow2 = Piano_faustpower2_f(fSlow1); float fSlow3 = (1.0f - (dsp->fConst1 * fSlow2)); float fSlow4 = (1.0f - fSlow2); float fSlow5 = (fSlow3 / fSlow4); float fSlow6 = sqrtf(fmaxf(0.0f, ((Piano_faustpower2_f(fSlow3) / Piano_faustpower2_f(fSlow4)) + -1.0f))); float fSlow7 = (fSlow5 - fSlow6); float fSlow8 = (fSlow1 * (fSlow6 + (1.0f - fSlow5))); float fSlow9 = ((expf((dsp->fConst5 / fSlow0)) / fSlow1) + -1.0f); float fSlow10 = (float)dsp->fHslider1; float fSlow11 = (12.0f * (1.0f - fSlow10)); float fSlow12 = (0.00100000005f * (float)dsp->fHslider2); float fSlow13 = (float)dsp->fHslider3; int iSlow14 = (int)((17.3123398f * (logf(fSlow13) + -6.08677483f)) + 69.5f); float fSlow15 = (float)getValueDCBa1((float)iSlow14); float fSlow16 = (1.0f - fSlow15); float fSlow17 = powf(10.0f, (0.0500000007f * (float)getValueSecondStageAmpRatio((float)iSlow14))); float fSlow18 = powf(10.0f, (dsp->fConst11 * (float)getValuer1_1db((float)iSlow14))); float fSlow19 = Piano_faustpower2_f(fSlow18); float fSlow20 = powf(10.0f, (dsp->fConst11 * (float)getValuer1_2db((float)iSlow14))); float fSlow21 = Piano_faustpower2_f(fSlow20); float fSlow22 = (1.0f - fSlow17); float fSlow23 = ((fSlow17 * fSlow19) + (fSlow21 * fSlow22)); float fSlow24 = (2.0f * (float)getValueBq4_gEarBalled((float)iSlow14)); float fSlow25 = (0.25f * (float)dsp->fHslider4); float fSlow26 = (float)getValueLoudPole((float)iSlow14); float fSlow27 = ((fSlow25 + (0.980000019f - fSlow26)) * (float)getValueLoudGain((float)iSlow14)); float fSlow28 = (0.5f * fSlow16); float fSlow29 = (float)(iSlow14 >= 88); float fSlow30 = (2.32830644e-10f * fSlow29); float fSlow31 = (float)dsp->fButton0; int iSlow32 = (fSlow31 > 0.0f); float fSlow33 = expf((0.0f - (dsp->fConst12 / ((float)dsp->fHslider5 * (float)getValueDryTapAmpT60((float)iSlow14))))); int iSlow34 = (fSlow31 < 1.0f); float fSlow35 = (0.0f - (fSlow31 + -1.0f)); float fSlow36 = (dsp->fConst13 * fSlow35); float fSlow37 = (float)dsp->fHslider6; float fSlow38 = (dsp->fConst15 * fSlow37); float fSlow39 = expf((0.0f - (dsp->fConst16 / fSlow37))); float fSlow40 = (0.200000003f * (float)getValueSustainPedalLevel((float)iSlow14)); float fSlow41 = (1.16415322e-10f * fSlow29); float fSlow42 = (0.0f - fSlow28); float fSlow43 = (fSlow26 + (0.0199999996f - fSlow25)); float fSlow44 = powf(10.0f, (dsp->fConst11 * (float)getValuer3db((float)iSlow14))); float fSlow45 = (cosf((dsp->fConst17 * (fSlow13 * (float)getValueThirdPartialFactor((float)iSlow14)))) * (0.0f - (2.0f * fSlow44))); float fSlow46 = Piano_faustpower2_f(fSlow44); float fSlow47 = powf(10.0f, (dsp->fConst11 * (float)getValuer2db((float)iSlow14))); float fSlow48 = (cosf((dsp->fConst17 * (fSlow13 * (float)getValueSecondPartialFactor((float)iSlow14)))) * (0.0f - (2.0f * fSlow47))); float fSlow49 = Piano_faustpower2_f(fSlow47); float fSlow50 = cosf((dsp->fConst17 * fSlow13)); float fSlow51 = (fSlow50 * (0.0f - (2.0f * fSlow18))); float fSlow52 = (0.0f - (2.0f * ((fSlow17 * fSlow18) + (fSlow20 * fSlow22)))); float fSlow53 = (0.0f - (2.0f * fSlow20)); float fSlow54 = (float)dsp->fHslider7; float fSlow55 = (float)getValueStiffnessCoefficient((float)iSlow14); float fSlow56 = (13.6899996f * (Piano_faustpower2_f(fSlow54) * Piano_faustpower2_f(fSlow55))); float fSlow57 = (fSlow56 + -1.0f); float fSlow58 = (5.0f * ((float)dsp->fHslider8 * (float)getValueDetuningHz((float)iSlow14))); float fSlow59 = (fSlow13 + fSlow58); float fSlow60 = (dsp->fConst17 * fSlow59); float fSlow61 = sinf(fSlow60); float fSlow62 = (fSlow54 * fSlow55); float fSlow63 = (7.4000001f * fSlow62); float fSlow64 = (fSlow56 + 1.0f); float fSlow65 = cosf(fSlow60); float fSlow66 = (3.0f * atan2f((fSlow57 * fSlow61), (fSlow63 + (fSlow64 * fSlow65)))); float fSlow67 = powf(10.0f, (0.0500000007f * ((float)getValueSingleStringDecayRate((float)iSlow14) / fSlow13))); float fSlow68 = (float)getValueSingleStringZero((float)iSlow14); float fSlow69 = (float)getValueSingleStringPole((float)iSlow14); float fSlow70 = (1.0f - fSlow69); float fSlow71 = ((fSlow67 * fSlow68) * fSlow70); float fSlow72 = (1.0f - fSlow68); float fSlow73 = (fSlow69 * fSlow72); float fSlow74 = (3.0f * fSlow73); float fSlow75 = (fSlow71 - fSlow74); float fSlow76 = (fSlow73 - fSlow71); float fSlow77 = (4.0f * fSlow76); float fSlow78 = (fSlow75 + fSlow77); float fSlow79 = (fSlow67 * fSlow70); float fSlow80 = ((3.0f * fSlow72) - fSlow79); float fSlow81 = (((fSlow65 * fSlow75) / fSlow80) + 1.0f); float fSlow82 = ((fSlow68 + fSlow79) + -1.0f); float fSlow83 = (4.0f * fSlow82); float fSlow84 = (((fSlow83 + (fSlow65 * fSlow78)) / fSlow80) + 1.0f); float fSlow85 = (Piano_faustpower2_f(fSlow61) * fSlow75); float fSlow86 = Piano_faustpower2_f(fSlow80); float fSlow87 = (dsp->fConst18 * (((fSlow66 + atan2f((((0.0f - ((fSlow61 * fSlow78) / fSlow80)) * fSlow81) + (((fSlow61 * fSlow75) * fSlow84) / fSlow80)), ((fSlow81 * fSlow84) + ((fSlow85 * fSlow78) / fSlow86)))) + 6.28318548f) / fSlow59)); float fSlow88 = floorf(fSlow87); float fSlow89 = (fSlow88 + (1.0f - fSlow87)); float fSlow90 = (0.00100000005f * ((0.999599993f * fSlow31) + (0.899999976f * (fSlow35 * (float)getValueReleaseLoopGain((float)iSlow14))))); float fSlow91 = (1.39698386e-09f * (fSlow27 * (float)(iSlow14 < 88))); float fSlow92 = (3.70000005f * fSlow62); float fSlow93 = ((fSlow71 + fSlow77) - fSlow74); float fSlow94 = (((fSlow83 + (fSlow65 * fSlow93)) / fSlow80) + 1.0f); int iSlow95 = (int)(dsp->fConst18 * (((fSlow66 + atan2f(((fSlow61 * ((fSlow75 * fSlow94) - (fSlow93 * fSlow81))) / fSlow80), ((fSlow81 * fSlow94) + ((fSlow85 * fSlow93) / fSlow86)))) + 6.28318548f) / fSlow59)); int iSlow96 = min(4097, max(0, iSlow95)); float fSlow97 = (1.0f / fSlow80); float fSlow98 = (fSlow13 - fSlow58); float fSlow99 = (dsp->fConst17 * fSlow98); float fSlow100 = sinf(fSlow99); float fSlow101 = cosf(fSlow99); float fSlow102 = (3.0f * atan2f((fSlow57 * fSlow100), (fSlow63 + (fSlow64 * fSlow101)))); float fSlow103 = (((fSlow101 * fSlow75) / fSlow80) + 1.0f); float fSlow104 = ((((fSlow101 * fSlow78) + fSlow83) / fSlow80) + 1.0f); float fSlow105 = (Piano_faustpower2_f(fSlow100) * fSlow75); float fSlow106 = (dsp->fConst18 * (((fSlow102 + atan2f((((0.0f - ((fSlow100 * fSlow78) / fSlow80)) * fSlow103) + (((fSlow100 * fSlow75) * fSlow104) / fSlow80)), ((fSlow103 * fSlow104) + ((fSlow105 * fSlow78) / fSlow86)))) + 6.28318548f) / fSlow98)); float fSlow107 = floorf(fSlow106); float fSlow108 = (fSlow107 + (1.0f - fSlow106)); float fSlow109 = (((fSlow83 + (fSlow101 * fSlow93)) / fSlow80) + 1.0f); int iSlow110 = (int)(dsp->fConst18 * (((fSlow102 + atan2f((0.0f - ((fSlow100 * ((fSlow103 * fSlow93) - (fSlow75 * fSlow109))) / fSlow80)), ((fSlow103 * fSlow109) + ((fSlow105 * fSlow93) / fSlow86)))) + 6.28318548f) / fSlow98)); int iSlow111 = min(4097, max(0, iSlow110)); float fSlow112 = (fSlow106 - fSlow107); int iSlow113 = min(4097, max(0, (iSlow110 + 1))); float fSlow114 = (fSlow87 - fSlow88); int iSlow115 = min(4097, max(0, (iSlow95 + 1))); float fSlow116 = (float)getValueEQBandWidthFactor((float)iSlow14); float fSlow117 = (dsp->fConst19 * (Piano_faustpower2_f(fSlow13) * Piano_faustpower2_f(fSlow116))); float fSlow118 = (0.0f - (0.5f * (fSlow117 + -1.0f))); float fSlow119 = (float)getValueEQGain((float)iSlow14); float fSlow120 = ((0.0f - (dsp->fConst20 * (fSlow13 * fSlow116))) * cosf((dsp->fConst17 * (fSlow13 / (float)getValueStrikePosition((float)iSlow14))))); float fSlow121 = expf((dsp->fConst25 / fSlow0)); float fSlow122 = Piano_faustpower2_f(fSlow121); float fSlow123 = (1.0f - (dsp->fConst1 * fSlow122)); float fSlow124 = (1.0f - fSlow122); float fSlow125 = (fSlow123 / fSlow124); float fSlow126 = sqrtf(fmaxf(0.0f, ((Piano_faustpower2_f(fSlow123) / Piano_faustpower2_f(fSlow124)) + -1.0f))); float fSlow127 = (fSlow125 - fSlow126); float fSlow128 = (fSlow121 * (fSlow126 + (1.0f - fSlow125))); float fSlow129 = ((expf((dsp->fConst26 / fSlow0)) / fSlow121) + -1.0f); float fSlow130 = expf((dsp->fConst32 / fSlow0)); float fSlow131 = Piano_faustpower2_f(fSlow130); float fSlow132 = (1.0f - (dsp->fConst1 * fSlow131)); float fSlow133 = (1.0f - fSlow131); float fSlow134 = (fSlow132 / fSlow133); float fSlow135 = sqrtf(fmaxf(0.0f, ((Piano_faustpower2_f(fSlow132) / Piano_faustpower2_f(fSlow133)) + -1.0f))); float fSlow136 = (fSlow134 - fSlow135); float fSlow137 = (fSlow130 * (fSlow135 + (1.0f - fSlow134))); float fSlow138 = ((expf((dsp->fConst33 / fSlow0)) / fSlow130) + -1.0f); float fSlow139 = (12.0f * fSlow10); int iSlow140 = (int)fminf(4096.0f, fmaxf(0.0f, (dsp->fConst36 * ((float)dsp->fHslider9 / fSlow13)))); float fSlow141 = expf((dsp->fConst40 / fSlow0)); float fSlow142 = Piano_faustpower2_f(fSlow141); float fSlow143 = (1.0f - (dsp->fConst1 * fSlow142)); float fSlow144 = (1.0f - fSlow142); float fSlow145 = (fSlow143 / fSlow144); float fSlow146 = sqrtf(fmaxf(0.0f, ((Piano_faustpower2_f(fSlow143) / Piano_faustpower2_f(fSlow144)) + -1.0f))); float fSlow147 = (fSlow145 - fSlow146); float fSlow148 = (fSlow141 * (fSlow146 + (1.0f - fSlow145))); float fSlow149 = ((expf((dsp->fConst41 / fSlow0)) / fSlow141) + -1.0f); float fSlow150 = expf((dsp->fConst47 / fSlow0)); float fSlow151 = Piano_faustpower2_f(fSlow150); float fSlow152 = (1.0f - (dsp->fConst1 * fSlow151)); float fSlow153 = (1.0f - fSlow151); float fSlow154 = (fSlow152 / fSlow153); float fSlow155 = sqrtf(fmaxf(0.0f, ((Piano_faustpower2_f(fSlow152) / Piano_faustpower2_f(fSlow153)) + -1.0f))); float fSlow156 = (fSlow154 - fSlow155); float fSlow157 = (fSlow150 * (fSlow155 + (1.0f - fSlow154))); float fSlow158 = ((expf((dsp->fConst48 / fSlow0)) / fSlow150) + -1.0f); float fSlow159 = expf((dsp->fConst54 / fSlow0)); float fSlow160 = Piano_faustpower2_f(fSlow159); float fSlow161 = (1.0f - (dsp->fConst1 * fSlow160)); float fSlow162 = (1.0f - fSlow160); float fSlow163 = (fSlow161 / fSlow162); float fSlow164 = sqrtf(fmaxf(0.0f, ((Piano_faustpower2_f(fSlow161) / Piano_faustpower2_f(fSlow162)) + -1.0f))); float fSlow165 = (fSlow163 - fSlow164); float fSlow166 = (fSlow159 * (fSlow164 + (1.0f - fSlow163))); float fSlow167 = ((expf((dsp->fConst55 / fSlow0)) / fSlow159) + -1.0f); float fSlow168 = expf((dsp->fConst61 / fSlow0)); float fSlow169 = Piano_faustpower2_f(fSlow168); float fSlow170 = (1.0f - (dsp->fConst1 * fSlow169)); float fSlow171 = (1.0f - fSlow169); float fSlow172 = (fSlow170 / fSlow171); float fSlow173 = sqrtf(fmaxf(0.0f, ((Piano_faustpower2_f(fSlow170) / Piano_faustpower2_f(fSlow171)) + -1.0f))); float fSlow174 = (fSlow172 - fSlow173); float fSlow175 = (fSlow168 * (fSlow173 + (1.0f - fSlow172))); float fSlow176 = ((expf((dsp->fConst62 / fSlow0)) / fSlow168) + -1.0f); float fSlow177 = expf((dsp->fConst68 / fSlow0)); float fSlow178 = Piano_faustpower2_f(fSlow177); float fSlow179 = (1.0f - (dsp->fConst1 * fSlow178)); float fSlow180 = (1.0f - fSlow178); float fSlow181 = (fSlow179 / fSlow180); float fSlow182 = sqrtf(fmaxf(0.0f, ((Piano_faustpower2_f(fSlow179) / Piano_faustpower2_f(fSlow180)) + -1.0f))); float fSlow183 = (fSlow181 - fSlow182); float fSlow184 = (fSlow177 * (fSlow182 + (1.0f - fSlow181))); float fSlow185 = ((expf((dsp->fConst69 / fSlow0)) / fSlow177) + -1.0f); /* C99 loop */ { int i; for (i = 0; (i < count); i = (i + 1)) { dsp->fRec11[0] = (0.0f - (dsp->fConst7 * ((dsp->fConst8 * dsp->fRec11[1]) - (dsp->fRec6[1] + dsp->fRec6[2])))); dsp->fRec10[0] = ((fSlow7 * dsp->fRec10[1]) + (fSlow8 * (dsp->fRec6[1] + (fSlow9 * dsp->fRec11[0])))); dsp->fVec0[(dsp->IOTA & 16383)] = ((0.353553385f * dsp->fRec10[0]) + 9.99999968e-21f); dsp->fRec12[0] = (fSlow12 + (0.999000013f * dsp->fRec12[1])); dsp->iRec23[0] = ((1103515245 * dsp->iRec23[1]) + 12345); dsp->fRec25[0] = ((fSlow31 * dsp->fRec25[1]) + 1.0f); float fTemp0 = (dsp->fRec25[0] + -1.0f); float fTemp1 = (float)((fTemp0 < 2.0f) & iSlow32); float fTemp2 = ((0.0301973838f * fTemp1) + (fSlow33 * (float)((fTemp0 >= 2.0f) | iSlow34))); dsp->fRec24[0] = ((dsp->fRec24[1] * fTemp2) + (0.150000006f * (fTemp1 * (1.0f - fTemp2)))); int iTemp3 = (fTemp0 < fSlow38); float fTemp4 = (fSlow31 * ((dsp->fConst14 * (float)(fTemp0 >= fSlow38)) + (fSlow39 * (float)iTemp3))); dsp->fRec26[0] = ((dsp->fRec26[1] * (fSlow36 + fTemp4)) + (fSlow40 * (((1.0f - fTemp4) - fSlow36) * (float)(iTemp3 & iSlow32)))); float fTemp5 = ((float)dsp->iRec23[0] * (dsp->fRec24[0] + dsp->fRec26[0])); dsp->fVec1[0] = (fSlow30 * fTemp5); float fTemp6 = (0.0f - ((0.5f * dsp->fVec1[1]) + (fSlow41 * fTemp5))); dsp->fVec2[0] = fTemp6; dsp->fRec22[0] = (((fSlow28 * fTemp6) + (fSlow42 * dsp->fVec2[1])) - (fSlow15 * dsp->fRec22[1])); dsp->fRec21[0] = ((fSlow27 * dsp->fRec22[0]) + (fSlow43 * dsp->fRec21[1])); dsp->fRec20[0] = ((fSlow27 * dsp->fRec21[0]) + (fSlow43 * dsp->fRec20[1])); dsp->fRec19[0] = ((fSlow27 * dsp->fRec20[0]) + (fSlow43 * dsp->fRec19[1])); dsp->fRec18[0] = ((fSlow27 * dsp->fRec19[0]) + (fSlow43 * dsp->fRec18[1])); dsp->fRec17[0] = ((fSlow24 * (0.0f - (0.5f * (dsp->fRec18[1] - dsp->fRec18[0])))) - ((fSlow45 * dsp->fRec17[1]) + (fSlow46 * dsp->fRec17[2]))); dsp->fRec16[0] = ((fSlow24 * dsp->fRec17[0]) - ((fSlow48 * dsp->fRec16[1]) + (fSlow49 * dsp->fRec16[2]))); dsp->fRec15[0] = (dsp->fRec16[0] - ((fSlow51 * dsp->fRec15[1]) + (fSlow19 * dsp->fRec15[2]))); dsp->fRec14[0] = (((fSlow23 * dsp->fRec15[2]) + (dsp->fRec15[0] + (fSlow50 * ((fSlow52 * dsp->fRec15[1]) - (fSlow53 * dsp->fRec14[1]))))) - (fSlow21 * dsp->fRec14[2])); dsp->fRec13[0] = ((fSlow16 * dsp->fRec14[0]) - (fSlow15 * dsp->fRec13[1])); dsp->fRec33[0] = (fSlow90 + (0.999000013f * dsp->fRec33[1])); dsp->fRec38[0] = ((fSlow91 * fTemp5) + (fSlow43 * dsp->fRec38[1])); dsp->fRec37[0] = ((fSlow27 * dsp->fRec38[0]) + (fSlow43 * dsp->fRec37[1])); dsp->fRec36[0] = ((fSlow27 * dsp->fRec37[0]) + (fSlow43 * dsp->fRec36[1])); dsp->fRec35[0] = ((fSlow27 * dsp->fRec36[0]) + (fSlow43 * dsp->fRec35[1])); dsp->fRec34[0] = (((fSlow28 * dsp->fRec35[0]) + (fSlow42 * dsp->fRec35[1])) - (fSlow15 * dsp->fRec34[1])); float fTemp7 = (dsp->fRec33[0] * (dsp->fRec34[0] + dsp->fRec27[1])); dsp->fVec3[0] = fTemp7; dsp->fRec32[0] = (dsp->fVec3[1] - (fSlow92 * (dsp->fRec32[1] - fTemp7))); dsp->fRec31[0] = (dsp->fRec32[1] + (fSlow92 * (dsp->fRec32[0] - dsp->fRec31[1]))); dsp->fRec30[(dsp->IOTA & 8191)] = (dsp->fRec31[1] + (fSlow92 * (dsp->fRec31[0] - dsp->fRec30[((dsp->IOTA - 1) & 8191)]))); float fTemp8 = (fSlow89 * dsp->fRec30[((dsp->IOTA - iSlow96) & 8191)]); float fTemp9 = (dsp->fRec34[0] + (dsp->fRec33[0] * dsp->fRec28[1])); dsp->fVec4[0] = fTemp9; dsp->fRec42[0] = (dsp->fVec4[1] + (fSlow92 * (fTemp9 - dsp->fRec42[1]))); dsp->fRec41[0] = (dsp->fRec42[1] + (fSlow92 * (dsp->fRec42[0] - dsp->fRec41[1]))); dsp->fRec40[(dsp->IOTA & 8191)] = (dsp->fRec41[1] + (fSlow92 * (dsp->fRec41[0] - dsp->fRec40[((dsp->IOTA - 1) & 8191)]))); float fTemp10 = ((fSlow108 * dsp->fRec40[((dsp->IOTA - iSlow111) & 8191)]) + (fSlow112 * dsp->fRec40[((dsp->IOTA - iSlow113) & 8191)])); float fTemp11 = (fSlow114 * dsp->fRec30[((dsp->IOTA - iSlow115) & 8191)]); float fTemp12 = (fTemp8 + (fTemp10 + fTemp11)); dsp->fVec5[0] = fTemp12; dsp->fRec39[0] = (fSlow97 * ((2.0f * ((fSlow76 * dsp->fVec5[1]) + (fSlow82 * fTemp12))) - (fSlow75 * dsp->fRec39[1]))); dsp->fRec27[0] = (fTemp8 + (dsp->fRec39[0] + fTemp11)); dsp->fRec28[0] = (dsp->fRec39[0] + fTemp10); float fRec29 = fTemp12; dsp->fRec43[0] = ((fSlow119 * fRec29) - ((fSlow120 * dsp->fRec43[1]) + (fSlow117 * dsp->fRec43[2]))); float fTemp13 = (dsp->fRec13[0] + (fRec29 + (fSlow118 * (dsp->fRec43[0] - dsp->fRec43[2])))); dsp->fVec6[(dsp->IOTA & 8191)] = fTemp13; dsp->fVec7[(dsp->IOTA & 4095)] = (fSlow11 * (dsp->fRec12[0] * fTemp13)); float fTemp14 = (0.300000012f * dsp->fVec7[((dsp->IOTA - dsp->iConst21) & 4095)]); float fTemp15 = (dsp->fVec0[((dsp->IOTA - dsp->iConst10) & 16383)] - (fTemp14 + (0.600000024f * dsp->fRec8[1]))); dsp->fVec8[(dsp->IOTA & 2047)] = fTemp15; dsp->fRec8[0] = dsp->fVec8[((dsp->IOTA - dsp->iConst22) & 2047)]; float fRec9 = (0.600000024f * fTemp15); dsp->fRec47[0] = (dsp->fConst7 * ((dsp->fRec4[1] + dsp->fRec4[2]) - (dsp->fConst8 * dsp->fRec47[1]))); dsp->fRec46[0] = ((fSlow127 * dsp->fRec46[1]) + (fSlow128 * (dsp->fRec4[1] + (fSlow129 * dsp->fRec47[0])))); dsp->fVec9[(dsp->IOTA & 16383)] = ((0.353553385f * dsp->fRec46[0]) + 9.99999968e-21f); float fTemp16 = ((fTemp14 + dsp->fVec9[((dsp->IOTA - dsp->iConst28) & 16383)]) - (0.600000024f * dsp->fRec44[1])); dsp->fVec10[(dsp->IOTA & 4095)] = fTemp16; dsp->fRec44[0] = dsp->fVec10[((dsp->IOTA - dsp->iConst29) & 4095)]; float fRec45 = (0.600000024f * fTemp16); dsp->fRec51[0] = (dsp->fConst7 * ((dsp->fRec7[1] + dsp->fRec7[2]) - (dsp->fConst8 * dsp->fRec51[1]))); dsp->fRec50[0] = ((fSlow136 * dsp->fRec50[1]) + (fSlow137 * (dsp->fRec7[1] + (fSlow138 * dsp->fRec51[0])))); dsp->fVec11[(dsp->IOTA & 32767)] = ((0.353553385f * dsp->fRec50[0]) + 9.99999968e-21f); float fTemp17 = dsp->fVec6[((dsp->IOTA - iSlow140) & 8191)]; dsp->fVec12[(dsp->IOTA & 4095)] = (fSlow139 * (dsp->fRec12[0] * fTemp17)); float fTemp18 = (0.300000012f * dsp->fVec12[((dsp->IOTA - dsp->iConst21) & 4095)]); float fTemp19 = (((0.600000024f * dsp->fRec48[1]) + dsp->fVec11[((dsp->IOTA - dsp->iConst35) & 32767)]) - fTemp18); dsp->fVec13[(dsp->IOTA & 2047)] = fTemp19; dsp->fRec48[0] = dsp->fVec13[((dsp->IOTA - dsp->iConst37) & 2047)]; float fRec49 = (0.0f - (0.600000024f * fTemp19)); dsp->fRec55[0] = (0.0f - (dsp->fConst7 * ((dsp->fConst8 * dsp->fRec55[1]) - (dsp->fRec3[1] + dsp->fRec3[2])))); dsp->fRec54[0] = ((fSlow147 * dsp->fRec54[1]) + (fSlow148 * (dsp->fRec3[1] + (fSlow149 * dsp->fRec55[0])))); dsp->fVec14[(dsp->IOTA & 32767)] = ((0.353553385f * dsp->fRec54[0]) + 9.99999968e-21f); float fTemp20 = (((0.600000024f * dsp->fRec52[1]) + dsp->fVec14[((dsp->IOTA - dsp->iConst43) & 32767)]) - fTemp18); dsp->fVec15[(dsp->IOTA & 4095)] = fTemp20; dsp->fRec52[0] = dsp->fVec15[((dsp->IOTA - dsp->iConst44) & 4095)]; float fRec53 = (0.0f - (0.600000024f * fTemp20)); dsp->fRec59[0] = (0.0f - (dsp->fConst7 * ((dsp->fConst8 * dsp->fRec59[1]) - (dsp->fRec1[1] + dsp->fRec1[2])))); dsp->fRec58[0] = ((fSlow156 * dsp->fRec58[1]) + (fSlow157 * (dsp->fRec1[1] + (fSlow158 * dsp->fRec59[0])))); dsp->fVec16[(dsp->IOTA & 32767)] = ((0.353553385f * dsp->fRec58[0]) + 9.99999968e-21f); float fTemp21 = ((0.600000024f * dsp->fRec56[1]) + (dsp->fVec16[((dsp->IOTA - dsp->iConst50) & 32767)] + fTemp18)); dsp->fVec17[(dsp->IOTA & 4095)] = fTemp21; dsp->fRec56[0] = dsp->fVec17[((dsp->IOTA - dsp->iConst51) & 4095)]; float fRec57 = (0.0f - (0.600000024f * fTemp21)); dsp->fRec63[0] = (0.0f - (dsp->fConst7 * ((dsp->fConst8 * dsp->fRec63[1]) - (dsp->fRec0[1] + dsp->fRec0[2])))); dsp->fRec62[0] = ((fSlow165 * dsp->fRec62[1]) + (fSlow166 * (dsp->fRec0[1] + (fSlow167 * dsp->fRec63[0])))); dsp->fVec18[(dsp->IOTA & 16383)] = ((0.353553385f * dsp->fRec62[0]) + 9.99999968e-21f); float fTemp22 = ((dsp->fVec18[((dsp->IOTA - dsp->iConst57) & 16383)] + fTemp14) - (0.600000024f * dsp->fRec60[1])); dsp->fVec19[(dsp->IOTA & 2047)] = fTemp22; dsp->fRec60[0] = dsp->fVec19[((dsp->IOTA - dsp->iConst58) & 2047)]; float fRec61 = (0.600000024f * fTemp22); dsp->fRec67[0] = (0.0f - (dsp->fConst7 * ((dsp->fConst8 * dsp->fRec67[1]) - (dsp->fRec2[1] + dsp->fRec2[2])))); dsp->fRec66[0] = ((fSlow174 * dsp->fRec66[1]) + (fSlow175 * (dsp->fRec2[1] + (fSlow176 * dsp->fRec67[0])))); dsp->fVec20[(dsp->IOTA & 16383)] = ((0.353553385f * dsp->fRec66[0]) + 9.99999968e-21f); float fTemp23 = (dsp->fVec20[((dsp->IOTA - dsp->iConst64) & 16383)] - (fTemp14 + (0.600000024f * dsp->fRec64[1]))); dsp->fVec21[(dsp->IOTA & 4095)] = fTemp23; dsp->fRec64[0] = dsp->fVec21[((dsp->IOTA - dsp->iConst65) & 4095)]; float fRec65 = (0.600000024f * fTemp23); dsp->fRec71[0] = (dsp->fConst7 * ((dsp->fRec5[1] + dsp->fRec5[2]) - (dsp->fConst8 * dsp->fRec71[1]))); dsp->fRec70[0] = ((fSlow183 * dsp->fRec70[1]) + (fSlow184 * (dsp->fRec5[1] + (fSlow185 * dsp->fRec71[0])))); dsp->fVec22[(dsp->IOTA & 16383)] = ((0.353553385f * dsp->fRec70[0]) + 9.99999968e-21f); float fTemp24 = (dsp->fVec22[((dsp->IOTA - dsp->iConst71) & 16383)] + (fTemp18 + (0.600000024f * dsp->fRec68[1]))); dsp->fVec23[(dsp->IOTA & 4095)] = fTemp24; dsp->fRec68[0] = dsp->fVec23[((dsp->IOTA - dsp->iConst72) & 4095)]; float fRec69 = (0.0f - (0.600000024f * fTemp24)); float fTemp25 = (fRec65 + dsp->fRec8[1]); float fTemp26 = (dsp->fRec64[1] + (dsp->fRec68[1] + (fRec57 + (fRec69 + fTemp25)))); dsp->fRec0[0] = (fRec9 + (fRec45 + (fRec49 + (dsp->fRec52[1] + (dsp->fRec56[1] + (fRec61 + (dsp->fRec60[1] + (fRec53 + (dsp->fRec48[1] + (dsp->fRec44[1] + fTemp26)))))))))); float fTemp27 = (dsp->fRec64[1] + fTemp25); float fTemp28 = (dsp->fRec68[1] + (fRec57 + fRec69)); dsp->fRec1[0] = ((fRec9 + (fRec45 + (fRec61 + (dsp->fRec60[1] + (dsp->fRec44[1] + fTemp27))))) - (fRec49 + (dsp->fRec52[1] + (dsp->fRec56[1] + (fRec53 + (fTemp28 + dsp->fRec48[1])))))); dsp->fRec2[0] = ((fRec45 + (dsp->fRec56[1] + (fRec61 + (dsp->fRec60[1] + (dsp->fRec44[1] + fTemp28))))) - (fRec9 + (fRec49 + (dsp->fRec52[1] + (fRec53 + (fTemp27 + dsp->fRec48[1])))))); dsp->fRec3[0] = ((fRec45 + (fRec49 + (dsp->fRec52[1] + (fRec61 + (dsp->fRec60[1] + (fRec53 + (dsp->fRec44[1] + dsp->fRec48[1]))))))) - (fRec9 + (dsp->fRec56[1] + fTemp26))); float fTemp29 = (dsp->fRec64[1] + (fRec65 + fRec57)); float fTemp30 = (dsp->fRec68[1] + (fRec69 + dsp->fRec8[1])); dsp->fRec4[0] = ((dsp->fRec52[1] + (dsp->fRec56[1] + (fRec61 + (dsp->fRec60[1] + (fRec53 + fTemp29))))) - (fRec9 + (fRec45 + (fRec49 + (dsp->fRec48[1] + (dsp->fRec44[1] + fTemp30)))))); float fTemp31 = (dsp->fRec64[1] + (dsp->fRec68[1] + (fRec65 + fRec69))); float fTemp32 = (fRec57 + dsp->fRec8[1]); dsp->fRec5[0] = ((fRec49 + (fRec61 + (dsp->fRec60[1] + (dsp->fRec48[1] + fTemp31)))) - (fRec9 + (fRec45 + (dsp->fRec52[1] + (dsp->fRec56[1] + (fRec53 + (dsp->fRec44[1] + fTemp32))))))); dsp->fRec6[0] = ((fRec9 + (fRec49 + (dsp->fRec56[1] + (fRec61 + (dsp->fRec60[1] + (dsp->fRec48[1] + fTemp32)))))) - (fRec45 + (dsp->fRec52[1] + (fRec53 + (dsp->fRec44[1] + fTemp31))))); dsp->fRec7[0] = ((fRec9 + (dsp->fRec52[1] + (fRec61 + (dsp->fRec60[1] + (fRec53 + fTemp30))))) - (fRec45 + (fRec49 + (dsp->fRec56[1] + (dsp->fRec48[1] + (dsp->fRec44[1] + fTemp29)))))); float fTemp33 = (1.0f - dsp->fRec12[0]); output0[i] = (FAUSTFLOAT)((0.370000005f * (dsp->fRec1[0] + dsp->fRec2[0])) + (fSlow11 * (fTemp33 * fTemp13))); output1[i] = (FAUSTFLOAT)((0.370000005f * (dsp->fRec1[0] - dsp->fRec2[0])) + (fSlow139 * (fTemp33 * fTemp17))); dsp->fRec11[1] = dsp->fRec11[0]; dsp->fRec10[1] = dsp->fRec10[0]; dsp->IOTA = (dsp->IOTA + 1); dsp->fRec12[1] = dsp->fRec12[0]; dsp->iRec23[1] = dsp->iRec23[0]; dsp->fRec25[1] = dsp->fRec25[0]; dsp->fRec24[1] = dsp->fRec24[0]; dsp->fRec26[1] = dsp->fRec26[0]; dsp->fVec1[1] = dsp->fVec1[0]; dsp->fVec2[1] = dsp->fVec2[0]; dsp->fRec22[1] = dsp->fRec22[0]; dsp->fRec21[1] = dsp->fRec21[0]; dsp->fRec20[1] = dsp->fRec20[0]; dsp->fRec19[1] = dsp->fRec19[0]; dsp->fRec18[1] = dsp->fRec18[0]; dsp->fRec17[2] = dsp->fRec17[1]; dsp->fRec17[1] = dsp->fRec17[0]; dsp->fRec16[2] = dsp->fRec16[1]; dsp->fRec16[1] = dsp->fRec16[0]; dsp->fRec15[2] = dsp->fRec15[1]; dsp->fRec15[1] = dsp->fRec15[0]; dsp->fRec14[2] = dsp->fRec14[1]; dsp->fRec14[1] = dsp->fRec14[0]; dsp->fRec13[1] = dsp->fRec13[0]; dsp->fRec33[1] = dsp->fRec33[0]; dsp->fRec38[1] = dsp->fRec38[0]; dsp->fRec37[1] = dsp->fRec37[0]; dsp->fRec36[1] = dsp->fRec36[0]; dsp->fRec35[1] = dsp->fRec35[0]; dsp->fRec34[1] = dsp->fRec34[0]; dsp->fVec3[1] = dsp->fVec3[0]; dsp->fRec32[1] = dsp->fRec32[0]; dsp->fRec31[1] = dsp->fRec31[0]; dsp->fVec4[1] = dsp->fVec4[0]; dsp->fRec42[1] = dsp->fRec42[0]; dsp->fRec41[1] = dsp->fRec41[0]; dsp->fVec5[1] = dsp->fVec5[0]; dsp->fRec39[1] = dsp->fRec39[0]; dsp->fRec27[1] = dsp->fRec27[0]; dsp->fRec28[1] = dsp->fRec28[0]; dsp->fRec43[2] = dsp->fRec43[1]; dsp->fRec43[1] = dsp->fRec43[0]; dsp->fRec8[1] = dsp->fRec8[0]; dsp->fRec47[1] = dsp->fRec47[0]; dsp->fRec46[1] = dsp->fRec46[0]; dsp->fRec44[1] = dsp->fRec44[0]; dsp->fRec51[1] = dsp->fRec51[0]; dsp->fRec50[1] = dsp->fRec50[0]; dsp->fRec48[1] = dsp->fRec48[0]; dsp->fRec55[1] = dsp->fRec55[0]; dsp->fRec54[1] = dsp->fRec54[0]; dsp->fRec52[1] = dsp->fRec52[0]; dsp->fRec59[1] = dsp->fRec59[0]; dsp->fRec58[1] = dsp->fRec58[0]; dsp->fRec56[1] = dsp->fRec56[0]; dsp->fRec63[1] = dsp->fRec63[0]; dsp->fRec62[1] = dsp->fRec62[0]; dsp->fRec60[1] = dsp->fRec60[0]; dsp->fRec67[1] = dsp->fRec67[0]; dsp->fRec66[1] = dsp->fRec66[0]; dsp->fRec64[1] = dsp->fRec64[0]; dsp->fRec71[1] = dsp->fRec71[0]; dsp->fRec70[1] = dsp->fRec70[0]; dsp->fRec68[1] = dsp->fRec68[0]; dsp->fRec0[2] = dsp->fRec0[1]; dsp->fRec0[1] = dsp->fRec0[0]; dsp->fRec1[2] = dsp->fRec1[1]; dsp->fRec1[1] = dsp->fRec1[0]; dsp->fRec2[2] = dsp->fRec2[1]; dsp->fRec2[1] = dsp->fRec2[0]; dsp->fRec3[2] = dsp->fRec3[1]; dsp->fRec3[1] = dsp->fRec3[0]; dsp->fRec4[2] = dsp->fRec4[1]; dsp->fRec4[1] = dsp->fRec4[0]; dsp->fRec5[2] = dsp->fRec5[1]; dsp->fRec5[1] = dsp->fRec5[0]; dsp->fRec6[2] = dsp->fRec6[1]; dsp->fRec6[1] = dsp->fRec6[0]; dsp->fRec7[2] = dsp->fRec7[1]; dsp->fRec7[1] = dsp->fRec7[0]; } } } #ifdef __cplusplus } #endif static Piano *clonePiano(Piano *dsp) { return memmove(newPiano(), dsp, sizeof(*dsp)); } static void *statePiano(Piano *dsp, int *sz) { *sz = sizeof(*dsp); return dsp; } #define DSP Piano #include "dspf.h" static DSPf dspf = { .new = newPiano, .clone = clonePiano, .state = statePiano, .init = instanceInitPiano, .delete = deletePiano, .metadata = metadataPiano, .num_in = getNumInputsPiano, .num_out = getNumOutputsPiano, .clear = instanceClearPiano, .reset_ui = instanceResetUserInterfacePiano, .build_ui = buildUserInterfacePiano, .compute = computePiano, }; void * class_init(int rate) { classInitPiano(rate); return &dspf; } #endif