diff options
author | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-21 09:39:53 +0300 |
---|---|---|
committer | Vitaly Novichkov <admin@wohlnet.ru> | 2018-06-21 09:39:53 +0300 |
commit | 0a93f3c6ca30a746c86c08922192f052864b46ed (patch) | |
tree | 241329d2362e5c4cfca9748c00658a2aa31897ef /src/adlmidi_private.hpp | |
parent | 8917fd60694ef2a0757d6e250faea37482b34956 (diff) | |
parent | 252e65097e9b8a815485fc03e4358698803f1a73 (diff) | |
download | libADLMIDI-0a93f3c6ca30a746c86c08922192f052864b46ed.tar.gz libADLMIDI-0a93f3c6ca30a746c86c08922192f052864b46ed.tar.bz2 libADLMIDI-0a93f3c6ca30a746c86c08922192f052864b46ed.zip |
Merge branch 'all-sysex' of git@github.com:jpcima/libADLMIDI.git into split-midi-sequencer-and-sysex-2
# Conflicts:
# src/adlmidi_midiplay.cpp
# src/adlmidi_private.hpp
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r-- | src/adlmidi_private.hpp | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 058a431..67f1ccb 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! @@ -723,6 +724,7 @@ public: std::vector<MIDIchannel> Ch; bool cmf_percussion_mode; + uint8_t m_sysExDeviceId; MIDIEventHooks hooks; @@ -901,6 +903,20 @@ public: void realTime_BankChange(uint8_t channel, uint16_t bank); /** + * @brief Sets the Device identifier + * @param id 7-bit Device identifier + */ + void setDeviceId(uint8_t id); + + /** + * @brief System Exclusive message + * @param msg Raw SysEx Message + * @param size Length of SysEx message + * @return true if message was passed successfully. False on any errors + */ + bool realTime_SysEx(const uint8_t *msg, unsigned size); + + /** * @brief Turn off all notes and mute the sound of releasing notes */ void realTime_panic(); @@ -934,6 +950,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, |