Loading...
Searching...
No Matches
ump_msg.h File Reference

API library for ALSA rawmidi/UMP interface. More...

Go to the source code of this file.

## Data Structures

struct | _snd_ump_msg_hdr
struct | _snd_ump_msg_midi1_note
struct | _snd_ump_msg_midi1_paf
struct | _snd_ump_msg_midi1_cc
struct | _snd_ump_msg_midi1_program
struct | _snd_ump_msg_midi1_caf
struct | _snd_ump_msg_midi1_pitchbend
struct | snd_ump_msg_system
union | snd_ump_msg_midi1_t
struct | _snd_ump_msg_midi2_note
struct | _snd_ump_msg_midi2_paf
struct | _snd_ump_msg_midi2_per_note_cc
struct | _snd_ump_msg_midi2_per_note_mgmt
struct | _snd_ump_msg_midi2_cc
struct | _snd_ump_msg_midi2_rpn
struct | _snd_ump_msg_midi2_program
struct | _snd_ump_msg_midi2_caf
struct | _snd_ump_msg_midi2_pitchbend
struct | _snd_ump_msg_midi2_per_note_pitchbend
union | snd_ump_msg_midi2_t
struct | _snd_ump_msg_stream_gen
union | snd_ump_msg_stream_t
struct | _snd_ump_msg_flex_data_meta
struct | _snd_ump_msg_set_tempo
struct | _snd_ump_msg_set_time_sig
struct | _snd_ump_msg_set_metronome
struct | _snd_ump_msg_set_key_sig
struct | _snd_ump_msg_set_chord_name
union | snd_ump_msg_flex_data_t
struct | snd_ump_msg_mixed_data_header_t
struct | snd_ump_msg_mixed_data_payload_t
union | snd_ump_msg_mixed_data_t
struct | _snd_ump_msg_jr_clock
struct | _snd_ump_msg_dctpq
struct | _snd_ump_msg_dc
union | snd_ump_msg_utility_t

## Enumerations

enum | { SND_UMP_MIDI2_NOTE_ATTR_NO_DATA = 0x00 , SND_UMP_MIDI2_NOTE_ATTR_MANUFACTURER = 0x01 , SND_UMP_MIDI2_NOTE_ATTR_PROFILE = 0x02 , SND_UMP_MIDI2_NOTE_ATTR_PITCH79 = 0x03 }
enum | { SND_UMP_MIDI2_PNMGMT_RESET_CONTROLLERS = 0x01 , SND_UMP_MIDI2_PNMGMT_DETACH_CONTROLLERS = 0x02 }
enum | { SND_UMP_MSG_TYPE_UTILITY = 0x00 , SND_UMP_MSG_TYPE_SYSTEM = 0x01 , SND_UMP_MSG_TYPE_MIDI1_CHANNEL_VOICE = 0x02 , SND_UMP_MSG_TYPE_DATA = 0x03 , SND_UMP_MSG_TYPE_MIDI2_CHANNEL_VOICE = 0x04 , SND_UMP_MSG_TYPE_EXTENDED_DATA = 0x05 , SND_UMP_MSG_TYPE_FLEX_DATA = 0x0d , SND_UMP_MSG_TYPE_STREAM = 0x0f }

enum

{
SND_UMP_MSG_PER_NOTE_RCC = 0x0 , SND_UMP_MSG_PER_NOTE_ACC = 0x1 , SND_UMP_MSG_RPN = 0x2 , SND_UMP_MSG_NRPN = 0x3 ,
SND_UMP_MSG_RELATIVE_RPN = 0x4 , SND_UMP_MSG_RELATIVE_NRPN = 0x5 , SND_UMP_MSG_PER_NOTE_PITCHBEND = 0x6 , SND_UMP_MSG_NOTE_OFF = 0x8 ,
SND_UMP_MSG_NOTE_ON = 0x9 , SND_UMP_MSG_POLY_PRESSURE = 0xa , SND_UMP_MSG_CONTROL_CHANGE = 0xb , SND_UMP_MSG_PROGRAM_CHANGE = 0xc ,
SND_UMP_MSG_CHANNEL_PRESSURE = 0xd , SND_UMP_MSG_PITCHBEND = 0xe , SND_UMP_MSG_PER_NOTE_MGMT = 0xf
}

