diff options
Diffstat (limited to 'src/midimapper.h')
-rw-r--r-- | src/midimapper.h | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/midimapper.h b/src/midimapper.h index 4673e33..adb5777 100644 --- a/src/midimapper.h +++ b/src/midimapper.h @@ -29,25 +29,36 @@ #include <map> #include <string> #include <mutex> +#include <vector> typedef std::map<int, std::string> midimap_t; typedef std::map<std::string, int> instrmap_t; +typedef std::map<int, std::map<std::string, int> > controlthreshmap_t; class MidiMapper { public: //! Lookup note in map and return its index. //! \returns -1 if not found or the note index. - int lookup(int note); + 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); + void swap(instrmap_t& instrmap, midimap_t& midimap, controlthreshmap_t& controlthreshmap); const midimap_t& getMap(); private: instrmap_t instrmap; midimap_t midimap; + controlthreshmap_t controlthreshmap; + std::vector<int> instwithcontrolthresh; + int maxcontrolthresh{0}; std::mutex mutex; }; |