| # libkmid Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# NoteArray Class Reference

Holds a resizeable array of note on/off and patch change events. Stores an array of note on/off events. More...

`#include <notearray.h>`

List of all members.

## Public Member Functions
| NoteArray (void)
| Constructor.
| ~NoteArray ()
| Destructor.
void | at (ulong pos, ulong ms, int chn, int cmd, int note)
| Adds (or modifies) an event in the given position .
void | at (ulong pos, noteCmd s)
| A convenience function, which differs from the above in the parameters it accepts.
noteCmd | at (int pos)
| Returns the note event at a given position.
void | add (ulong ms, int chn, int cmd, int note)
| Adds a note/patch event at a given millisecond.
void | iteratorBegin (void)
| Initializes the iterator.
noteCmd * | get (void)
| Get the command currently pointed to by the iterator.
void | next (void)
| Advances the iterator to the next position.
void | moveIteratorTo (ulong ms, int *pgm=NULL)
| Calls next() until the next event is over ms milliseconds and puts in `pgm`[16] the instruments used at this moment.

## Detailed Description

Holds a resizeable array of note on/off and patch change events. Stores an array of note on/off events.

It can increase it size, but it doesn't decreases (until destruction :-) )

Version:
  0.9.5 17/01/2000

Author:
  Antonio Larrosa Jimenez <larrosa@kde.org>

Definition at line 37 of file notearray.h.

## Constructor & Destructor Documentation

NoteArray::NoteArray | ( | void |  | ) |

| Constructor. Initializes internal variables. Definition at line 30 of file notearray.cc.

NoteArray::~NoteArray | ( |  | ) |

| Destructor. Definition at line 37 of file notearray.cc.

## Member Function Documentation

void NoteArray::at | ( | ulong | pos,
|  | ulong | ms,
|  | int | chn,
|  | int | cmd,
|  | int | note
| ) |

| Adds (or modifies) an event in the given position . Note that this has nothing to do with what is being played, this just modifies an internal array. Definition at line 57 of file notearray.cc.

void NoteArray::at | ( | ulong | pos,
|  | noteCmd | s
| ) |

| A convenience function, which differs from the above in the parameters it accepts. Definition at line 66 of file notearray.cc.

NoteArray::noteCmd NoteArray::at | ( | int | pos | ) |

| Returns the note event at a given position. Definition at line 75 of file notearray.cc.

void NoteArray::add | ( | ulong | ms,
|  | int | chn,
|  | int | cmd,
|  | int | note
| ) |

| Adds a note/patch event at a given millisecond. Note: This method always appends at the end of the list. Definition at line 80 of file notearray.cc.

void NoteArray::iteratorBegin | ( | void |  | ) | `[inline]`

| Initializes the iterator. See also: get() next() Definition at line 125 of file notearray.h. Referenced by moveIteratorTo().

noteCmd* NoteArray::get | ( | void |  | ) | `[inline]`

| Get the command currently pointed to by the iterator. Definition at line 130 of file notearray.h. Referenced by moveIteratorTo().

void NoteArray::next | ( | void |  | ) |

| Advances the iterator to the next position. Definition at line 99 of file notearray.cc. Referenced by moveIteratorTo().

void NoteArray::moveIteratorTo | ( | ulong | ms,
|  | int * | pgm = NULL
| ) |

| Calls next() until the next event is over ms milliseconds and puts in `pgm`[16] the instruments used at this moment. Definition at line 105 of file notearray.cc. References get(), iteratorBegin(), and next().

The documentation for this class was generated from the following files:

- notearray.h
- notearray.cc

This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 13:28:40 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001