38 EventTypeMap* EventTypeMap::event_type_map;
41 EventTypeMap::instance()
43 if (!EventTypeMap::event_type_map) {
45 EventTypeMap::event_type_map =
new EventTypeMap(&URIMap::instance());
50 return *EventTypeMap::event_type_map;
54 EventTypeMap::type_is_midi(uint32_t type)
const
66 EventTypeMap::midi_event_type(uint8_t status)
const
74 switch (param.
type()) {
119 default: assert(
false);
125 EventTypeMap::from_symbol(
const string& str)
const
128 uint8_t p_channel = 0;
133 }
else if (str ==
"trim") {
135 }
else if (str ==
"solo") {
137 }
else if (str ==
"mute") {
139 }
else if (str ==
"fadein") {
141 }
else if (str ==
"fadeout") {
143 }
else if (str ==
"envelope") {
145 }
else if (str ==
"pan-azimuth") {
147 }
else if (str ==
"pan-width") {
149 }
else if (str ==
"pan-elevation") {
151 }
else if (str ==
"pan-frontback") {
153 }
else if (str ==
"pan-lfe") {
155 }
else if (str.length() > 10 && str.substr(0, 10) ==
"parameter-") {
157 p_id =
atoi(str.c_str()+10);
159 }
else if (str.length() > 9 && str.substr(0, 9) ==
"property-") {
161 const char*
name = str.c_str() + 9;
162 if (isdigit(str.c_str()[0])) {
165 p_id = _uri_map->uri_to_id(name);
168 }
else if (str.length() > 7 && str.substr(0, 7) ==
"midicc-") {
170 uint32_t channel = 0;
171 sscanf(str.c_str(),
"midicc-%d-%d", &channel, &p_id);
172 assert(channel < 16);
174 }
else if (str.length() > 16 && str.substr(0, 16) ==
"midi-pgm-change-") {
176 uint32_t channel = 0;
177 sscanf(str.c_str(),
"midi-pgm-change-%d", &channel);
178 assert(channel < 16);
181 }
else if (str.length() > 18 && str.substr(0, 18) ==
"midi-pitch-bender-") {
183 uint32_t channel = 0;
184 sscanf(str.c_str(),
"midi-pitch-bender-%d", &channel);
185 assert(channel < 16);
188 }
else if (str.length() > 22 && str.substr(0, 22) ==
"midi-channel-pressure-") {
190 uint32_t channel = 0;
191 sscanf(str.c_str(),
"midi-channel-pressure-%d", &channel);
192 assert(channel < 16);
215 return "pan-azimuth";
217 return "pan-elevation";
221 return "pan-frontback";
238 const char* uri = _uri_map->id_to_uri(param.
id());
263 Descriptors::const_iterator d = _descriptors.find(param);
264 if (d != _descriptors.end()) {
276 _descriptors.insert(std::make_pair(param, desc));
#define MIDI_CTL_MSB_BANK
int atoi(const string &s)
#define MIDI_CTL_NONREG_PARM_NUM_LSB
#define MIDI_CTL_LOCAL_CONTROL_SWITCH
#define MIDI_CTL_LSB_BANK
#define MIDI_CTL_MSB_GENERAL_PURPOSE3
#define MIDI_CTL_LSB_EFFECT2
#define MIDI_CTL_MSB_GENERAL_PURPOSE1
LIBPBD_API Transmitter warning
#define MIDI_CTL_ALL_SOUNDS_OFF
std::ostream & endmsg(std::ostream &ostr)
#define MIDI_CTL_MSB_EFFECT2
#define MIDI_CTL_LEGATO_FOOTSWITCH
#define MIDI_CTL_RESET_CONTROLLERS
#define MIDI_CTL_MSB_GENERAL_PURPOSE2
#define MIDI_CTL_REGIST_PARM_NUM_LSB
#define MIDI_CTL_GENERAL_PURPOSE6
#define MIDI_CTL_REGIST_PARM_NUM_MSB
#define MIDI_CTL_LSB_EFFECT1
#define MIDI_CTL_MSB_GENERAL_PURPOSE4
#define MIDI_CTL_GENERAL_PURPOSE7
#define MIDI_CTL_SOSTENUTO
#define MIDI_CTL_NONREG_PARM_NUM_MSB
#define MIDI_CTL_OMNI_OFF
#define MIDI_CTL_DATA_INCREMENT
bool parameter_is_midi(AutomationType type)
#define MIDI_CTL_PORTAMENTO
#define MIDI_CTL_DATA_DECREMENT
#define MIDI_CTL_MSB_EFFECT1
AutomationType midi_parameter_type(uint8_t status)
#define MIDI_CTL_ALL_NOTES_OFF
#define MIDI_CTL_GENERAL_PURPOSE8
#define MIDI_CTL_GENERAL_PURPOSE5
uint8_t parameter_midi_type(AutomationType type)
std::string string_compose(const std::string &fmt, const T1 &o1)
#define MIDI_CTL_SOFT_PEDAL