MIDIsvc
is the class which handles basic MIDI services. There is only
one MIDIsvc
, which is created by the Rogus_McBogus object. You can access it
through Rogus_McBogus' member variable o
.
class MIDIsvc { public: ioref open_input(const char*, Bool allow_sysex=False); ioref open_output(const char* ); ioref open_input(ioref n, Bool allow_sysex=False); ioref open_output(ioref n); ioref open_input(Bool allow_sysex=False); ioref open_output(); ioref output_refnum( const char* ); void closeAllInputs(); void closeAllOutputs(); ioref howManyOutputNodes(); ioref howManyInputNodes(); const char* getOutputNodeName(ioref); const char* getInputNodeName(ioref); static long time(); err_ind setTimecodeInput(ioref, Bool); err_ind unsetTimecodeInput(); void write(const MIDI_msg *m); };
ioref open_input(const char* x, Bool allow_sysex=False)
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. The allow_sysex parameter determines
whether System Exclusive input will be allowed on this input node.
ioref open_output(const char* x)
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, Bool allow_sysex=False)
ioref
has already been obtained, by using the
howManyInputNodes()
and getInputNodeName()
functions (for example, to present the user with a menu of nodes).
Returns the
ioref
of the node. (Not too useful, since you already
knew it.)
ioref open_output( ioref n )
ioref
has already been obtained, by using the
howManyOutputNodes()
and getOutputNodeName()
functions (for example, to present the user with a menu of nodes).
Returns the
ioref
of the node. (Not too useful, since you already
knew it.)
ioref open_input(Bool allow_sysex=False)
user_prefs
).
ioref open_output()
user_prefs
).
ioref output_refnum( const char* x)
open_output
, and is
provided for compatibility with older Rogus code.
void closeAllInputs()
void closeAllOutputs()
ioref howManyOutputNodes()
ioref
s range from zero to this number minus one.
ioref howManyInputNodes()
howManyOutputNodes()
, but for inputs.
char* getOutputNodeName(ioref i)
char* getInputNodeName(ioref i)
static long time()
err_ind setTimecodeInput(ioref i, Bool eat)
i
, which must already be open, to
be listened to for MIDI Time Code messages. If eat
is
True
Rogus will eat the MIDI Time Code messages after it
processes them. (i. e. prevent them from being passed to a parser
which is listening for system messages.) For more information, see Using Rogus with MIDI Time Code.
err_ind unsetTimecodeInput()
void write(const MIDI_msg *m)
m
to the appropriate output node. The output
node must have already been opened.