OpenShot Audio Library | OpenShotAudio: juce::universal_midi_packets::Conversion Struct Reference

OpenShot Audio Library | OpenShotAudio 0.6.0

Loading...
Searching...
No Matches
juce::universal_midi_packets::Conversion Struct Reference

`#include <juce_UMPConversion.h>`

## Static Public Member Functions
template<typename PacketCallbackFunction>
static void | toMidi1 (const BytestreamMidiView &m, PacketCallbackFunction &&callback)
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)

## Detailed Description

Functions to assist conversion of UMP messages to/from other formats, especially older 'bytestream' formatted MidiMessages.

Definition at line 72 of file juce_UMPConversion.h.

## Member Function Documentation

## ◆ midi2ToMidi1DefaultTranslation()

template<typename Callback>

void juce::universal_midi_packets::Conversion::midi2ToMidi1DefaultTranslation | ( | const View & | v,
|  | Callback && | callback )
| 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.

Definition at line 216 of file juce_UMPConversion.h.

## ◆ scaleTo14() [1/2]

uint16_t juce::universal_midi_packets::Conversion::scaleTo14 | ( | uint16_t | word16Bit | ) |
| inlinestatic

Narrows a 32-bit MIDI 2.0 value to a 14-bit MIDI 1.0 value.

Definition at line 201 of file juce_UMPConversion.h.

Referenced by midi2ToMidi1DefaultTranslation().

## ◆ scaleTo14() [2/2]

uint16_t juce::universal_midi_packets::Conversion::scaleTo14 | ( | uint32_t | word32Bit | ) |
| inlinestatic

Narrows a 32-bit MIDI 2.0 value to a 14-bit MIDI 1.0 value.

Definition at line 204 of file juce_UMPConversion.h.

## ◆ scaleTo16() [1/2]

uint16_t juce::universal_midi_packets::Conversion::scaleTo16 | ( | uint16_t | word14Bit | ) |
| inlinestatic

Widens a 14-bit MIDI 1.0 value to a 16-bit MIDI 2.0 value.

Definition at line 161 of file juce_UMPConversion.h.

## ◆ scaleTo16() [2/2]

uint16_t juce::universal_midi_packets::Conversion::scaleTo16 | ( | uint8_t | word7Bit | ) |
| inlinestatic

Widens a 7-bit MIDI 1.0 value to a 16-bit MIDI 2.0 value.

Definition at line 152 of file juce_UMPConversion.h.

## ◆ scaleTo32() [1/2]

uint32_t juce::universal_midi_packets::Conversion::scaleTo32 | ( | uint16_t | word14Bit | ) |
| inlinestatic

Widens a 14-bit MIDI 1.0 value to a 32-bit MIDI 2.0 value.

Definition at line 183 of file juce_UMPConversion.h.

## ◆ scaleTo32() [2/2]

uint32_t juce::universal_midi_packets::Conversion::scaleTo32 | ( | uint8_t | word7Bit | ) |
| inlinestatic

Widens a 7-bit MIDI 1.0 value to a 32-bit MIDI 2.0 value.

Definition at line 170 of file juce_UMPConversion.h.

## ◆ scaleTo7() [1/3]

uint8_t juce::universal_midi_packets::Conversion::scaleTo7 | ( | uint16_t | word16Bit | ) |
| inlinestatic

Narrows a 16-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value.

Definition at line 195 of file juce_UMPConversion.h.

## ◆ scaleTo7() [2/3]

uint8_t juce::universal_midi_packets::Conversion::scaleTo7 | ( | uint32_t | word32Bit | ) |
| inlinestatic

Narrows a 32-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value.

Definition at line 198 of file juce_UMPConversion.h.

## ◆ scaleTo7() [3/3]

uint8_t juce::universal_midi_packets::Conversion::scaleTo7 | ( | uint8_t | word8Bit | ) |
| inlinestatic

Narrows a 16-bit MIDI 2.0 value to a 7-bit MIDI 1.0 value.

Definition at line 192 of file juce_UMPConversion.h.

Referenced by midi2ToMidi1DefaultTranslation().

## ◆ scaleTo8()

uint8_t juce::universal_midi_packets::Conversion::scaleTo8 | ( | uint8_t | word7Bit | ) |
| inlinestatic

Widens a 7-bit MIDI 1.0 value to a 8-bit MIDI 2.0 value.

Definition at line 143 of file juce_UMPConversion.h.

## ◆ toMidi1()

template<typename PacketCallbackFunction>

void juce::universal_midi_packets::Conversion::toMidi1 | ( | const BytestreamMidiView & | m,
|  | PacketCallbackFunction && | callback )
| inlinestatic

Converts from a MIDI 1 bytestream to MIDI 1 on Universal MIDI Packets.

callback is a function which accepts a single View argument.

Definition at line 79 of file juce_UMPConversion.h.

Referenced by juce::universal_midi_packets::BytestreamToUMPDispatcher::dispatch().

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

- juce_UMPConversion.h