OpenShot Audio Library | OpenShotAudio: juce::universal_midi_packets::Midi1ToBytestreamTranslator Class Reference

OpenShot Audio Library | OpenShotAudio 0.6.0

Loading...
Searching...
No Matches
juce::universal_midi_packets::Midi1ToBytestreamTranslator Class Reference

`#include <juce_UMPMidi1ToBytestreamTranslator.h>`

## Public Member Functions
| Midi1ToBytestreamTranslator (int initialBufferSize)
void | reset ()
template<typename MessageCallback>
void | dispatch (const View &packet, double time, MessageCallback &&callback)

## Static Public Member Functions
static MidiMessage | fromUmp (const PacketX1 &m, double time=0)

## Detailed Description

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.

Definition at line 34 of file juce_UMPMidi1ToBytestreamTranslator.h.

## Constructor & Destructor Documentation

## ◆ Midi1ToBytestreamTranslator()

juce::universal_midi_packets::Midi1ToBytestreamTranslator::Midi1ToBytestreamTranslator | ( | int | initialBufferSize | ) |
| inlineexplicit

Ensures that there is room in the internal buffer for a sysex message of at least initialBufferSize bytes.

Definition at line 40 of file juce_UMPMidi1ToBytestreamTranslator.h.

## Member Function Documentation

## ◆ dispatch()

template<typename MessageCallback>

void juce::universal_midi_packets::Midi1ToBytestreamTranslator::dispatch | ( | const View & | packet,
|  | double | time,
|  | MessageCallback && | callback )
| inline

Converts a Universal MIDI Packet using the MIDI 1.0 Protocol to an equivalent MidiMessage. Accumulates SysEx packets into a single MidiMessage, as appropriate.

Parameters

  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.

Definition at line 61 of file juce_UMPMidi1ToBytestreamTranslator.h.

## ◆ fromUmp()

MidiMessage juce::universal_midi_packets::Midi1ToBytestreamTranslator::fromUmp | ( | const PacketX1 & | m,
|  | double | time = 0 )
| inlinestatic

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.

Definition at line 107 of file juce_UMPMidi1ToBytestreamTranslator.h.

Referenced by dispatch().

## ◆ reset()

void juce::universal_midi_packets::Midi1ToBytestreamTranslator::reset | ( |  | ) |
| inline

Clears the concatenator.

Definition at line 46 of file juce_UMPMidi1ToBytestreamTranslator.h.

The documentation for this class was generated from the following file:

- juce_UMPMidi1ToBytestreamTranslator.h