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

TSE3::MidiMapper Class Reference

MidiEvent port destination mapper. More...

#include <MidiMapper.h>

Inheritance diagram for TSE3::MidiMapper:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MidiMapper ()
virtual ~MidiMapper ()
const int map (int fromPort) const
void setMap (int fromPort, int toPort)
int maximumMap () const
virtual MidiEvent filter (const MidiEvent &me) const
void reset ()

Detailed Description

MidiEvent port destination mapper.

The MidiMapper maintains a table mapping logical port destinations with where should /really/ be sent.

This is used by the Transport class prior to sending an event to a MIDI interface.

This interface allows you to establish arbitrary mappings. For ports that aren't mapped, the mapper will let the event through unchanged.

Author:
Pete Goodliffe
Version:
3.00


Constructor & Destructor Documentation

TSE3::MidiMapper::MidiMapper  ) 
 

The default MidiMapper object performs no mapping whatsoever.

virtual TSE3::MidiMapper::~MidiMapper  )  [virtual]
 


Member Function Documentation

const int TSE3::MidiMapper::map int  fromPort  )  const
 

Returns the mapping for a particular port.

If no mapping has been set for the specified port, the return value will be the same as fromPort.

Parameters:
fromPort port to read mapping for
Returns:
Port number this maps to
See also:
setMap

void TSE3::MidiMapper::setMap int  fromPort,
int  toPort
 

Set the mapping for a particular channel and port

For fromPort, you cannot specify or MidiCommand::AllPorts.

To reset a mapping rule, you can just set fromPort equal to toPort.

Parameters:
fromPort port to set mapping for (MidiCommand::AllPorts to match all)
toPort port to map to
See also:
map

int TSE3::MidiMapper::maximumMap  )  const
 

The MidiMapper holds lists of port mappings. This method returns the maximum port a mapping has been made for.

Returns:
Maximum port number a mapping has been made for

virtual MidiEvent TSE3::MidiMapper::filter const MidiEvent me  )  const [virtual]
 

Implements TSE3::Filter.

void TSE3::MidiMapper::reset  ) 
 

Reset the MidiMapper to a default state (i.e. no mappings).


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