enum

{
SND_UMP_MSG_REALTIME = 0xf0 , SND_UMP_MSG_SYSEX_START = 0xf0 , SND_UMP_MSG_MIDI_TIME_CODE = 0xf1 , SND_UMP_MSG_SONG_POSITION = 0xf2 ,
SND_UMP_MSG_SONG_SELECT = 0xf3 , SND_UMP_MSG_TUNE_REQUEST = 0xf6 , SND_UMP_MSG_SYSEX_END = 0xf7 , SND_UMP_MSG_TIMING_CLOCK = 0xf8 ,
SND_UMP_MSG_START = 0xfa , SND_UMP_MSG_CONTINUE = 0xfb , SND_UMP_MSG_STOP = 0xfc , SND_UMP_MSG_ACTIVE_SENSING = 0xfe ,
SND_UMP_MSG_RESET = 0xff
}

enum | { SND_UMP_SYSEX_STATUS_SINGLE = 0 , SND_UMP_SYSEX_STATUS_START = 1 , SND_UMP_SYSEX_STATUS_CONTINUE = 2 , SND_UMP_SYSEX_STATUS_END = 3 }
enum | { SND_UMP_MIXED_DATA_SET_STATUS_HEADER = 8 , SND_UMP_MIXED_DATA_SET_STATUS_PAYLOAD = 9 }
enum | { SND_UMP_UTILITY_MSG_STATUS_NOOP = 0x00 , SND_UMP_UTILITY_MSG_STATUS_JR_CLOCK = 0x01 , SND_UMP_UTILITY_MSG_STATUS_JR_TSTAMP = 0x02 , SND_UMP_UTILITY_MSG_STATUS_DCTPQ = 0x03 , SND_UMP_UTILITY_MSG_STATUS_DC = 0x04 }

enum

{
SND_UMP_STREAM_MSG_STATUS_EP_DISCOVERY = 0x00 , SND_UMP_STREAM_MSG_STATUS_EP_INFO = 0x01 , SND_UMP_STREAM_MSG_STATUS_DEVICE_INFO = 0x02 , SND_UMP_STREAM_MSG_STATUS_EP_NAME = 0x03 ,
SND_UMP_STREAM_MSG_STATUS_PRODUCT_ID = 0x04 , SND_UMP_STREAM_MSG_STATUS_STREAM_CFG_REQUEST = 0x05 , SND_UMP_STREAM_MSG_STATUS_STREAM_CFG = 0x06 , SND_UMP_STREAM_MSG_STATUS_FB_DISCOVERY = 0x10 ,
SND_UMP_STREAM_MSG_STATUS_FB_INFO = 0x11 , SND_UMP_STREAM_MSG_STATUS_FB_NAME = 0x12 , SND_UMP_STREAM_MSG_STATUS_START_CLIP = 0x20 , SND_UMP_STREAM_MSG_STATUS_END_CLIP = 0x21
}

