Vkeybd: add a mod-wheel
[ardour.git] / gtk2_ardour / port_group.cc
index 7604a29eb83ff7d574b4e99a0208e97158d6b0ca..ab7feb618539c0cc827395d32e5bcbfff5ad8f7a 100644 (file)
@@ -26,6 +26,7 @@
 
 #include "midi++/mmc.h"
 
+#include "ardour/async_midi_port.h"
 #include "ardour/audioengine.h"
 #include "ardour/auditioner.h"
 #include "ardour/bundle.h"
@@ -489,6 +490,15 @@ PortGroupList::gather (ARDOUR::Session* session, ARDOUR::DataType type, bool inp
                }
        }
 
+       /* virtual keyboard */
+       if (!inputs && (type == DataType::MIDI || type == DataType::NIL)) {
+               boost::shared_ptr<ARDOUR::Port> ap = boost::dynamic_pointer_cast<ARDOUR::Port> (session->vkbd_output_port());
+               AudioEngine* ae = AudioEngine::instance();
+               boost::shared_ptr<Bundle> vm (new Bundle (_("Virtual MIDI"), inputs));
+               vm->add_channel (_("Virtual Keyboard"), DataType::MIDI, ae->make_port_name_non_relative (ap->name()));
+               program->add_bundle (vm);
+       }
+
        /* our sync ports */
 
        if ((type == DataType::MIDI || type == DataType::NIL)) {