From dab876ab960322e06fb2d46093c73b17b1ec42ba Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Wed, 6 Feb 2019 18:20:44 -0500 Subject: [PATCH] Add description to Core modules. Disable QWERTY MIDI keyboard when an element is selected. --- src/Core/AudioInterface.cpp | 2 +- src/Core/Blank.cpp | 2 +- src/Core/CV_CC.cpp | 2 +- src/Core/CV_Gate.cpp | 2 +- src/Core/CV_MIDI.cpp | 2 +- src/Core/MIDI_CC.cpp | 2 +- src/Core/MIDI_CV.cpp | 2 +- src/Core/MIDI_Gate.cpp | 2 +- src/Core/MIDI_Map.cpp | 2 +- src/Core/Notes.cpp | 2 +- src/Core/{Core.cpp => plugin.cpp} | 20 ++++++++++---------- src/Core/{Core.hpp => plugin.hpp} | 0 src/plugin.cpp | 4 ++-- src/window.cpp | 2 +- 14 files changed, 23 insertions(+), 23 deletions(-) rename src/Core/{Core.cpp => plugin.cpp} (68%) rename src/Core/{Core.hpp => plugin.hpp} (100%) diff --git a/src/Core/AudioInterface.cpp b/src/Core/AudioInterface.cpp index 27f78f96..12fc5b67 100644 --- a/src/Core/AudioInterface.cpp +++ b/src/Core/AudioInterface.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" #include "audio.hpp" #include "app.hpp" #include diff --git a/src/Core/Blank.cpp b/src/Core/Blank.cpp index e16fc5db..4e30db48 100644 --- a/src/Core/Blank.cpp +++ b/src/Core/Blank.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" #include "app.hpp" using namespace rack; diff --git a/src/Core/CV_CC.cpp b/src/Core/CV_CC.cpp index ef85470c..7027eb91 100644 --- a/src/Core/CV_CC.cpp +++ b/src/Core/CV_CC.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" struct CCMidiOutput : midi::Output { diff --git a/src/Core/CV_Gate.cpp b/src/Core/CV_Gate.cpp index 0f802d39..d30859f0 100644 --- a/src/Core/CV_Gate.cpp +++ b/src/Core/CV_Gate.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" struct GateMidiOutput : midi::Output { diff --git a/src/Core/CV_MIDI.cpp b/src/Core/CV_MIDI.cpp index fdccd618..04923ffa 100644 --- a/src/Core/CV_MIDI.cpp +++ b/src/Core/CV_MIDI.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" template diff --git a/src/Core/MIDI_CC.cpp b/src/Core/MIDI_CC.cpp index ffb6d0f3..c2d1d1e7 100644 --- a/src/Core/MIDI_CC.cpp +++ b/src/Core/MIDI_CC.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" struct MIDI_CC : Module { diff --git a/src/Core/MIDI_CV.cpp b/src/Core/MIDI_CV.cpp index f357d94c..f5993301 100644 --- a/src/Core/MIDI_CV.cpp +++ b/src/Core/MIDI_CV.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" #include diff --git a/src/Core/MIDI_Gate.cpp b/src/Core/MIDI_Gate.cpp index 6b52d667..7f20381a 100644 --- a/src/Core/MIDI_Gate.cpp +++ b/src/Core/MIDI_Gate.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" struct MIDI_Gate : Module { diff --git a/src/Core/MIDI_Map.cpp b/src/Core/MIDI_Map.cpp index c4233ea9..c4b28488 100644 --- a/src/Core/MIDI_Map.cpp +++ b/src/Core/MIDI_Map.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" struct MIDI_Map : Module { diff --git a/src/Core/Notes.cpp b/src/Core/Notes.cpp index 4f16b58c..ef6363f2 100644 --- a/src/Core/Notes.cpp +++ b/src/Core/Notes.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" using namespace rack; diff --git a/src/Core/Core.cpp b/src/Core/plugin.cpp similarity index 68% rename from src/Core/Core.cpp rename to src/Core/plugin.cpp index 75c6f182..d0851646 100644 --- a/src/Core/Core.cpp +++ b/src/Core/plugin.cpp @@ -1,4 +1,4 @@ -#include "Core.hpp" +#include "plugin.hpp" void init(rack::Plugin *p) { @@ -6,7 +6,7 @@ void init(rack::Plugin *p) { p->version = TOSTRING(VERSION); p->name = "Core"; p->author = "VCV"; - p->license = "LGPL-3.0-only and BSD-3-Clause"; + p->license = "BSD-3-Clause"; p->authorEmail = "contact@vcvrack.com"; p->pluginUrl = "https://vcvrack.com/"; p->authorUrl = "https://vcvrack.com/"; @@ -19,17 +19,17 @@ void init(rack::Plugin *p) { p->addModel(modelAudioInterface); modelMIDI_CV->name = "MIDI-CV"; - modelMIDI_CV->description = ""; + modelMIDI_CV->description = "Converts MIDI from an external device to CV and gates"; modelMIDI_CV->tags = {"External", "MIDI"}; p->addModel(modelMIDI_CV); modelMIDI_CC->name = "MIDI-CC"; - modelMIDI_CC->description = ""; + modelMIDI_CC->description = "Converts MIDI CC from an external device to CV"; modelMIDI_CC->tags = {"External", "MIDI"}; p->addModel(modelMIDI_CC); modelMIDI_Gate->name = "MIDI-Gate"; - modelMIDI_Gate->description = ""; + modelMIDI_Gate->description = "Converts MIDI notes from an external device to gates"; modelMIDI_Gate->tags = {"External", "MIDI"}; p->addModel(modelMIDI_Gate); @@ -39,27 +39,27 @@ void init(rack::Plugin *p) { p->addModel(modelMIDI_Map); modelCV_MIDI->name = "CV-MIDI"; - modelCV_MIDI->description = ""; + modelCV_MIDI->description = "Converts CV to MIDI and sends to an external device"; modelCV_MIDI->tags = {"External", "MIDI"}; p->addModel(modelCV_MIDI); modelCV_CC->name = "CV-CC"; - modelCV_CC->description = ""; + modelCV_CC->description = "Converts CV to MIDI CC and sends to an external device"; modelCV_CC->tags = {"External", "MIDI"}; p->addModel(modelCV_CC); modelCV_Gate->name = "CV-Gate"; - modelCV_Gate->description = ""; + modelCV_Gate->description = "Converts gates to MIDI notes and sends to an external device"; modelCV_Gate->tags = {"External", "MIDI"}; p->addModel(modelCV_Gate); modelBlank->name = "Blank"; - modelBlank->description = ""; + modelBlank->description = "A resizable blank panel"; modelBlank->tags = {"Blank"}; p->addModel(modelBlank); modelNotes->name = "Notes"; - modelNotes->description = ""; + modelNotes->description = "Write text for patch notes or artist attribution"; modelNotes->tags = {"Blank"}; p->addModel(modelNotes); } diff --git a/src/Core/Core.hpp b/src/Core/plugin.hpp similarity index 100% rename from src/Core/Core.hpp rename to src/Core/plugin.hpp diff --git a/src/plugin.cpp b/src/plugin.cpp index 9f02d5a8..fd63eddb 100644 --- a/src/plugin.cpp +++ b/src/plugin.cpp @@ -333,9 +333,9 @@ static void extractPackages(std::string path) { //////////////////// void init(bool devMode) { - // Load core - // This function is defined in core.cpp + // Load Core Plugin *corePlugin = new Plugin; + // This function is defined in Core/plugin.cpp ::init(corePlugin); plugins.push_back(corePlugin); diff --git a/src/window.cpp b/src/window.cpp index bc56da20..8e7a67a4 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -162,7 +162,7 @@ static void keyCallback(GLFWwindow *win, int key, int scancode, int action, int APP->event->handleKey(window->mousePos, key, scancode, action, mods); // Keyboard MIDI driver - if ((mods & WINDOW_MOD_MASK) == 0) { + if (!APP->event->selectedWidget && (mods & WINDOW_MOD_MASK) == 0) { if (action == GLFW_PRESS) { keyboard::press(key); }