1 //-----------------------------------------------------
3 // Code generated with Faust 0.9.58 (http://faust.grame.fr)
4 //-----------------------------------------------------
6 #define FAUSTFLOAT float
9 typedef long double quad
;
13 #define FAUSTCLASS mydsp
16 class mydsp
: public dsp
{
20 static void metadata(Meta
* m
) {
23 virtual int getNumInputs() { return 0; }
24 virtual int getNumOutputs() { return 3; }
25 static void classInit(int samplingFreq
) {
27 virtual void instanceInit(int samplingFreq
) {
28 fSamplingFreq
= samplingFreq
;
29 for (int i
=0; i
<2; i
++) fRec0
[i
] = 0;
31 virtual void init(int samplingFreq
) {
32 classInit(samplingFreq
);
33 instanceInit(samplingFreq
);
35 virtual void buildUserInterface(UI
* interface
) {
36 interface
->openVerticalBox("untitled.18.tmp");
37 interface
->closeBox();
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
;