Functions to assist conversion of UMP messages to/from other formats, especially older 'bytestream' formatted MidiMessages.
More...
|
template<typename PacketCallbackFunction > |
static void | toMidi1 (const MidiMessage &m, PacketCallbackFunction &&callback) |
| Converts from a MIDI 1 bytestream to MIDI 1 on Universal MIDI Packets. More...
|
|
static void | toMidi1 (const MidiMessage &m, Packets &packets) |
| Converts a MidiMessage to one or more messages in UMP format, using the MIDI 1.0 Protocol. More...
|
|
static uint8_t | scaleTo8 (uint8_t word7Bit) |
| Widens a 7-bit MIDI 1.0 value to a 8-bit MIDI 2.0 value. More...
|
|
static uint16_t | scaleTo16 (uint8_t word7Bit) |
| Widens a 7-bit MIDI 1.0 value to a 16-bit MIDI 2.0 value. More...
|
|
static uint16_t | scaleTo16 (uint16_t word14Bit) |
| Widens a 14-bit MIDI 1.0 value to a 16-bit MIDI 2.0 value. More...
|
|
static uint32_t | scaleTo32 (uint8_t word7Bit) |
| Widens a 7-bit MIDI 1.0 value to a 32-bit MIDI 2.0 value. More...
|
|
static uint32_t | scaleTo32 (uint16_t word14Bit) |
| Widens a 14-bit MIDI 1.0 value to a 32-bit MIDI 2.0 value. More...
|
|
static uint8_t | scaleTo7 (uint8_t word8Bit) |
| Narrows a 16-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value. More...
|
|
static uint8_t | scaleTo7 (uint16_t word16Bit) |
| Narrows a 16-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value. More...
|
|
static uint8_t | scaleTo7 (uint32_t word32Bit) |
| Narrows a 32-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value. More...
|
|
static uint16_t | scaleTo14 (uint16_t word16Bit) |
| Narrows a 32-bit MIDI 2.0 value to a 14-bit MIDI 1.0 value. More...
|
|
static uint16_t | scaleTo14 (uint32_t word32Bit) |
| Narrows a 32-bit MIDI 2.0 value to a 14-bit MIDI 1.0 value. More...
|
|
template<typename Callback > |
static void | midi2ToMidi1DefaultTranslation (const View &v, Callback &&callback) |
| Converts UMP messages which may include MIDI 2.0 channel voice messages into equivalent MIDI 1.0 messages (still in UMP format). More...
|
|
Functions to assist conversion of UMP messages to/from other formats, especially older 'bytestream' formatted MidiMessages.
static void universal_midi_packets::Conversion::toMidi1 |
( |
const MidiMessage & |
m, |
|
|
Packets & |
packets |
|
) |
| |
|
static |
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.
References universal_midi_packets::Packets::add(), and toMidi1().
template<typename Callback >
static void universal_midi_packets::Conversion::midi2ToMidi1DefaultTranslation |
( |
const View & |
v, |
|
|
Callback && |
callback |
|
) |
| |
|
static |