|
JUCE
|
Parses a raw stream of uint32_t holding a series of Universal MIDI Packets using the MIDI 1.0 Protocol, converting to plain (non-UMP) MidiMessages. More...
#include <juce_UMPMidi1ToBytestreamTranslator.h>
Public Member Functions | |
| Midi1ToBytestreamTranslator (int initialBufferSize) | |
Ensures that there is room in the internal buffer for a sysex message of at least initialBufferSize bytes. More... | |
| void | reset () |
| Clears the concatenator. More... | |
| template<typename MessageCallback > | |
| void | dispatch (const View &packet, double time, MessageCallback &&callback) |
| Converts a Universal MIDI Packet using the MIDI 1.0 Protocol to an equivalent MidiMessage. More... | |
Static Public Member Functions | |
| static MidiMessage | fromUmp (const PacketX1 &m, double time=0) |
| Converts from a Universal MIDI Packet to MIDI 1 bytestream format. More... | |
Parses a raw stream of uint32_t holding a series of Universal MIDI Packets using the MIDI 1.0 Protocol, converting to plain (non-UMP) MidiMessages.
|
explicit |
Ensures that there is room in the internal buffer for a sysex message of at least initialBufferSize bytes.
| void universal_midi_packets::Midi1ToBytestreamTranslator::reset | ( | ) |
Clears the concatenator.
Referenced by universal_midi_packets::ToBytestreamConverter::reset().
| void universal_midi_packets::Midi1ToBytestreamTranslator::dispatch | ( | const View & | packet, |
| double | time, | ||
| MessageCallback && | callback | ||
| ) |
Converts a Universal MIDI Packet using the MIDI 1.0 Protocol to an equivalent MidiMessage.
Accumulates SysEx packets into a single MidiMessage, as appropriate.
| packet | a packet which is using the MIDI 1.0 Protocol. |
| time | the timestamp to be applied to these messages. |
| callback | a callback which will be called with each converted MidiMessage. |
|
static |
Converts from a Universal MIDI Packet to MIDI 1 bytestream format.
This is only capable of converting a single Universal MIDI Packet to an equivalent bytestream MIDI message. This function cannot understand multi-packet messages, like SysEx7 messages.
To convert multi-packet messages, use Midi1ToBytestreamTranslator to convert from a UMP MIDI 1.0 stream, or ToBytestreamDispatcher to convert from both MIDI 2.0 and MIDI 1.0.