#pragma once #include "sender.h" #include #include #include #include #include #include namespace midi_router { enum class Message_Type { NOTE_OFF = 0x8u, NOTE_ON = 0x9u, POLY_AT = 0xAu, CONTROL_CHANGE = 0xBu, PROGRAM_CHANGE = 0xCu, CHANNEL_AT = 0xDu, PITCH_WHEEL = 0xEu, CLOCK = 0xF8u, MEAS_END = 0xF9u, START = 0xFAu, CONTINUE = 0xFBu, STOP = 0xFCu, }; using Device_Id = std::string; using Device_Map = std::map; using Target_List = std::vector>; using Route_Map = std::map>; struct Message { Device_Id const * source_id; std::array bytes; Message_Type type() const { if ((bytes[0] & 0xF0) == 0xF0) return static_cast(bytes[0]); else return static_cast(bytes[0] >> 4); } }; } // namespace midi_router