- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::Midi::CMidiEventList Class Reference

Inheritance diagram for Exponent::Midi::CMidiEventList:

List of all members.

## Detailed Description

Provides handling for a buffers worth of midi.

Can be filled at the start of a buffer with the midi information
and can then provides extra information about those buffers
This is an optimised version of a midi event list, used and designed for real time application
(such as inside a VST plugin). It is not designed for long pieces of midi data, which will break
the size constraints of the event list (

See also:
  CMIDI_EVENT_LIST_MAX_EVENTS).
  Although it does handle midi channel its other handling is somewhat dubious and is definately not meant
  for use when reading or writing midi files.

  CMidiFile

  CMidiSequence

  CMidiTrack

Date:
  29/08/2004

Author:
  Paul Chana

Version:
  1.0.0 Initial version

  1.0.1 Added the getIterationObject function

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CMidiEventList.hpp,v 1.4 2007/02/08 21:08:09 paul Exp

Definition at line 46 of file CMidiEventList.hpp.

## Public Member Functions

- void clearEvents ()
- CMidiEventList ()
- const CMidiEvent * getEventAtIndex (const long index) const
- long getMidiChannel () const
- const CMidiEvent * getNextEvent () const
- long getNumberOfEvents ()
- virtual void getObjectDescription (char *string, const long size) const
- long getTimeDeltaDifference () const
- bool moreEvents () const
- void moveToNextEvent ()
- void setMidiChannel (const long midiChannel)
- virtual ~CMidiEventList ()

## Static Public Attributes

- static const long CMIDI_EVENT_LIST_MAX_EVENTS = 128

## Protected Attributes

- long m_currentEvent
- CMidiEvent m_list [CMIDI_EVENT_LIST_MAX_EVENTS]
- long m_midiChannel
- long m_numberOfEvents

## Constructor & Destructor Documentation

Exponent::Midi::CMidiEventList::CMidiEventList | ( |  | ) |

Construction

virtual Exponent::Midi::CMidiEventList::~CMidiEventList | ( |  | ) | `[virtual]`

Destruction

## Member Function Documentation

void Exponent::Midi::CMidiEventList::clearEvents | ( |  | ) |

Clear all events

const CMidiEvent* Exponent::Midi::CMidiEventList::getEventAtIndex | ( | const long | index | ) | const

Get an event at a location

Parameters:

  | index | The index of the event

Return values:

  | const | CMidiEvent* The event or null if index range error

long Exponent::Midi::CMidiEventList::getMidiChannel | ( |  | ) | const`[inline]`

Get the midi channel

Return values:

  | long | The midi channel

Definition at line 99 of file CMidiEventList.hpp.

References m_midiChannel.

Referenced by Exponent::Vst::CVstEffect::getMidiChannel().

const CMidiEvent* Exponent::Midi::CMidiEventList::getNextEvent | ( |  | ) | const

Get the next event

Return values:

  | const | CMidiEvent* The next midi event or NULL if no more midi events

long Exponent::Midi::CMidiEventList::getNumberOfEvents | ( |  | ) | `[inline]`

Get the number of events

Return values:

  | long | The number of events for this buffer

Definition at line 105 of file CMidiEventList.hpp.

References m_numberOfEvents.

virtual void Exponent::Midi::CMidiEventList::getObjectDescription | ( | char * | string,
|  | const long | size |
| ) |  |  | const`[virtual]`

Get a description of the object

Parameters:

  | string | On return is filled with the description
  | size | The size of the stirng

Reimplemented from Exponent::Basics::CCountedObject.

long Exponent::Midi::CMidiEventList::getTimeDeltaDifference | ( |  | ) | const

Get the time different between the selected node and the next node. Assumed sorted list

Return values:

  | long | The delta difference

bool Exponent::Midi::CMidiEventList::moreEvents | ( |  | ) | const

Are there more events

Return values:

  | bool | True if there are more events

void Exponent::Midi::CMidiEventList::moveToNextEvent | ( |  | ) |

Increment to next event

void Exponent::Midi::CMidiEventList::setMidiChannel | ( | const long | midiChannel | ) | `[inline]`

Set the midi channel, events not on this midi channel are ignored

Parameters:

  | midiChannel | The midi channel to use

Definition at line 93 of file CMidiEventList.hpp.

References m_midiChannel.

## Member Data Documentation

const long Exponent::Midi::CMidiEventList::CMIDI_EVENT_LIST_MAX_EVENTS = 128`[static]`

Maximum events per buffer

Definition at line 58 of file CMidiEventList.hpp.

long Exponent::Midi::CMidiEventList::m_currentEvent`[protected]`

The current event

Definition at line 149 of file CMidiEventList.hpp.

CMidiEvent Exponent::Midi::CMidiEventList::m_list[CMIDI_EVENT_LIST_MAX_EVENTS]`[protected]`

The midi event list

Definition at line 146 of file CMidiEventList.hpp.

long Exponent::Midi::CMidiEventList::m_midiChannel`[protected]`

Channel we will respond to

Definition at line 147 of file CMidiEventList.hpp.

Referenced by getMidiChannel(), and setMidiChannel().

long Exponent::Midi::CMidiEventList::m_numberOfEvents`[protected]`

How many events do we have

Definition at line 148 of file CMidiEventList.hpp.

Referenced by getNumberOfEvents().