1 //-----------------------------------------------------
3 // copyright: " ( c ) GRAME 2006 "
5 // Code generated with Faust 0.9.58 (http://faust.grame.fr)
6 //-----------------------------------------------------
8 #define FAUSTFLOAT float
11 typedef long double quad
;
15 #define FAUSTCLASS mydsp
18 class mydsp
: public dsp
{
22 static void metadata(Meta
* m
) {
23 m
->declare("name", " noise ");
24 m
->declare("copyright", " ( c ) GRAME 2006 ");
25 m
->declare("music.lib/name", "Music Library");
26 m
->declare("music.lib/author", "GRAME");
27 m
->declare("music.lib/copyright", "GRAME");
28 m
->declare("music.lib/version", "1.0");
29 m
->declare("music.lib/license", "LGPL with exception");
30 m
->declare("math.lib/name", "Math Library");
31 m
->declare("math.lib/author", "GRAME");
32 m
->declare("math.lib/copyright", "GRAME");
33 m
->declare("math.lib/version", "1.0");
34 m
->declare("math.lib/license", "LGPL with exception");
37 virtual int getNumInputs() { return 0; }
38 virtual int getNumOutputs() { return 1; }
39 static void classInit(int samplingFreq
) {
41 virtual void instanceInit(int samplingFreq
) {
42 fSamplingFreq
= samplingFreq
;
43 for (int i
=0; i
<2; i
++) iRec0
[i
] = 0;
45 virtual void init(int samplingFreq
) {
46 classInit(samplingFreq
);
47 instanceInit(samplingFreq
);
49 virtual void buildUserInterface(UI
* interface
) {
50 interface
->openVerticalBox("import_test.1.tmp");
51 interface
->closeBox();
53 virtual void compute (int count
, FAUSTFLOAT
** input
, FAUSTFLOAT
** output
) {
54 FAUSTFLOAT
* output0
= output
[0];
55 for (int i
=0; i
<count
; i
++) {
56 iRec0
[0] = (12345 + (1103515245 * iRec0
[1]));
57 output0
[i
] = (FAUSTFLOAT
)(4.656612875245797e-10f
* iRec0
[0]);