From 77b3943b751bed43d230de6db322a750bfd1fc8e Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Thu, 4 Apr 2013 21:19:58 +0200 Subject: New message system. New common midi input class. Some compiler warning fixes. New ListBoxBasic class used by both LustBox and ComboBox. New embossed font. --- vst/Makefile.mingw32 | 1 + vst/drumgizmo_vst.cc | 8 ++++---- vst/input_vst.cc | 17 ----------------- vst/input_vst.h | 8 ++------ 4 files changed, 7 insertions(+), 27 deletions(-) (limited to 'vst') diff --git a/vst/Makefile.mingw32 b/vst/Makefile.mingw32 index d90f5c3..44b2ae2 100644 --- a/vst/Makefile.mingw32 +++ b/vst/Makefile.mingw32 @@ -10,6 +10,7 @@ top_srcdir=.. DG_BASE = .. DG_SRC = \ ${DG_BASE}/src/audiofile.cc \ + ${DG_BASE}/src/audioinputenginemidi.cc \ ${DG_BASE}/src/configuration.cc \ ${DG_BASE}/src/channel.cc \ ${DG_BASE}/src/channelmixer.cc \ diff --git a/vst/drumgizmo_vst.cc b/vst/drumgizmo_vst.cc index 8a24a0f..06e90bd 100644 --- a/vst/drumgizmo_vst.cc +++ b/vst/drumgizmo_vst.cc @@ -35,7 +35,7 @@ #define NUM_PROGRAMS 0 #define NUM_PARAMS 0 - +/* static void midimapHandler(void *ptr, const char* file) { DEBUG(vst, "midimapHandler\n"); @@ -45,7 +45,7 @@ static void midimapHandler(void *ptr, const char* file) drumgizmo->midimapfile = file; input->loadMidiMap(file); } - +*/ DGEditor::DGEditor(AudioEffect* effect) { DEBUG(dgeditor, "Create DGEditor\n"); @@ -60,7 +60,7 @@ bool DGEditor::open(void* ptr) if(plugingui) delete plugingui; plugingui = new PluginGUI(drumgizmo); - plugingui->setChangeMidimapCallback(midimapHandler, dgeff); + // plugingui->setChangeMidimapCallback(midimapHandler, dgeff); // plugingui->show(); return true; @@ -196,7 +196,7 @@ VstInt32 DrumGizmoVst::setChunk(void *data, VstInt32 byteSize, bool isPreset) DEBUG(vst, "Using Drumkit: %s\n", drumgizmo->kitfile.c_str()); DEBUG(vst, "Using Midimap: %s\n", drumgizmo->midimapfile.c_str()); - input->loadMidiMap(drumgizmo->midimapfile); + // input->loadMidiMap(drumgizmo->midimapfile); /* drumgizmo->loadkit("z:/c/drumgizmo/kits/test/test.xml"); diff --git a/vst/input_vst.cc b/vst/input_vst.cc index 5cc73f9..53de387 100644 --- a/vst/input_vst.cc +++ b/vst/input_vst.cc @@ -106,20 +106,3 @@ void InputVST::processEvents(VstEvents* ev) event++; } } - -void InputVST::loadMidiMap(std::string f) -{ - DEBUG(inputvst, "load midi map %s\n", f.c_str()); - - MidiMapParser p(f); - if(p.parse()) { - ERR(inputvst, "Error loading midimap: %s\n", f.c_str()); - return; - } - mmap.midimap = p.midimap; - - for(size_t i = 0; i < instruments->size(); i++) { - DEBUG(inputvst, "Mapping %s to %d\n", (*instruments)[i]->name().c_str(), i); - mmap.instrmap[(*instruments)[i]->name()] = i; - } -} diff --git a/vst/input_vst.h b/vst/input_vst.h index 668f39c..612add6 100644 --- a/vst/input_vst.h +++ b/vst/input_vst.h @@ -27,12 +27,11 @@ #ifndef __DRUMGIZMO_INPUT_VST_H__ #define __DRUMGIZMO_INPUT_VST_H__ -#include -#include +#include #include -class InputVST : public AudioInputEngine { +class InputVST : public AudioInputEngineMidi { public: InputVST(); virtual ~InputVST(); @@ -50,9 +49,6 @@ public: void processEvents(VstEvents* ev); - void loadMidiMap(std::string file); - MidiMapper mmap; - private: event_t *list; size_t listsize; -- cgit v1.2.3