typedef struct { WORD wTag; DWORD dwTicks; BYTE Event; BYTE DataSize; union { BYTE Data[4]; LPBYTE lpData; }; } BRELS_MIDI_EVENT, *LPBRELS_MIDI_EVENT;
This structure is used to represent MIDI events in the API. It is more convenient than the MIDIEVENT structure provided by the Windows™ API.
BYTE
array containing the data of short events (those between 0x80 and 0xEF, and above 0xF0).BYTE
array containing the data of long events (those below 0x80 and the system-exclusive event, 0xF0)Use the correct data size when creating MIDI files otherwise the sequence will be encoded incorrectly.
Short events are the ones with predefined sizes, generally zero, one or two bytes. Long events are the ones with variable sizes, such as names and texts inserted in the sequence. However, some events do have predefined sizes but are considered long events due to the MIDI specification. That is the case of tempo (0x51), which is three bytes long.
For an example of code, see MidiInsertTrackEvents
Released in November 19th, 2003
Updated in April 29th, 2004
Property of Breno de Lima Sarmento
Home page: http://www27.brinkster.com/brels
E-mail: [email protected]
ICQ: 78977999 ()