|
LMMS
|
#include <juce_UMPConversion.h>
Static Public Member Functions | |
| template<typename PacketCallbackFunction> | |
| static void | toMidi1 (const MidiMessage &m, PacketCallbackFunction &&callback) |
| static void | toMidi1 (const MidiMessage &m, Packets &packets) |
| static uint8_t | scaleTo8 (uint8_t word7Bit) |
| static uint16_t | scaleTo16 (uint8_t word7Bit) |
| static uint16_t | scaleTo16 (uint16_t word14Bit) |
| static uint32_t | scaleTo32 (uint8_t word7Bit) |
| static uint32_t | scaleTo32 (uint16_t word14Bit) |
| static uint8_t | scaleTo7 (uint8_t word8Bit) |
| static uint8_t | scaleTo7 (uint16_t word16Bit) |
| static uint8_t | scaleTo7 (uint32_t word32Bit) |
| static uint16_t | scaleTo14 (uint16_t word16Bit) |
| static uint16_t | scaleTo14 (uint32_t word32Bit) |
| template<typename Callback> | |
| static void | midi2ToMidi1DefaultTranslation (const View &v, Callback &&callback) |
Functions to assist conversion of UMP messages to/from other formats, especially older 'bytestream' formatted MidiMessages.
@tags{Audio}
|
inlinestatic |
Converts UMP messages which may include MIDI 2.0 channel voice messages into equivalent MIDI 1.0 messages (still in UMP format).
callback is a function that accepts a single View argument and will be called with each converted packet.
Note that not all MIDI 2.0 messages have MIDI 1.0 equivalents, so such messages will be ignored.
Narrows a 32-bit MIDI 2.0 value to a 14-bit MIDI 1.0 value.
Narrows a 32-bit MIDI 2.0 value to a 14-bit MIDI 1.0 value.
Widens a 14-bit MIDI 1.0 value to a 16-bit MIDI 2.0 value.
Widens a 7-bit MIDI 1.0 value to a 16-bit MIDI 2.0 value.
Widens a 14-bit MIDI 1.0 value to a 32-bit MIDI 2.0 value.
Widens a 7-bit MIDI 1.0 value to a 32-bit MIDI 2.0 value.
Narrows a 16-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value.
Narrows a 32-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value.
Narrows a 16-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value.
Widens a 7-bit MIDI 1.0 value to a 8-bit MIDI 2.0 value.
|
inlinestatic |
|
inlinestatic |
Converts a MidiMessage to one or more messages in UMP format, using the MIDI 1.0 Protocol.
packets is an out-param to allow the caller to control allocation/deallocation. Returning a new Packets object would require every call to toMidi1 to allocate. With this version, no allocations will occur, provided that packets has adequate reserved space.