Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

TSE3::MidiData Class Reference

A list of MidiEvents. More...

#include <MidiData.h>

Inheritance diagram for TSE3::MidiData:

Inheritance graph
[legend]
Collaboration diagram for TSE3::MidiData:

Collaboration graph
[legend]
List of all members.

Public Member Functions

size_t size () const
MidiEvent const & operator[] (size_t n) const
size_t index (Clock c) const
virtual PlayableIteratoriterator (Clock index)
virtual Clock lastClock () const

Protected Member Functions

 MidiData (int noEvents)
virtual ~MidiData ()=0
MidiDataoperator= (const MidiData &)
 MidiData (const MidiData &)

Protected Attributes

std::vector< MidiEventdata

Friends

class PhraseEdit

Detailed Description

A list of MidiEvents.

The MidiData class represents a list of in time order. It is an abstract base class, notably implemented by Phrase and PhraseEdit.

MidiData objects are not designed to be editable. Only the PhraseEdit class defines an editable MidiData object.

MidiData does not implement the Playable interface. This is for a very good reason: more than one Part may be using a given Phrase at the same time. The Playable interface doesn't provide an 'iterator' type so only one client can play a Playable at once. Therefore MidiData doesn't implement Playable. It's a piece of cake to use, anyway.

Author:
Pete Goodliffe
Version:
3.00
See also:
MidiEvent

Phrase

PhraseEdit

MidiDataListener


Constructor & Destructor Documentation

TSE3::MidiData::MidiData int  noEvents  )  [protected]
 

MidiData objects can only be created by PhraseEdit objects.

virtual TSE3::MidiData::~MidiData  )  [protected, pure virtual]
 

TSE3::MidiData::MidiData const MidiData  )  [protected]
 


Member Function Documentation

size_t TSE3::MidiData::size  )  const [inline]
 

Returns the number of in this MidiData object.

Returns:
Number of

MidiEvent const& TSE3::MidiData::operator[] size_t  n  )  const [inline]
 

Returns the nth MidiEvent in this MidiData object.

The value returned for an index that is out of range is undefined. The size method describes the valid values.

Parameters:
n Index
Returns:
MidiEvent at index n

size_t TSE3::MidiData::index Clock  c  )  const
 

Returns the index of the first event that occurs after the given Clock.

Parameters:
m Clock value to search for.
Returns:
Index of first MidiEvent at or after this time. If past the end of the MidiData object then returns 'size'.

virtual PlayableIterator* TSE3::MidiData::iterator Clock  index  )  [virtual]
 

Implements TSE3::Playable.

virtual Clock TSE3::MidiData::lastClock  )  const [virtual]
 

Implements TSE3::Playable.

MidiData& TSE3::MidiData::operator= const MidiData  )  [protected]
 


Friends And Related Function Documentation

friend class PhraseEdit [friend]
 

Reimplemented in TSE3::Phrase.


Member Data Documentation

std::vector<MidiEvent> TSE3::MidiData::data [protected]
 


The documentation for this class was generated from the following file:
Generated on Wed May 25 14:46:27 2005 for TSE3 by doxygen 1.3.2