MIDI::Track Class Reference

Tracks are sequences of events. More...

#include <Track.h>

Inherits MIDI::Chunk.

Collaboration diagram for MIDI::Track:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Track ()
 Default Constructor.
 Track (byte *data, dword size)
 Constructor.
unsigned int numEvents ()
Eventevent (unsigned int id)
void addEvent (Event *event)
DataBuffer data ()

Detailed Description

Tracks are sequences of events.

There are three types of events

Definition at line 44 of file Track.h.


Constructor & Destructor Documentation

MIDI::Track::Track (  ) 

Default Constructor.

Creates an empty track with 0 events

Definition at line 37 of file Track.cpp.

MIDI::Track::Track ( byte data,
dword  size 
)

Constructor.

Parses data for events and stores them.

Parameters:
data The data
size Number of bytes of data

Definition at line 40 of file Track.cpp.


Member Function Documentation

void MIDI::Track::addEvent ( Event event  ) 

Add a new event to the end of the track. The new event is pushed at the end of the list.

Parameters:
event New event

Definition at line 155 of file Track.cpp.

DataBuffer MIDI::Track::data (  )  [virtual]
Returns:
This track represented as data in a MIDI file

Reimplemented from MIDI::Chunk.

Definition at line 187 of file Track.cpp.

Event * MIDI::Track::event ( unsigned int  id  ) 

Events are stored in the same order as they are found in the MIDI file.

Returns:
Event number id

Definition at line 150 of file Track.cpp.

unsigned int MIDI::Track::numEvents (  ) 
Returns:
Number of events in this track.

Definition at line 145 of file Track.cpp.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Typedefs Enumerations Enumerator Defines

Generated on Tue Jan 5 16:09:42 2010 for libmidi by  doxygen 1.6.1