class MidiMapper

MidiEvent port destination mapper. More...

Full nameTSE3::MidiMapper
Definition#include <MidiMapper.h>
InheritsTSE3::Filter [public ], TSE3::Notifier [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

The MidiMapper maintains a table mapping logical port destinations with where MidiEvents 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.

 MidiMapper ()

MidiMapper

The default MidiMapper object performs no mapping whatsoever.

 ~MidiMapper ()

~MidiMapper

[virtual]

const int  map (int fromPort)

map

[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:
fromPortport to read mapping for

Returns: Port number this maps to

See also: setMap

void  setMap (int fromPort, int toPort)

setMap

Set the mapping for a particular channel and port

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

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

Parameters:
fromPortport to set mapping for (MidiCommand::AllPorts to match all)
toPortport to map to

See also: map

int  maximumMap ()

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

MidiEvent  filter (const MidiEvent &me)

filter

[const virtual]

Reimplemented from Filter for internal purposes..

void  reset ()

reset

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