diff options
author | Wohlstand <admin@wohlnet.ru> | 2017-10-01 03:34:03 +0300 |
---|---|---|
committer | Wohlstand <admin@wohlnet.ru> | 2017-10-01 03:34:03 +0300 |
commit | 685e7b200a29fdf8cc9dc5149c5173bac25caa9b (patch) | |
tree | 3be0b67980e7926a0b9fc33a9a16b56e44727d5b /src/adlmidi_private.hpp | |
parent | bef9226b4c2aa629d5ddf0ce26a073b87e887cfe (diff) | |
download | libADLMIDI-685e7b200a29fdf8cc9dc5149c5173bac25caa9b.tar.gz libADLMIDI-685e7b200a29fdf8cc9dc5149c5173bac25caa9b.tar.bz2 libADLMIDI-685e7b200a29fdf8cc9dc5149c5173bac25caa9b.zip |
Prepare for implementation of real-time MIDI support
Make function for every real MIDI event which we are able to call independently from the common events stream.
MIDI streamer will be moved into own module which will process MIDI files and pass events into realtime module.
Then, make public API which will allow use realtime MIDI for making drivers and player plugins.
Diffstat (limited to 'src/adlmidi_private.hpp')
-rw-r--r-- | src/adlmidi_private.hpp | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/src/adlmidi_private.hpp b/src/adlmidi_private.hpp index 46e6e2e..5b28ea6 100644 --- a/src/adlmidi_private.hpp +++ b/src/adlmidi_private.hpp @@ -26,27 +26,27 @@ // Setup compiler defines useful for exporting required public API symbols in gme.cpp #ifndef ADLMIDI_EXPORT -#if defined (_WIN32) && defined(ADLMIDI_BUILD_DLL) -#define ADLMIDI_EXPORT __declspec(dllexport) -#elif defined (LIBADLMIDI_VISIBILITY) -#define ADLMIDI_EXPORT __attribute__((visibility ("default"))) -#else -#define ADLMIDI_EXPORT -#endif + #if defined (_WIN32) && defined(ADLMIDI_BUILD_DLL) + #define ADLMIDI_EXPORT __declspec(dllexport) + #elif defined (LIBADLMIDI_VISIBILITY) + #define ADLMIDI_EXPORT __attribute__((visibility ("default"))) + #else + #define ADLMIDI_EXPORT + #endif #endif #ifdef _WIN32 -#undef NO_OLDNAMES - -#ifdef _MSC_VER -#ifdef _WIN64 - typedef __int64 ssize_t; -#else - typedef __int32 ssize_t; -#endif + #undef NO_OLDNAMES + + #ifdef _MSC_VER + #ifdef _WIN64 + typedef __int64 ssize_t; + #else + typedef __int32 ssize_t; + #endif + #endif #endif -#endif #include <vector> #include <string> #include <sstream> @@ -67,9 +67,9 @@ #include "fraction.h" #ifdef ADLMIDI_USE_DOSBOX_OPL -#include "dbopl.h" + #include "dbopl.h" #else -#include "nukedopl3.h" + #include "nukedopl3.h" #endif #include "adldata.hh" @@ -465,6 +465,26 @@ public: */ double Tick(double s, double granularity); + /* RealTime event triggers */ + void realTime_ResetState(); + + bool realTime_NoteOn(uint8_t channel, uint8_t note, uint8_t velocity); + void realTime_NoteOff(uint8_t channel, uint8_t note); + + void realTime_NoteAfterTouch(uint8_t channel, uint8_t note, uint8_t atVal); + void realTime_ChannelAfterTouch(uint8_t channel, uint8_t atVal); + + void realTime_Controller(uint8_t channel, uint8_t type, uint8_t value); + + void realTime_PatchChange(uint8_t channel, uint8_t patch); + + void realTime_PitchBend(uint8_t channel, uint16_t pitch); + void realTime_PitchBend(uint8_t channel, uint8_t msb, uint8_t lsb); + + void realTime_BankChangeLSB(uint8_t channel, uint8_t lsb); + void realTime_BankChangeMSB(uint8_t channel, uint8_t msb); + void realTime_BankChange(uint8_t channel, uint16_t bank); + private: enum { |