changeset 157:ae56bf90cdf9

* Wire up MIDI input port (as far as printing a message when an event comes in, anyway)
author Chris Cannam
date Mon, 23 Feb 2009 17:50:17 +0000
parents 89737ffa4580
children 72495c4cd315
files framework/MainWindowBase.cpp framework/MainWindowBase.h
diffstat 2 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/framework/MainWindowBase.cpp	Thu Feb 12 15:26:43 2009 +0000
+++ b/framework/MainWindowBase.cpp	Mon Feb 23 17:50:17 2009 +0000
@@ -66,6 +66,7 @@
 #include "base/Preferences.h"
 
 #include "data/osc/OSCQueue.h"
+#include "data/midi/MIDIInput.h"
 
 #include <QApplication>
 #include <QMessageBox>
@@ -112,6 +113,7 @@
     m_playTarget(0),
     m_oscQueue(0),
     m_oscQueueStarter(0),
+    m_midiInput(0),
     m_recentFiles("RecentFiles", 20),
     m_recentTransforms("RecentTransforms", 20),
     m_documentModified(false),
@@ -212,6 +214,8 @@
     m_labeller = new Labeller(labellerType);
     m_labeller->setCounterCycleSize(cycle);
 
+    m_midiInput = new MIDIInput(QApplication::applicationName());
+
     if (withOSCSupport) {
         m_oscQueueStarter = new OSCQueueStarter(this);
         connect(m_oscQueueStarter, SIGNAL(finished()), this, SLOT(oscReady()));
@@ -226,6 +230,7 @@
     delete m_playSource;
     delete m_viewManager;
     delete m_oscQueue;
+    delete m_midiInput;
     Profiles::getInstance()->dump();
 }
 
--- a/framework/MainWindowBase.h	Thu Feb 12 15:26:43 2009 +0000
+++ b/framework/MainWindowBase.h	Mon Feb 23 17:50:17 2009 +0000
@@ -55,6 +55,7 @@
 class QTreeView;
 class QPushButton;
 class OSCMessage;
+class MIDIInput;
 class KeyReference;
 class Labeller;
 class ModelDataTableDialog;
@@ -284,6 +285,8 @@
     OSCQueue                *m_oscQueue;
     OSCQueueStarter         *m_oscQueueStarter;
 
+    MIDIInput               *m_midiInput;
+
     RecentFiles              m_recentFiles;
     RecentFiles              m_recentTransforms;