enum | { SND_UMP_STREAM_MSG_REQUEST_EP_INFO = (1U << 0) , SND_UMP_STREAM_MSG_REQUEST_DEVICE_INFO = (1U << 1) , SND_UMP_STREAM_MSG_REQUEST_EP_NAME = (1U << 2) , SND_UMP_STREAM_MSG_REQUEST_PRODUCT_ID = (1U << 3) , SND_UMP_STREAM_MSG_REQUEST_STREAM_CFG = (1U << 4) }
enum | { SND_UMP_STREAM_MSG_REQUEST_FB_INFO = (1U << 0) , SND_UMP_STREAM_MSG_REQUEST_FB_NAME = (1U << 1) }
enum | { SND_UMP_STREAM_MSG_EP_INFO_CAP_TXJR = (1U << 0) , SND_UMP_STREAM_MSG_EP_INFO_CAP_RXJR = (1U << 1) , SND_UMP_STREAM_MSG_EP_INFO_CAP_MIDI1 = (1U << 8) , SND_UMP_STREAM_MSG_EP_INFO_CAP_MIDI2 = (1U << 9) }
enum | { SND_UMP_STREAM_MSG_FORMAT_SINGLE = 0 , SND_UMP_STREAM_MSG_FORMAT_START = 1 , SND_UMP_STREAM_MSG_FORMAT_CONTINUE = 2 , SND_UMP_STREAM_MSG_FORMAT_END = 3 }
enum | { SND_UMP_FLEX_DATA_MSG_FORMAT_SINGLE = 0 , SND_UMP_FLEX_DATA_MSG_FORMAT_START = 1 , SND_UMP_FLEX_DATA_MSG_FORMAT_CONTINUE = 2 , SND_UMP_FLEX_DATA_MSG_FORMAT_END = 3 }
enum | { SND_UMP_FLEX_DATA_MSG_ADDR_CHANNEL = 0 , SND_UMP_FLEX_DATA_MSG_ADDR_GROUP = 1 }
enum | { SND_UMP_FLEX_DATA_MSG_BANK_SETUP = 0 , SND_UMP_FLEX_DATA_MSG_BANK_METADATA = 1 , SND_UMP_FLEX_DATA_MSG_BANK_PERF_TEXT = 2 }
enum | { SND_UMP_FLEX_DATA_MSG_STATUS_SET_TEMPO = 0x00 , SND_UMP_FLEX_DATA_MSG_STATUS_SET_TIME_SIGNATURE = 0x01 , SND_UMP_FLEX_DATA_MSG_STATUS_SET_METRONOME = 0x02 , SND_UMP_FLEX_DATA_MSG_STATUS_SET_KEY_SIGNATURE = 0x05 , SND_UMP_FLEX_DATA_MSG_STATUS_SET_CHORD_NAME = 0x06 }

enum

{
SND_UMP_FLEX_DATA_MSG_STATUS_PROJECT_NAME = 0x01 , SND_UMP_FLEX_DATA_MSG_STATUS_SONG_NAME = 0x02 , SND_UMP_FLEX_DATA_MSG_STATUS_MIDI_CLIP_NAME = 0x03 , SND_UMP_FLEX_DATA_MSG_STATUS_COPYRIGHT_NOTICE = 0x04 ,
SND_UMP_FLEX_DATA_MSG_STATUS_COMPOSER_NAME = 0x05 , SND_UMP_FLEX_DATA_MSG_STATUS_LYRICIST_NAME = 0x06 , SND_UMP_FLEX_DATA_MSG_STATUS_ARRANGER_NAME = 0x07 , SND_UMP_FLEX_DATA_MSG_STATUS_PUBLISHER_NAME = 0x08 ,
SND_UMP_FLEX_DATA_MSG_STATUS_PRIMARY_PERFORMER = 0x09 , SND_UMP_FLEX_DATA_MSG_STATUS_ACCOMPANY_PERFORMAER = 0x0a , SND_UMP_FLEX_DATA_MSG_STATUS_RECORDING_DATE = 0x0b , SND_UMP_FLEX_DATA_MSG_STATUS_RECORDING_LOCATION = 0x0c
}

enum | { SND_UMP_FLEX_DATA_MSG_STATUS_LYRICS = 0x01 , SND_UMP_FLEX_DATA_MSG_STATUS_LYRICS_LANGUAGE = 0x02 , SND_UMP_FLEX_DATA_MSG_STATUS_RUBY = 0x03 , SND_UMP_FLEX_DATA_MSG_STATUS_RUBY_LANGUAGE = 0x04 }

## Functions

struct _snd_ump_msg_hdr | __attribute ((packed)) snd_ump_msg_hdr_t
int | snd_ump_msg_sysex_expand (const uint32_t *ump, uint8_t *buf, size_t maxlen, size_t *filled)
| fill sysex byte from a UMP packet
int | snd_ump_packet_length (unsigned int type)
| return the length of a UMP packet type

## Variables

