Line data Source code
1 : #include "MIDI_MessageTypes.hpp" 2 : #include "Settings/NamespaceSettings.hpp" 3 : 4 : BEGIN_CS_NAMESPACE 5 : 6 6 : FlashString_t enum_to_string(MIDIMessageType m) { 7 : using M = MIDIMessageType; 8 6 : switch (m) { 9 0 : case M::None: return F("None"); 10 0 : case M::NoteOff: return F("NoteOff"); 11 0 : case M::NoteOn: return F("NoteOn"); 12 0 : case M::KeyPressure: return F("KeyPressure"); 13 0 : case M::ControlChange: return F("ControlChange"); 14 0 : case M::ProgramChange: return F("ProgramChange"); 15 0 : case M::ChannelPressure: return F("ChannelPressure"); 16 0 : case M::PitchBend: return F("PitchBend"); 17 0 : case M::SysExStart: return F("SysExStart"); 18 1 : case M::MTCQuarterFrame: return F("MTCQuarterFrame"); 19 1 : case M::SongPositionPointer: return F("SongPositionPointer"); 20 1 : case M::SongSelect: return F("SongSelect"); 21 0 : case M::UndefinedSysCommon1: return F("UndefinedSysCommon1"); 22 0 : case M::UndefinedSysCommon2: return F("UndefinedSysCommon2"); 23 1 : case M::TuneRequest: return F("TuneRequest"); 24 0 : case M::SysExEnd: return F("SysExEnd"); 25 2 : case M::TimingClock: return F("TimingClock"); 26 0 : case M::UndefinedRealTime1: return F("UndefinedRealTime1"); 27 0 : case M::Start: return F("Start"); 28 0 : case M::Continue: return F("Continue"); 29 0 : case M::Stop: return F("Stop"); 30 0 : case M::UndefinedRealTime2: return F("UndefinedRealTime2"); 31 0 : case M::ActiveSensing: return F("ActiveSensing"); 32 0 : case M::SystemReset: return F("SystemReset"); 33 0 : default: return F("<invalid>"); 34 : } 35 : } 36 : 37 : END_CS_NAMESPACE