1 /************************************************************************
2  IMPORTANT NOTE : this file contains two clearly delimited sections :
3  the ARCHITECTURE section (in two parts) and the USER section. Each section
4  is governed by its own copyright and license. Please check individually
5  each section for license and copyright information.
6  *************************************************************************/
7 
8 /******************* BEGIN minimal.cpp ****************/
9 /************************************************************************
10  FAUST Architecture File
11  Copyright (C) 2003-2019 GRAME, Centre National de Creation Musicale
12  ---------------------------------------------------------------------
13  This Architecture section is free software; you can redistribute it
14  and/or modify it under the terms of the GNU General Public License
15  as published by the Free Software Foundation; either version 3 of
16  the License, or (at your option) any later version.
17 
18  This program is distributed in the hope that it will be useful,
19  but WITHOUT ANY WARRANTY; without even the implied warranty of
20  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21  GNU General Public License for more details.
22 
23  You should have received a copy of the GNU General Public License
24  along with this program; If not, see <http://www.gnu.org/licenses/>.
25 
26  EXCEPTION : As a special exception, you may create a larger work
27  that contains this FAUST architecture section and distribute
28  that work under terms of your choice, so long as this FAUST
29  architecture section is not modified.
30 
31  ************************************************************************
32  ************************************************************************/
33 
34 #include <iostream>
35 
36 #include "faust/gui/PrintUI.h"
37 #include "faust/gui/meta.h"
38 #include "faust/audio/dummy-audio.h"
39 #include "faust/dsp/one-sample-dsp.h"
40 
41 // faust -a minimal.cpp noise.dsp -o noise.cpp && c++ -std=c++11 noise.cpp -o noise && ./noise
42 
43 /******************************************************************************
44  *******************************************************************************
45 
46  VECTOR INTRINSICS
47 
48  *******************************************************************************
49  *******************************************************************************/
50 
51 <<includeIntrinsic>>
52 
53 /********************END ARCHITECTURE SECTION (part 1/2)****************/
54 
55 /**************************BEGIN USER SECTION **************************/
56 
57 <<includeclass>>
58 
59 /***************************END USER SECTION ***************************/
60 
61 /*******************BEGIN ARCHITECTURE SECTION (part 2/2)***************/
62 
63 using namespace std;
64 
main(int argc,char * argv[])65 int main(int argc, char* argv[])
66 {
67     mydsp DSP;
68     cout << "DSP size: " << sizeof(DSP) << " bytes\n";
69 
70     // Activate the UI, here that only print the control paths
71     PrintUI ui;
72     DSP.buildUserInterface(&ui);
73 
74     // Allocate the audio driver to render 5 buffers of 512 frames
75     dummyaudio audio(5);
76     audio.init("Test", static_cast<dsp*>(&DSP));
77 
78     // Render buffers...
79     audio.start();
80     audio.stop();
81 }
82 
83 /******************* END minimal.cpp ****************/
84 
85