uint8_t | type
uint8_t | group
uint8_t | status
uint8_t | channel
uint8_t | byte1
uint8_t | byte2
uint8_t | note
uint8_t | velocity
uint8_t | data
uint8_t | index
uint8_t | program
uint8_t | reserved
uint8_t | data_lsb
uint8_t | data_msb
uint8_t | parm1
uint8_t | parm2
uint8_t | attr_type
uint16_t | attr_data
enum { ... } | __attribute
uint8_t | flags
uint8_t | bank
uint16_t | bank_valid
uint8_t | reserved2
uint8_t | bank_msb
uint8_t | bank_lsb
uint16_t | format
uint16_t | data1
uint32_t | data2
uint32_t | data3
uint32_t | data4
uint8_t | addrs
uint8_t | status_bank
uint32_t | tempo
uint8_t | numerator
uint8_t | denominator
uint8_t | num_notes
uint8_t | reserved1
uint8_t | clocks_primary
uint8_t | bar_accent_1
uint8_t | bar_accent_2
uint8_t | bar_accent_3
uint8_t | subdivision_1
uint8_t | subdivision_2
uint8_t | sharps_flats
uint8_t | tonic_note
uint8_t | tonic_sharp
uint8_t | chord_tonic
uint8_t | chord_type
uint8_t | alter1_type
uint8_t | alter1_degree
uint8_t | alter2_type
uint8_t | alter2_degree
uint8_t | alter3_type
uint8_t | alter3_degree
uint8_t | alter4_type
uint8_t | alter4_degree
uint8_t | bass_sharp
uint8_t | bass_note
uint8_t | bass_type
uint8_t | bass_alter1_type
uint8_t | bass_alter1_degree
uint8_t | bass_alter2_type
uint8_t | bass_alter2_degree
uint16_t | time
uint16_t | ticks

## Detailed Description

API library for ALSA rawmidi/UMP interface.

API library for ALSA rawmidi/UMP interface

## Enumeration Type Documentation

## anonymous enum

anonymous enum

MIDI 2.0 Note-on/off attribute type

Enumerator
SND_UMP_MIDI2_NOTE_ATTR_NO_DATA | No attribute data
SND_UMP_MIDI2_NOTE_ATTR_MANUFACTURER | Manufacturer specific
SND_UMP_MIDI2_NOTE_ATTR_PROFILE | Profile specific
SND_UMP_MIDI2_NOTE_ATTR_PITCH79 | Pitch 7.9

## anonymous enum

anonymous enum

MIDI 2.0 per-note management flag bits

Enumerator
SND_UMP_MIDI2_PNMGMT_RESET_CONTROLLERS | Reset (set) per-note controllers
SND_UMP_MIDI2_PNMGMT_DETACH_CONTROLLERS | Detach per-note controllers

## anonymous enum

anonymous enum

UMP Function Block Discovery filter bitmap

## anonymous enum

anonymous enum

UMP Endpoint Info capability bits (used for protocol request/notify, too)

## anonymous enum

anonymous enum

UMP Endpoint / Function Block name string format bits

## anonymous enum

anonymous enum

UMP Flex Data Format bits

## anonymous enum

anonymous enum

UMP Flex Data Address bits

## anonymous enum

anonymous enum

UMP Flex Data Status Bank bits

## anonymous enum

anonymous enum

UMP Flex Data Status bits for Setup (Status Bank = 0)

## anonymous enum

anonymous enum

UMP Flex Data Status bits for Metadata (Status Bank = 1)

## anonymous enum

anonymous enum

UMP Flex Data Status bits for Performance Text Events (Status Bank = 2)

## anonymous enum

anonymous enum

UMP message type

## anonymous enum

anonymous enum

UMP MIDI 1.0 / 2.0 message status code (4bit)

## anonymous enum

anonymous enum

MIDI System / Realtime message status code (8bit)

## anonymous enum

anonymous enum

MIDI 2.0 SysEx / Data Status; same values for both 7-bit and 8-bit SysEx

## anonymous enum

anonymous enum

MIDI 2.0 Mixed Data Set Status

## anonymous enum

anonymous enum

UMP Utility Type Status (type 0x0)

## anonymous enum

anonymous enum

UMP Stream Message Status (type 0xf)

## anonymous enum

anonymous enum

UMP Endpoint Discovery filter bitmap

## Function Documentation

## __attribute()

