Zephyr Project API 4.0.99
A Scalable Open Source RTOS
|
Universal MIDI Packet definitions. More...
Modules | |
MIDI commands | |
Message types | |
System common and System Real Time message status | |
Data Structures | |
struct | midi_ump |
Universal MIDI Packet container. More... | |
Macros | |
#define | UMP_MT(ump) ((ump).data[0] >> 28) |
Message Type field of a Universal MIDI Packet. | |
#define | UMP_NUM_WORDS_LOOKUP_TABLE |
There are 16 UMP message types, each of which can be 1 to 4 uint32 long. | |
#define | UMP_NUM_WORDS(ump) (1 + ((UMP_NUM_WORDS_LOOKUP_TABLE >> (2 * UMP_MT(ump))) & 3)) |
Size of a Universal MIDI Packet, in 32bit words. | |
#define | UMP_GROUP(ump) (((ump).data[0] >> 24) & 0x0f) |
MIDI group field of a Universal MIDI Packet. | |
#define | UMP_MIDI_STATUS(ump) (((ump).data[0] >> 16) & 0xff) |
Status byte of a MIDI channel voice or system message. | |
#define | UMP_MIDI_COMMAND(ump) (UMP_MIDI_STATUS(ump) >> 4) |
Command of a MIDI channel voice message. | |
#define | UMP_MIDI_CHANNEL(ump) (UMP_MIDI_STATUS(ump) & 0x0f) |
Channel of a MIDI channel voice message. | |
#define | UMP_MIDI1_P1(ump) (((ump).data[0] >> 8) & 0x7f) |
First parameter of a MIDI1 channel voice or system message. | |
#define | UMP_MIDI1_P2(ump) ((ump).data[0] & 0x7f) |
Second parameter of a MIDI1 channel voice or system message. | |
#define | UMP_MIDI1_CHANNEL_VOICE(group, command, channel, p1, p2) |
Initialize a UMP with a MIDI1 channel voice message. | |
#define | UMP_SYS_RT_COMMON(group, status, p1, p2) |
Initialize a UMP with a System Real Time and System Common Message. | |
Universal MIDI Packet definitions.
#define UMP_GROUP | ( | ump | ) | (((ump).data[0] >> 24) & 0x0f) |
#include <include/zephyr/audio/midi.h>
MIDI group field of a Universal MIDI Packet.
[in] | ump | Universal MIDI Packet |
#define UMP_MIDI1_CHANNEL_VOICE | ( | group, | |
command, | |||
channel, | |||
p1, | |||
p2 | |||
) |
#include <include/zephyr/audio/midi.h>
Initialize a UMP with a MIDI1 channel voice message.
group | The UMP group |
command | The MIDI1 command |
channel | The MIDI1 channel number |
p1 | The 1st MIDI1 parameter |
p2 | The 2nd MIDI1 parameter |
#define UMP_MIDI1_P1 | ( | ump | ) | (((ump).data[0] >> 8) & 0x7f) |
#include <include/zephyr/audio/midi.h>
First parameter of a MIDI1 channel voice or system message.
[in] | ump | Universal MIDI Packet (containing a MIDI1 message) |
#define UMP_MIDI1_P2 | ( | ump | ) | ((ump).data[0] & 0x7f) |
#include <include/zephyr/audio/midi.h>
Second parameter of a MIDI1 channel voice or system message.
[in] | ump | Universal MIDI Packet (containing a MIDI1 message) |
#define UMP_MIDI_CHANNEL | ( | ump | ) | (UMP_MIDI_STATUS(ump) & 0x0f) |
#include <include/zephyr/audio/midi.h>
Channel of a MIDI channel voice message.
[in] | ump | Universal MIDI Packet (containing a MIDI event) |
#define UMP_MIDI_COMMAND | ( | ump | ) | (UMP_MIDI_STATUS(ump) >> 4) |
#include <include/zephyr/audio/midi.h>
Command of a MIDI channel voice message.
[in] | ump | Universal MIDI Packet (containing a MIDI event) |
#define UMP_MIDI_STATUS | ( | ump | ) | (((ump).data[0] >> 16) & 0xff) |
#include <include/zephyr/audio/midi.h>
Status byte of a MIDI channel voice or system message.
[in] | ump | Universal MIDI Packet (containing a MIDI1 event) |
#define UMP_MT | ( | ump | ) | ((ump).data[0] >> 28) |
#include <include/zephyr/audio/midi.h>
Message Type field of a Universal MIDI Packet.
[in] | ump | Universal MIDI Packet |
#define UMP_NUM_WORDS | ( | ump | ) | (1 + ((UMP_NUM_WORDS_LOOKUP_TABLE >> (2 * UMP_MT(ump))) & 3)) |
#include <include/zephyr/audio/midi.h>
Size of a Universal MIDI Packet, in 32bit words.
[in] | ump | Universal MIDI Packet |
#define UMP_NUM_WORDS_LOOKUP_TABLE |
#include <include/zephyr/audio/midi.h>
There are 16 UMP message types, each of which can be 1 to 4 uint32 long.
Hence this packed representation of 16x2b array as an uint32 lookup table
#define UMP_SYS_RT_COMMON | ( | group, | |
status, | |||
p1, | |||
p2 | |||
) |
#include <include/zephyr/audio/midi.h>
Initialize a UMP with a System Real Time and System Common Message.
group | The UMP group |
status | The status byte |
p1 | The 1st parameter |
p2 | The 2nd parameter |