aboutsummaryrefslogtreecommitdiff
path: root/visualization/renderer/main.cpp
diff options
context:
space:
mode:
authorGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-30 01:12:38 +0800
committerGravatar Chris Xiong <chirs241097@gmail.com> 2020-04-30 01:12:38 +0800
commitbd165c0254b9095bb9e5ea54def56b6404033ebe (patch)
treee6e965ff343c0cd4feea0180dd63522e05085567 /visualization/renderer/main.cpp
parent8766f3b12e13d40b65eca23a850f687b0043d022 (diff)
downloadQMidiPlayer-bd165c0254b9095bb9e5ea54def56b6404033ebe.tar.xz
Add visualization renderer.
Add API for getting raw pitch bend values. Fix non-compliant RPN handling. The visualization renderer is still at the "proof-of-concept" stage. It's not very usable (yet).
Diffstat (limited to 'visualization/renderer/main.cpp')
-rw-r--r--visualization/renderer/main.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/visualization/renderer/main.cpp b/visualization/renderer/main.cpp
new file mode 100644
index 0000000..ec4dd1d
--- /dev/null
+++ b/visualization/renderer/main.cpp
@@ -0,0 +1,22 @@
+#include <QProcess>
+#include <QCommandLineParser>
+
+#include "qmpvisrendercore.hpp"
+
+int main(int argc,char **argv)
+{
+ QCoreApplication::setApplicationName("qmpvisrender");
+ QCoreApplication a(argc,argv);
+ QCommandLineParser clp;
+ clp.setApplicationDescription("Renderer a visualization of a midi file.");
+ clp.addHelpOption();
+ clp.parse(a.arguments());
+ qmpVisRenderCore core;
+ core.loadVisualizationLibrary();
+ if(clp.positionalArguments().size())
+ core.setMIDIFile(clp.positionalArguments().front().toStdString().c_str());
+ core.startRender();
+ int retval=a.exec();
+ core.unloadVisualizationLibrary();
+ return retval;
+}