struct snd_ump_group { int group; /* group index (0-based) */ unsignedint dir_bits; /* directions */ bool active; /* activeness */ bool valid; /* valid group (referred by blocks) */ bool is_midi1; /* belongs to a MIDI1 FB */ char name[64]; /* group name */
};
/* for legacy output; need to open the actual substream unlike input */ int legacy_out_opens; struct snd_rawmidi_file legacy_out_rfile; struct ump_cvt_to_ump *out_cvts; #endif
/* UMP EP / FB name string format; same as SysEx string handling */ enum {
UMP_STREAM_MSG_FORMAT_SINGLE = 0,
UMP_STREAM_MSG_FORMAT_START = 1,
UMP_STREAM_MSG_FORMAT_CONTINUE = 2,
UMP_STREAM_MSG_FORMAT_END = 3,
};
/* * Helpers for retrieving / filling bits from UMP
*/ /* get the message type (4bit) from a UMP packet (header) */ staticinlineunsignedchar ump_message_type(u32 data)
{ return data >> 28;
}
/* get the group number (0-based, 4bit) from a UMP packet (header) */ staticinlineunsignedchar ump_message_group(u32 data)
{ return (data >> 24) & 0x0f;
}
/* get the MIDI status code (4bit) from a UMP packet (header) */ staticinlineunsignedchar ump_message_status_code(u32 data)
{ return (data >> 20) & 0x0f;
}
/* get the MIDI channel number (0-based, 4bit) from a UMP packet (header) */ staticinlineunsignedchar ump_message_channel(u32 data)
{ return (data >> 16) & 0x0f;
}
/* get the MIDI status + channel combo byte (8bit) from a UMP packet (header) */ staticinlineunsignedchar ump_message_status_channel(u32 data)
{ return (data >> 16) & 0xff;
}
/* compose a UMP packet (header) from type, group and status values */ staticinline u32 ump_compose(unsignedchar type, unsignedchar group, unsignedchar status, unsignedchar channel)
{ return ((u32)type << 28) | ((u32)group << 24) | ((u32)status << 20) |
((u32)channel << 16);
}
/* get SysEx message status (for both 7 and 8bits) from a UMP packet (header) */ staticinlineunsignedchar ump_sysex_message_status(u32 data)
{ return (data >> 20) & 0xf;
}
/* get SysEx message length (for both 7 and 8bits) from a UMP packet (header) */ staticinlineunsignedchar ump_sysex_message_length(u32 data)
{ return (data >> 16) & 0xf;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.