OMS_app
The OMS_app is the class which handles basic MIDI I/O. There is only
one OMS_app, which Rogus creates for you, and you can access it
through the global pointer oap. You should never try to
create an OMS_app yourself.
class OMS_app {
public:
ioref open_input( const char* );
ioref open_output( const char* );
ioref open_input( ioref );
ioref open_output( ioref );
ioref open_input();
ioref open_output();
ioref output_refnum( const char* );
void closeAllInputs();
void closeAllOutputs();
int howManyOutputNodes();
char* getOutputNodeName(ioref);
int howManyInputNodes();
char* getInputNodeName(ioref);
static long time();
void write(const MIDI_msg *m);
};
ioref open_input( const char* x)
- Opens the input node named
x. The matching is done as
a case-insensitive substring search. Once the node is open, the active
parser can receive MIDI messages from the node. Returns the
ioref of the node.
ioref open_output( const char* x)
- Opens the output node named
x. The matching is done as
a case-insensitive substring search. Once the node is open, MIDI
messages can be sent to the node with write(). Returns the
ioref of the node.
ioref open_input( ioref n )
- Opens input node
n. This is useful if the
ioref has already been obtained, by using the
howManyInputNodes() and getInputNodeName()
functions. (for example, to present the user with a menu of nodes.)
Once the node is open, the active
parser can receive MIDI messages from the node. Returns the
ioref of the node. (Not too useful, since you already
knew it.)
ioref open_output( ioref n )
- Opens output node
n. This is useful if the
ioref has already been obtained, by using the
howManyOutputNodes() and getOutputNodeName()
functions. (for example, to present the user with a menu of nodes.)
Once the node is open, MIDI
messages can be sent to the node with write(). Returns the
ioref of the node. (Not too useful, since you already
knew it.)
ioref open_input()
- Opens the default input node. (Specified by the global variable
default_input.)
Once the node is open, the active
parser can receive MIDI messages from the node. Returns the
ioref of the node.
ioref open_output( ioref n )
- Opens the default output node. (Specified by the global variable
default_output.)
Once the node is open, MIDI
messages can be sent to the node with write(). Returns the
ioref of the node.
ioref output_refnum( const char* x)
- This is the same thing as
open_output, and is
provided for compatibility with older Rogus code.
void closeAllInputs()
- Closes all open input nodes.
void closeAllOutputs()
- Closes all open output nodes.
int howManyOutputNodes()
- Returns the number of output nodes in the system. Valid output
iorefs range from zero to this number minus one.
char* getOutputNodeName(ioref i)
- Returns the name of output node i.
int howManyInputNodes()
- Returns the number of input nodes in the system. Valid input
iorefs range from zero to this number minus one.
char* getInputNodeName(ioref i)
- Returns the name of input node i.
static long time()
- Returns the current time, as the number of half-milliseconds since
Rogus was started.
void write(const MIDI_msg *m)
- Sends
m to the appropriate output node. The output
node must have already been opened.
Modified 26 May 1996 pepellet@mit.edu