diff options
author | Volker Fischer <corrados@users.noreply.github.com> | 2023-10-03 09:45:35 +0200 |
---|---|---|
committer | Volker Fischer <corrados@users.noreply.github.com> | 2023-10-03 09:45:35 +0200 |
commit | 27cd372b72c8108260eb5198d43d059ecbff2a77 (patch) | |
tree | 4d948bfcbe4cb5f3e6c36bc350400082d67bbaa5 /src/midimapper.h | |
parent | 19e58b4cc1a722459de3110b246ac637fa6cb0d9 (diff) |
fix issue with hi-hat choking on press of the control pedaledrumulus
Diffstat (limited to 'src/midimapper.h')
-rw-r--r-- | src/midimapper.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/midimapper.h b/src/midimapper.h index 5c81fd0..adb5777 100644 --- a/src/midimapper.h +++ b/src/midimapper.h @@ -29,6 +29,7 @@ #include <map> #include <string> #include <mutex> +#include <vector> typedef std::map<int, std::string> midimap_t; typedef std::map<std::string, int> instrmap_t; @@ -41,6 +42,12 @@ public: //! \returns -1 if not found or the note index. int lookup(int note, int controller = -1); + //! Get all instruments with controller thresholds defined. + std::vector<int>& getInstWithControlthresh() { return instwithcontrolthresh; } + + //! Get the maximum configured control threshold + int getMaxControlthresh() { return maxcontrolthresh; } + //! Set new map sets. void swap(instrmap_t& instrmap, midimap_t& midimap, controlthreshmap_t& controlthreshmap); @@ -50,6 +57,8 @@ private: instrmap_t instrmap; midimap_t midimap; controlthreshmap_t controlthreshmap; + std::vector<int> instwithcontrolthresh; + int maxcontrolthresh{0}; std::mutex mutex; }; |