struct _snd_ump_msg_hdr __attribute | ( | (packed) |  | ) |

general UMP packet header in 32bit word

MIDI 1.0 Note Off / Note On (32bit)

MIDI 1.0 Poly Pressure (32bit)

MIDI 1.0 Control Change (32bit)

MIDI 1.0 Program Change (32bit)

MIDI 1.0 Channel Pressure (32bit)

MIDI 1.0 Pitch Bend (32bit)

System Common and Real Time messages (32bit); no channel field

MIDI 2.0 Note Off / Note On (64bit)

MIDI 2.0 Poly Pressure (64bit)

MIDI 2.0 Per-Note Controller (64bit)

MIDI 2.0 Per-Note Management (64bit)

MIDI 2.0 Control Change (64bit)

MIDI 2.0 Registered Controller (RPN) / Assignable Controller (NRPN) (64bit)

MIDI 2.0 Program Change (64bit)

MIDI 2.0 Channel Pressure (64bit)

MIDI 2.0 Pitch Bend (64bit)

MIDI 2.0 Per-Note Pitch Bend (64bit)

Stream Message (generic) (128bit)

Metadata / Text Message (128bit)

Set Tempo Message (128bit)

Set Time Signature Message (128bit)

Set Metronome Message (128bit)

Set Key Signature Message (128bit)

Set Chord Name Message (128bit)

Jitter Reduction Clock / Timestamp Message (32bit)

Delta Clockstamp Ticks Per Quarter Note (DCTPQ) (32bit)

Delta Clockstamp (DC) (32bit)

## snd_ump_msg_sysex_expand()

int snd_ump_msg_sysex_expand | ( | const uint32_t * | ump,
|  | uint8_t * | buf,
|  | size_t | maxlen,
|  | size_t * | filled )

fill sysex byte from a UMP packet

Parameters

  ump | UMP packet pointer
  buf | buffer point to fill sysex bytes
  maxlen | max buffer size in bytes
  filled | the size of filled sysex bytes on the buffer

Returns
  1 if the sysex finished, otherwise 0

## snd_ump_packet_length()

int snd_ump_packet_length | ( | unsigned int | type | ) |

return the length of a UMP packet type

Parameters

  type | UMP packet type

Returns
  the length of the given UMP packet type in 32bit words (from 1 to 4), or 0 for negative inputs.

## Variable Documentation

## __attribute

struct _snd_ump_msg_dc __attribute

MIDI 2.0 per-note management flag bits

MIDI 1.0 Note Off / Note On (32bit)

MIDI 1.0 Poly Pressure (32bit)

MIDI 1.0 Control Change (32bit)

MIDI 1.0 Program Change (32bit)

MIDI 1.0 Channel Pressure (32bit)

MIDI 1.0 Pitch Bend (32bit)

System Common and Real Time messages (32bit); no channel field

MIDI 2.0 Note Off / Note On (64bit)

MIDI 2.0 Poly Pressure (64bit)

MIDI 2.0 Per-Note Controller (64bit)

MIDI 2.0 Per-Note Management (64bit)

MIDI 2.0 Control Change (64bit)

MIDI 2.0 Registered Controller (RPN) / Assignable Controller (NRPN) (64bit)

MIDI 2.0 Program Change (64bit)

MIDI 2.0 Channel Pressure (64bit)

MIDI 2.0 Pitch Bend (64bit)

MIDI 2.0 Per-Note Pitch Bend (64bit)

Stream Message (generic) (128bit)

Metadata / Text Message (128bit)

Set Tempo Message (128bit)

Set Time Signature Message (128bit)

Set Metronome Message (128bit)

Set Key Signature Message (128bit)

Set Chord Name Message (128bit)

Jitter Reduction Clock / Timestamp Message (32bit)

Delta Clockstamp Ticks Per Quarter Note (DCTPQ) (32bit)

Delta Clockstamp (DC) (32bit)

## addrs

uint8_t addrs

Address

## alter1_degree

uint8_t alter1_degree

Alteration 1 Degree

## alter1_type

uint8_t alter1_type

Alteration 1 Type

## alter2_degree

uint8_t alter2_degree

