+ return MIDILightProto();
+ }
+ return static_cast<const MIDILightProto &>(reflection->GetMessage(msg, descriptor));
+}
+
+// Find what MIDI note the given light (as given by field_number) is mapped to, and enable it.
+template <class Proto>
+void activate_mapped_light(const Proto &msg, int field_number, std::map<MIDIDevice::LightKey, uint8_t> *active_lights)
+{
+ MIDILightProto light_proto = get_light_mapping_helper(msg, field_number);
+ if (!light_proto.has_note_number()) {