From 27cd372b72c8108260eb5198d43d059ecbff2a77 Mon Sep 17 00:00:00 2001 From: Volker Fischer Date: Tue, 3 Oct 2023 09:45:35 +0200 Subject: fix issue with hi-hat choking on press of the control pedal --- src/midimapper.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/midimapper.h') 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 #include #include +#include typedef std::map midimap_t; typedef std::map 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& 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 instwithcontrolthresh; + int maxcontrolthresh{0}; std::mutex mutex; }; -- cgit v1.2.3