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
{
19 static void metadata(Meta
* m
) {
20 m
->declare("music.lib/name", "Music Library");
21 m
->declare("music.lib/author", "GRAME");
22 m
->declare("music.lib/copyright", "GRAME");
23 m
->declare("music.lib/version", "1.0");
24 m
->declare("music.lib/license", "LGPL with exception");
25 m
->declare("math.lib/name", "Math Library");
26 m
->declare("math.lib/author", "GRAME");
27 m
->declare("math.lib/copyright", "GRAME");
28 m
->declare("math.lib/version", "1.0");
29 m
->declare("math.lib/license", "LGPL with exception");
32 virtual int getNumInputs() { return 2; }
33 virtual int getNumOutputs() { return 1; }
34 static void classInit(int samplingFreq
) {
36 virtual void instanceInit(int samplingFreq
) {
37 fSamplingFreq
= samplingFreq
;
39 virtual void init(int samplingFreq
) {
40 classInit(samplingFreq
);
41 instanceInit(samplingFreq
);
43 virtual void buildUserInterface(UI
* interface
) {
44 interface
->openVerticalBox("untitled.24.tmp");
45 interface
->closeBox();
47 virtual void compute (int count
, FAUSTFLOAT
** input
, FAUSTFLOAT
** output
) {
48 FAUSTFLOAT
* input0
= input
[0];
49 FAUSTFLOAT
* input1
= input
[1];
50 FAUSTFLOAT
* output0
= output
[0];
51 for (int i
=0; i
<count
; i
++) {
52 output0
[i
] = (FAUSTFLOAT
)((float)input0
[i
] + (float)input1
[i
]);