Derivatives of this class are those that do something (anything) with MIDI messages.
More...
Derivatives of this class are those that do something (anything) with MIDI messages.
For example, the user might provide a derivative of this class that sends the given messages to a MIDI port for synthesis.
| bool MidiMsgDestination::ReceiveMessage |
( |
double | deltaTimeSeconds, |
|
|
const uint8_t * | message, |
|
|
uint64_t | messageSize, |
|
|
Error & | error ) |
|
virtual |
This method will be called when this destination is to receive the given MIDI message. Note that it's important that no heavy processing be done in this method (such as is the mentality when writing an audio callback), because the timing of MIDI message reception and processing can effect the quality of audio playback.
- Parameters
-
| [in] | deltaTimeSeconds | This is typically, but not always, set to the amount of time (in seconds) between now and the last time the function was called. |
| [in] | message | This is the payload of the message, which can be decoded using a derivative of the MidiData::Event class. |
| [in] | messageSize | This is the size of the payload in bytes. |
| [out] | error | This should be populated with error information if false is returned. |
- Returns
- True should be returned on success; false otherwise.
Reimplemented in AudioDataLib::MidiMsgLogDestination, AudioDataLib::MidiMsgRecorderDestination, AudioDataLib::SampleBasedSynth, AudioDataLib::SimpleSynth, and AudioDataLib::SubtractiveSynth.