ScummVM API documentation
EventInfo Struct Reference

#include <midiparser.h>

Public Member Functions

byte channel () const
 Separates the MIDI channel from the event.
 
byte command () const
 Separates the command code from the event.
 

Public Attributes

byte * start
 
uint32 delta
 The number of ticks after the previous event that this event should occur.
 
byte event
 
union {
   struct {
      byte   param1
 The first parameter in a simple MIDI message.
 
      byte   param2
 The second parameter in a simple MIDI message.
 
   }   basic
 
   struct {
      byte   type
 For META events, this indicates the META type.
 
      byte *   data
 For META and SysEx events, this points to the start of the data.
 
   }   ext
 
}; 
 
uint32 length
 
bool loop
 Indicates that this event loops (part of) the MIDI data.
 
bool noop
 

Detailed Description

Provides comprehensive information on the next event in the MIDI stream. An EventInfo struct is instantiated by format-specific implementations of MidiParser::parseNextEvent() each time another event is needed.

Member Data Documentation

◆ start

byte* EventInfo::start

Position in the MIDI stream where the event starts. For delta-based MIDI streams (e.g. SMF and XMIDI), this points to the delta.

◆ event

byte EventInfo::event

Upper 4 bits are the command code, lower 4 bits are the MIDI channel. For META, event == 0xFF. For SysEx, event == 0xF0.

◆ length

uint32 EventInfo::length

For META and SysEx blocks, this indicates the length of the data. For Note On events, a non-zero value indicates that no Note Off event will occur, and the MidiParser will have to generate one itself. For all other events, this value should always be zero.

◆ noop

bool EventInfo::noop

Indicates that no action should be taken for this event (only delta should be handled).


The documentation for this struct was generated from the following file: