class MidiEcho

Software MIDI Thru port. More...

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

Public Methods


Detailed Description

The MidiEcho class provides a software equivalent to the MIDI Thru port found on some MIDI equipment.

MIDI Thru provides an exact copy of the MIDI data recieved at the MIDI In port allowing a number of MIDI devices to be 'daisy-chained' together.

Many MIDI interfaces, however, do not provide a MIDI Thru capability so the MidiEcho class is used to emulate it in software.

The MidiEcho class contains a MidiFilter to provide some software filtering of the incoming/outgoing data. You can disable the MidiEcho functionality by setting the filter's status to false.

The Transport class creates and maintains an object of this class to do good things.

 MidiEcho (MidiScheduler *scheduler)

MidiEcho

MidiEcho defaults to being off.

Parameters:
schedulerThe MidiScheduler output is sent to.

MidiFilter * filter ()

filter

Returns the MIDI filter that effects MIDI echo.

You can use this filter to force which channel and port the MIDI echo output appears on.

Returns: The MidiEcho object's MidiFilter

int  channel ()

channel

[const]

Returns the channel that MIDI echoing is accepted from. A value of MidiCommand::AllChannels means every channel.

Note that this value doesn't set where MIDI echo output is sent to, but from where it is received.

Returns: Incoming MIDI channel

See also: setChannel

void  setChannel (int c)

setChannel

Sets the channel that MIDI echoing is accepted from.

Note that this value doesn't set where MIDI echo output is sent to, but from where it is received.

Parameters:
cNew incoming MIDI channel

See also: channel

int  port ()

port

[const]

Returns the port that MIDI echoing is accepted from. A value of MidiScheduler::AllPorts means every port.

Note that this value doesn't set where MIDI echo output is sent to, but from where it is received.

Returns: Incoming MIDI port

See also: setPort

void  setPort (int p)

setPort

Sets the port that MIDI echoing is accepted from.

Note that this value doesn't set where MIDI echo output is sent to, but from where it is received.

Parameters:
pNew incoming MIDI port

See also: port

void  echo (MidiEvent command)

echo

Echo the specified command. This method should be called for all recieved MIDI data, as soon as possible after it has been recieved (this is done by the Transport object).

Although the input parameter is a MidiEvent, only the 'data' part, a MidiCommand, is used.

Parameters:
commandThe MIDI command to echo