X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fevent_type_map.h;h=b3aa05ee78c8721c80911917da82e59a439c8c32;hb=e5a181c323243a03338f5a9934a5df254986370d;hp=4d7180c028b73f242d304e6931990e77064e0d05;hpb=03f188cc8b17edc7c727f62b22b4577a2fdbfbe8;p=ardour.git diff --git a/libs/ardour/ardour/event_type_map.h b/libs/ardour/ardour/event_type_map.h index 4d7180c028..b3aa05ee78 100644 --- a/libs/ardour/ardour/event_type_map.h +++ b/libs/ardour/ardour/event_type_map.h @@ -1,6 +1,6 @@ /* Copyright (C) 2000-2007 Paul Davis - Author: Dave Robillard + Author: David Robillard This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,22 +21,50 @@ #ifndef __ardour_event_type_map_h__ #define __ardour_event_type_map_h__ -#include +#include +#include + +#include "evoral/TypeMap.hpp" +#include "evoral/ControlList.hpp" +#include "evoral/ParameterDescriptor.hpp" + +#include "ardour/libardour_visibility.h" namespace ARDOUR { -class EventTypeMap : public Evoral::TypeMap { +class URIMap; + +/** This is the interface Ardour provides to Evoral about what + * parameter and event types/ranges/names etc. to use. + */ +class LIBARDOUR_API EventTypeMap : public Evoral::TypeMap { public: + static EventTypeMap& instance(); + bool type_is_midi(uint32_t type) const; uint8_t parameter_midi_type(const Evoral::Parameter& param) const; - uint32_t midi_event_type(uint8_t status) const; - bool is_integer(const Evoral::Parameter& param) const; + Evoral::ParameterType midi_parameter_type(const uint8_t* buf, uint32_t len) const; + + Evoral::ControlList::InterpolationStyle interpolation_of(const Evoral::Parameter& param); - static EventTypeMap& instance() { return event_type_map; } + Evoral::Parameter from_symbol(const std::string& str) const; + std::string to_symbol(const Evoral::Parameter& param) const; + + Evoral::ParameterDescriptor descriptor(const Evoral::Parameter& param) const; + + void set_descriptor(const Evoral::Parameter& param, + const Evoral::ParameterDescriptor& desc); private: - static EventTypeMap event_type_map; + typedef std::map Descriptors; + + EventTypeMap(URIMap* uri_map) : _uri_map(uri_map) {} + + URIMap* _uri_map; + Descriptors _descriptors; + + static EventTypeMap* event_type_map; }; } // namespace ARDOUR