dxd - dynax driver framework 3.0.0d222
cross platform open source driver development framework
Loading...
Searching...
No Matches
dx::midi::ump Namespace Reference

the Universal MIDI Packet: whole 32 bit words, one to four a packet, the message type in the top nibble of the first word saying how many, the group in the nibble below it More...

Classes

struct  circular
 the ring of stamped Universal MIDI Packets: an entry is the stamp in two words, low first, and the words of one packet; a read cuts on whole entries, so a reader never sees a torn one The ring's size is a multiple of the word, so a word never wraps. More...
struct  packet
 one packet with its moment: the dx::timestamp() it arrived at or is due at, the words of the packet, words() how many of them the message takes More...

Enumerations

enum  type : uint8_t {
  utility = 0x0 , system = 0x1 , voice1 = 0x2 , data64 = 0x3 ,
  voice2 = 0x4 , data128 = 0x5 , flex = 0xd , stream = 0xf
}

Functions

uint32_t decode (const uint32_t *src, uint8_t *dst) noexcept
 one packet into MIDI 1.0 bytes: the bytes written returned, 0 for a packet that carries no MIDI 1.0 message (a MIDI 2.0 voice, a utility, a stream) A system exclusive comes out with F0 ahead of a start or a complete packet and F7 behind an end or a complete one; dst holds 8 bytes.
uint32_t encode (uint8_t group, const uint8_t *src, size_t size, uint32_t *dst) noexcept
 MIDI 1.0 bytes into packets on a group: one message per call, the words it takes returned - a channel voice or system message one word, a system exclusive of n bytes (F0 and F7 included) ceil(n- 2, 6) words in pairs dst holds room for the packets; 0 for a message the bytes do not complete.
constexpr uint8_t following (uint8_t status) noexcept
 the data bytes a MIDI 1.0 status byte is followed by (system exclusive open ended: 0xff)
constexpr uint8_t group (uint32_t word0) noexcept
constexpr uint8_t type (uint32_t word0) noexcept
constexpr uint8_t words (uint32_t word0) noexcept
 the words a packet holds, by the message type of its first word

Detailed Description

the Universal MIDI Packet: whole 32 bit words, one to four a packet, the message type in the top nibble of the first word saying how many, the group in the nibble below it

The ring ump carries packets word by word; read() cuts on whole packets, so a reader never sees a torn one. encode()/decode() translate the MIDI 1.0 byte stream (channel voice, system common and real time, system exclusive) to and from the packets that carry it - what a bus speaking UMP says of a MIDI 1.0 device.

Enumeration Type Documentation

◆ type

Enumerator
utility 

NOOP, JR clock and timestamp.

system 

system common and real time

voice1 

MIDI 1.0 channel voice.

data64 

system exclusive in 7 bit, 64 bit packets

voice2 

MIDI 2.0 channel voice.

data128 

8 bit data and mixed data set

flex 

flex data

stream 

endpoint discovery and stream configuration

Function Documentation

◆ decode()

uint32_t dx::midi::ump::decode ( const uint32_t * src,
uint8_t * dst )
inlinenoexcept

one packet into MIDI 1.0 bytes: the bytes written returned, 0 for a packet that carries no MIDI 1.0 message (a MIDI 2.0 voice, a utility, a stream) A system exclusive comes out with F0 ahead of a start or a complete packet and F7 behind an end or a complete one; dst holds 8 bytes.

Here is the call graph for this function:

◆ encode()

uint32_t dx::midi::ump::encode ( uint8_t group,
const uint8_t * src,
size_t size,
uint32_t * dst )
inlinenoexcept

MIDI 1.0 bytes into packets on a group: one message per call, the words it takes returned - a channel voice or system message one word, a system exclusive of n bytes (F0 and F7 included) ceil(n- 2, 6) words in pairs dst holds room for the packets; 0 for a message the bytes do not complete.

Here is the call graph for this function:

◆ following()

uint8_t dx::midi::ump::following ( uint8_t status)
inlineconstexprnoexcept

the data bytes a MIDI 1.0 status byte is followed by (system exclusive open ended: 0xff)

Here is the caller graph for this function:

◆ group()

uint8_t dx::midi::ump::group ( uint32_t word0)
inlineconstexprnoexcept
Here is the caller graph for this function:

◆ type()

uint8_t dx::midi::ump::type ( uint32_t word0)
inlineconstexprnoexcept

◆ words()

uint8_t dx::midi::ump::words ( uint32_t word0)
inlineconstexprnoexcept

the words a packet holds, by the message type of its first word

Here is the caller graph for this function:

(c) copyright 2009 dynamic acoustics e.U. generated on

a closed source license may be obtained by requesting a written permission from dynamic acoustics e.U.
however - governmental use generally and military use especially is strictly prohibited though.