OutputUnit
An OutputUnit represents a way of sending MIDI messages to the
synthesizer. An OutputUnit keeps track of the mappings between virtual
to physical channels, and uses these mappings when sending MIDI
messages.
class OutputUnit {
public:
OutputUnit();
~OutputUnit();
uchar& operator()(ioref, int);
void iterate(void (*func)(ioref, int, uchar*, void*), void*);
void write(MIDI_msg);
void write(MIDI_msg, int);
};
OutputUnit()
- The constructor creates an OutputUnit, which by default maps the
virtual channels to physical channels of the same number.
~OutputUnit()
- This destroys the OutputUnit.
T& operator()(ioref n, int c)
- This references the physical channel for node n and virtual
channel c. The channel mapping can be read and modified this way.
void iterate(void (*func)(ioref n, int c, uchar* e, void* x), void* x)
- This iterates over every node/channel combination, and calls func
exactly once for each. func is given the node n, the virtual channel c, the
physical channel e, and the additional pointer x which was passed by
the caller.
void write(MIDI_msg m)
- This sends the MIDI message m to the synthesizer, after first
converting the virtual channel to a physical channel. Meta events are
not actually sent to the synthesizer.
void write(MIDI_msg m, int n)
- This sends n copies (must be greater than or equal to 1) of the
MIDI message m to the synthesizer, after first converting the virtual
channel to a physical channel. Meta events are not actually sent to
the synthesizer.
Modified 27 October 1995 pepellet@mit.edu