summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/event_type_map.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-12-01 14:28:03 -0500
committerDavid Robillard <d@drobilla.net>2014-12-01 23:35:24 -0500
commit767c0238a34ef4acc4d345e88cd5ddb0c8a8e421 (patch)
treefed11fb6f4e4e08a7c35eb45f53aea70dc66e4f8 /libs/ardour/ardour/event_type_map.h
parentcb8abbe8d2f0e4dfe52bd35613ebba7689628eca (diff)
Replace half-baked param metadata with descriptor.
Among other things, this means that automation controls/lists have the actual min/max/normal/toggled of parameters, and not those inferred from the Parameter ID, which is not correct for things like plugin parameters. Pushing things down to the Evoral::ParmeterDescriptor may be useful in the future to have lists do smarter things based on parameter range, but currently I have just pushed down the above-mentioned currently used attributes.
Diffstat (limited to 'libs/ardour/ardour/event_type_map.h')
-rw-r--r--libs/ardour/ardour/event_type_map.h19
1 files changed, 13 insertions, 6 deletions
diff --git a/libs/ardour/ardour/event_type_map.h b/libs/ardour/ardour/event_type_map.h
index f69d20b773..0d7e623754 100644
--- a/libs/ardour/ardour/event_type_map.h
+++ b/libs/ardour/ardour/event_type_map.h
@@ -21,9 +21,12 @@
#ifndef __ardour_event_type_map_h__
#define __ardour_event_type_map_h__
+#include <map>
#include <string>
+
#include "evoral/TypeMap.hpp"
#include "evoral/ControlList.hpp"
+#include "evoral/ParameterDescriptor.hpp"
#include "ardour/libardour_visibility.h"
@@ -43,19 +46,23 @@ public:
uint32_t midi_event_type(uint8_t status) const;
Evoral::ControlList::InterpolationStyle interpolation_of(const Evoral::Parameter& param);
- bool is_integer(const Evoral::Parameter& param) const;
- Evoral::Parameter new_parameter(uint32_t type, uint8_t channel=0, uint32_t id=0) const;
- Evoral::Parameter new_parameter(const std::string& str) const;
- std::string to_symbol(const Evoral::Parameter& param) const;
+ Evoral::Parameter from_symbol(const std::string& str) const;
+ std::string to_symbol(const Evoral::Parameter& param) const;
+
+ const Evoral::ParameterDescriptor& descriptor(const Evoral::Parameter& param) const;
- bool is_midi_parameter(const Evoral::Parameter& param);
+ void set_descriptor(const Evoral::Parameter& param,
+ const Evoral::ParameterDescriptor& desc);
URIMap& uri_map() { return _uri_map; }
private:
+ typedef std::map<Evoral::Parameter, Evoral::ParameterDescriptor> Descriptors;
+
EventTypeMap(URIMap& uri_map) : _uri_map(uri_map) {}
- URIMap& _uri_map;
+ URIMap& _uri_map;
+ Descriptors _descriptors;
static EventTypeMap* event_type_map;
};