diff options
author | JP Cimalando <jpcima@users.noreply.github.com> | 2018-06-20 21:45:54 +0200 |
---|---|---|
committer | JP Cimalando <jpcima@users.noreply.github.com> | 2018-06-20 23:23:09 +0200 |
commit | 252e65097e9b8a815485fc03e4358698803f1a73 (patch) | |
tree | 1ece6563e49c2d82bdb453f0f0c5ce258db63874 /src/adlmidi_private.hpp | |
parent | 94dba775b234a57ad45dabf77200d305c94d7bf0 (diff) | |
download | libADLMIDI-252e65097e9b8a815485fc03e4358698803f1a73.tar.gz libADLMIDI-252e65097e9b8a815485fc03e4358698803f1a73.tar.bz2 libADLMIDI-252e65097e9b8a815485fc03e4358698803f1a73.zip |
basic framework of sysex handling and sequencer support
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r-- | src/adlmidi_private.hpp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index fda629d..4b3ab10 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -108,6 +108,7 @@ typedef int32_t ssize_t; #include <deque> #include <algorithm> +#include <iterator> /* * Workaround for some compilers are has no those macros in their headers! @@ -984,6 +985,7 @@ public: std::vector<MIDIchannel> Ch; bool cmf_percussion_mode; + uint8_t m_sysExDeviceId; MIDIEventHooks hooks; @@ -1198,6 +1200,9 @@ public: void realTime_BankChangeMSB(uint8_t channel, uint8_t msb); void realTime_BankChange(uint8_t channel, uint16_t bank); + void setDeviceId(uint8_t id); + bool realTime_SysEx(const uint8_t *msg, unsigned size); + void realTime_panic(); #if defined(ADLMIDI_AUDIO_TICK_HANDLER) @@ -1208,6 +1213,30 @@ public: private: enum { + Manufacturer_Roland = 0x41, + Manufacturer_Yamaha = 0x43, + Manufacturer_UniversalNonRealtime = 0x7E, + Manufacturer_UniversalRealtime = 0x7F + }; + enum + { + RolandMode_Request = 0x11, + RolandMode_Send = 0x12 + }; + enum + { + RolandModel_GS = 0x42, + RolandModel_SC55 = 0x45, + YamahaModel_XG = 0x4C + }; + + bool doUniversalSysEx(unsigned dev, bool realtime, const uint8_t *data, unsigned size); + bool doRolandSysEx(unsigned dev, const uint8_t *data, unsigned size); + bool doYamahaSysEx(unsigned dev, const uint8_t *data, unsigned size); + +private: + enum + { Upd_Patch = 0x1, Upd_Pan = 0x2, Upd_Volume = 0x4, |