gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

parametervaluelist.h (662B)


      1 #pragma once
      2 
      3 #include <cstdint>
      4 #include <map>
      5 #include <string>
      6 #include <vector>
      7 #include <limits>
      8 
      9 #include "types.h"
     10 
     11 namespace pluginLib
     12 {
     13 	struct ValueList
     14 	{
     15 		static constexpr uint32_t InvalidIndex = 0xffffffff;
     16 		static constexpr ParamValue InvalidValue = std::numeric_limits<int>::min();
     17 
     18 		uint32_t textToValue(const std::string& _string) const;
     19 		const std::string& valueToText(const uint32_t _value) const;
     20 		ParamValue orderToValue(uint32_t _orderIndex) const;
     21 		const std::string& orderToText(uint32_t _orderIndex) const;
     22 
     23 		std::vector<std::string> texts;
     24 		std::map<std::string, uint32_t> textToValueMap;
     25 		std::vector<ParamValue> order;
     26 	};
     27 }