class MidiData

A list of MidiEvents. More...

Contains pure virtuals
Full nameTSE3::MidiData
Definition#include <MidiData.h>
InheritsTSE3::Notifier [public ], TSE3::Playable [public ]
Inherited byPhrase, PhraseEdit
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods

Protected Members


Detailed Description

The MidiData class represents a list of MidiEvents 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.

See also: MidiEvent, Phrase, PhraseEdit, MidiDataListener

size_t  size ()

size

[const]

Returns the number of MidiEvents in this MidiData object.

Returns: Number of MidiEvents

MidiEvent const & operator[] (size_t n)

operator[]

[const]

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:
nIndex

Returns: MidiEvent at index n

size_t  index (Clock c)

index

[const]

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

Parameters:
mClock 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'.

PlayableIterator * iterator (Clock index)

iterator

[virtual]

Reimplemented from Playable for internal purposes..

Clock  lastClock ()

lastClock

[const virtual]

Reimplemented from Playable for internal purposes..

 MidiData (int noEvents)

MidiData

[protected]

MidiData objects can only be created by PhraseEdit objects.

 ~MidiData ()

~MidiData

[protected pure virtual]

MidiData & operator= (const MidiData &)

operator=

[protected]

Reimplemented from Playable.

 MidiData (const MidiData &)

MidiData

[protected]

std::vector data

data

[protected]

friend class PhraseEdit

PhraseEdit

[protected]