summaryrefslogtreecommitdiff
path: root/note_compiler/main.cpp
diff options
context:
space:
mode:
authorFlorian Jung <flo@thinkpad.(none)>2010-12-31 16:33:17 +0100
committerFlorian Jung <flo@thinkpad.(none)>2010-12-31 16:33:17 +0100
commitff2f14ab35cf1cb2ded11b4ae86d24dda738b445 (patch)
tree3e35d112243bf987f66359a53e4ff9261bdc6d1b /note_compiler/main.cpp
parentd46f6ee0a6298ff58c6f4f0647d49fb4a76f9ea9 (diff)
Add initial code for the note-compiler
The note-compiler now has a Parser class which knows about possible parameter changes (by controller, velocity or simply user definition). Furthermore, several files were adapted (by stripping unneeded code, adding the bool foo_const variables etc.). Small fix in util.c which causes extract_var("foo") to return "foo" instead of "". Fixes in both Makefiles.
Diffstat (limited to 'note_compiler/main.cpp')
-rw-r--r--note_compiler/main.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/note_compiler/main.cpp b/note_compiler/main.cpp
new file mode 100644
index 0000000..3d59c3b
--- /dev/null
+++ b/note_compiler/main.cpp
@@ -0,0 +1,29 @@
+#include <iostream>
+
+#include "parser.h"
+#include "programs.h"
+#include "util.h"
+#include "../synth/fixed.h"
+
+using namespace std;
+
+int main(int argc, char** argv)
+{
+ Parser parser;
+ program_t p;
+
+ parser.parse("../../velotest.prog");
+
+ p=parser.get_result();
+
+ cout << "n_osc="<<p.n_osc<<endl;
+ for (int i=0;i<p.n_osc;i++)
+ {
+ for (int j=0;j<p.n_osc;j++)
+ {
+ cout << " "<<i<<" gets modulated by "<<j<<": strength="<<p.osc[i].fm_strength[j]<<", const="<<p.osc[i].fm_strength_const[j]<<endl;
+ }
+ }
+
+ return 0;
+}