BRELS_MIDI_EVENT

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.

Members

Remarks

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.

Example

For an example of code, see MidiInsertTrackEvents


Further information

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 ()