Alteration 2 Degree

## alter2_type

uint8_t alter2_type

Alteration 2 Type

## alter3_degree

uint8_t alter3_degree

Alteration 3 Degree

## alter3_type

uint8_t alter3_type

Alteration 3 Type

## alter4_degree

uint8_t alter4_degree

Alteration 4 Degree

## alter4_type

uint8_t alter4_type

Alteration 4 Type

## attr_data

uint16_t attr_data

Attribute data (16bit)

## attr_type

uint8_t attr_type

Attribute type

## bank

uint8_t bank

Bank number (7bit)

## bank_lsb

uint8_t bank_lsb

LSB of bank (7bit)

## bank_msb

uint8_t bank_msb

MSB of bank (8bit)

## bank_valid

uint16_t bank_valid

Option flag: bank valid

## bar_accent_1

uint8_t bar_accent_1

Bar accent part 1

## bar_accent_2

uint8_t bar_accent_2

Bar accent part 2

## bar_accent_3

uint8_t bar_accent_3

Bar accent part 3

## bass_alter1_degree

uint8_t bass_alter1_degree

Bass Alteration 1 Degree

## bass_alter1_type

uint8_t bass_alter1_type

Bass Alteration 1 Type

## bass_alter2_degree

uint8_t bass_alter2_degree

Bass Alteration 2 Degree

## bass_alter2_type

uint8_t bass_alter2_type

Bass Alteration 2 Type

## bass_note

uint8_t bass_note

Bass Note

## bass_sharp

uint8_t bass_sharp

Bass Sharps/Flats

## bass_type

uint8_t bass_type

Bass Chord Type

## byte1

uint8_t byte1

First data byte

## byte2

uint8_t byte2

Second data byte

## channel

uint8_t channel

Channel

## chord_tonic

uint8_t chord_tonic

Chord Tonic Note

## chord_type

uint8_t chord_type

Chord Type

## clocks_primary

uint8_t clocks_primary

Num clocks per primary clock

## data

uint32_t data

Pressure (7bit)

Control data (7bit)

Pressure (32bit)

Data (32bit)

Control data (32bit)

Data (96 bits)

Examples
  /test/pcm.c.

## data1

uint16_t data1

Data

## data2

uint32_t data2

Data

## data3

uint32_t data3

Data

## data4

uint32_t data4

Data

## data_lsb

uint8_t data_lsb

LSB of pitchbend (7bit)

## data_msb

uint8_t data_msb

MSB of pitchbend (7bit)

## denominator

uint8_t denominator

Denominator

## flags

uint8_t flags

Option flags (8bit)

## format

uint8_t format

Format

Examples
  /test/latency.c, and /test/pcm.c.

## group

uint32_t group

UMP Group

## index

uint8_t index

Control index (7bit)

Control index (8bit)

## note

uint8_t note

Note (7bit)

## num_notes

uint8_t num_notes

Number of 1/32 notes

## numerator

uint8_t numerator

Numerator

## parm1

uint8_t parm1

First parameter

## parm2

uint8_t parm2

Second parameter

## program

uint8_t program

Program number (7bit)

## reserved

uint8_t reserved

Unused

## reserved1

uint8_t reserved1

Unused

## reserved2

uint32_t reserved2

Unused

## sharps_flats

uint8_t sharps_flats

Sharps/Flats

## status

uint32_t status

Status

Examples
  /test/latency.c, and /test/timer.c.

## status_bank

uint8_t status_bank

Status Bank

## subdivision_1

uint8_t subdivision_1

Num subdivision clicks 1

## subdivision_2

uint8_t subdivision_2

Num subdivision clicks 1

## tempo

uint32_t tempo

Number of 10nsec units per quarter note

## ticks

uint32_t ticks

number of ticks per quarter note

number of ticks since last event

## time

uint16_t time

clock time / timestamp

## tonic_note

uint8_t tonic_note

Tonic Note 1

## tonic_sharp

uint8_t tonic_sharp

Tonic Sharps/Flats

## type

uint32_t type

UMP packet type

## velocity

uint16_t velocity

Velocity (7bit)

Velocity (16bit)