Initial import.
[Faustine.git] / dsp_files / vect_svg.18.tmp.cpp
1 //-----------------------------------------------------
2 //
3 // Code generated with Faust 0.9.58 (http://faust.grame.fr)
4 //-----------------------------------------------------
5 #ifndef FAUSTFLOAT
6 #define FAUSTFLOAT float
7 #endif
8
9 typedef long double quad;
10 /* link with */
11
12 #ifndef FAUSTCLASS
13 #define FAUSTCLASS mydsp
14 #endif
15
16 class mydsp : public dsp {
17 private:
18 float fRec0[2];
19 public:
20 static void metadata(Meta* m) {
21 }
22
23 virtual int getNumInputs() { return 0; }
24 virtual int getNumOutputs() { return 3; }
25 static void classInit(int samplingFreq) {
26 }
27 virtual void instanceInit(int samplingFreq) {
28 fSamplingFreq = samplingFreq;
29 for (int i=0; i<2; i++) fRec0[i] = 0;
30 }
31 virtual void init(int samplingFreq) {
32 classInit(samplingFreq);
33 instanceInit(samplingFreq);
34 }
35 virtual void buildUserInterface(UI* interface) {
36 interface->openVerticalBox("untitled.18.tmp");
37 interface->closeBox();
38 }
39 virtual void compute (int count, FAUSTFLOAT** input, FAUSTFLOAT** output) {
40 FAUSTFLOAT* output0 = output[0];
41 FAUSTFLOAT* output1 = output[1];
42 FAUSTFLOAT* output2 = output[2];
43 for (int i=0; i<count; i++) {
44 fRec0[0] = (floorf(fRec0[1]) - fRec0[1]);
45 int iTemp0 = int((40000 * fRec0[0]));
46 output0[i] = (FAUSTFLOAT)iTemp0;
47 output1[i] = (FAUSTFLOAT)iTemp0;
48 output2[i] = (FAUSTFLOAT)iTemp0;
49 // post processing
50 fRec0[1] = fRec0[0];
51 }
52 }
53 };
54
55