jMax documentation
Main Page   Modules   File List  

MIDI port i/o

MIDI port i/o classes listening or sending events to a MIDI port. More...

Refering to a MIDI port

Functions for objects refering to MIDI port as input (listeners) or output.

MIDI port listeners

Functions used by objects listening to a MIDI port

MIDI port output

Functions used by objects to output events through a MIDI port

Detailed Description

MIDI port i/o classes listening or sending events to a MIDI port.

The API documented by this module permits to implement objects refering to MIDI port. These objects can receive events from the MIDI port and send events from the MIDI port.

An i/o object can check if a given object implements an FTS MIDI port and whether it is an input and/or an output using the functions fts_object_is_midiport(), fts_midiport_is_input() and fts_midiport_is_output(). The API provides functions for declaring an object as a listener to a MIDI port (see fts_bytestream_add_listener()) and output functions sending events out of a MIDI port (see fts_midiport_output_note()).


Function Documentation

void fts_midiport_add_listener_channel_pressure ( fts_midiport_t * port,
int chan,
fts_object_t * obj,
fts_midiport_channel_fun_t fun )
 

Register channel pressure change event listener to a MIDI port.

See also:
fts_midiport_add_listener_note()

void fts_midiport_add_listener_control_change ( fts_midiport_t * port,
int chan,
int num,
fts_object_t * obj,
fts_midiport_poly_fun_t fun )
 

Register controller change event listener to a MIDI port.

See also:
fts_midiport_add_listener_note()

void fts_midiport_add_listener_note ( fts_midiport_t * port,
int chan,
int num,
fts_object_t * obj,
fts_midiport_poly_fun_t fun )
 

Register note event listener to a MIDI port.

In order to receive incoming MIDI messages of a certain type and channel from a MIDI port, an FTS object registeres itself as a listener to the MIDI port using this function.

Parameters:
port   the listened MIDI port
chan   the listened MIDI channel (1..16, MIDIPORT_ALL_CHANNELS for omni)
num   the listened MIDI note or controller number (0..127, MIDIPORT_ALL_NUMBERS for omni)
obj   the listening object
fun   listener function to be called for incoming MIDI messages of the given MIDI type and channel

void fts_midiport_add_listener_pitch_bend ( fts_midiport_t * port,
int chan,
fts_object_t * obj,
fts_midiport_channel_fun_t fun )
 

Register system exclusive data event listener to a MIDI port.

See also:
fts_midiport_add_listener_note()

void fts_midiport_add_listener_poly_pressure ( fts_midiport_t * port,
int chan,
int num,
fts_object_t * obj,
fts_midiport_poly_fun_t fun )
 

Register poly pressure change event listener to a MIDI port.

See also:
fts_midiport_add_listener_note()

void fts_midiport_add_listener_program_change ( fts_midiport_t * port,
int chan,
fts_object_t * obj,
fts_midiport_channel_fun_t fun )
 

Register program change event listener to a MIDI port.

See also:
fts_midiport_add_listener_note()

void fts_midiport_add_listener_system_exclusive ( fts_midiport_t * port,
fts_object_t * obj,
fts_midiport_sysex_fun_t fun )
 

Register system exclusive data event listener to a MIDI port.

See also:
fts_midiport_add_listener_note()

int fts_midiport_is_input ( fts_midiport_t * port )
 

Check whether an FTS MIDI port is an input.

Parameters:
port   the MIDI port to be checked
Returns:
non-zero if port is input

int fts_midiport_is_output ( fts_midiport_t * port )
 

Check whether an FTS MIDI port is an input.

Parameters:
port   the MIDI port to be checked
Returns:
non-zero if port is input

void fts_midiport_output_channel_pressure ( fts_midiport_t * port,
int channel,
int value,
double time )
 

Output channel pressure change event via a MIDI port.

See also:
fts_midiport_output_note()

void fts_midiport_output_control_change ( fts_midiport_t * port,
int channel,
int number,
int value,
double time )
 

Output controller change event via a MIDI port.

See also:
fts_midiport_output_note()

void fts_midiport_output_note ( fts_midiport_t * port,
int channel,
int number,
int value,
double time )
 

Output note event via a MIDI port.

Parameters:
port   the MIDI port
channel   the MIDI channel of the incoming event
number   the MIDI note or controller number of the incoming event
value   the velocity, pressure, controller, program or pitch bend value of the incoming event
time   an offset time of the incoming MIDI event (in msec) regarding the current logical (tick) time

void fts_midiport_output_pitch_bend ( fts_midiport_t * port,
int channel,
int bend,
double time )
 

Output system exclusive data event via a MIDI port.

See also:
fts_midiport_output_note()

void fts_midiport_output_poly_pressure ( fts_midiport_t * port,
int channel,
int number,
int value,
double time )
 

Output poly pressure change event via a MIDI port.

See also:
fts_midiport_output_note()

void fts_midiport_output_program_change ( fts_midiport_t * port,
int channel,
int value,
double time )
 

Output program change event via a MIDI port.

See also:
fts_midiport_output_note()

void fts_midiport_output_system_exclusive_byte ( fts_midiport_t * port,
int value )
 

Add byte to the sysex buffer output buffer.

See also:
fts_midiport_output_system_exclusive_call()

void fts_midiport_output_system_exclusive_flush ( fts_midiport_t * port,
double time )
 

Flush system exclusive output buffer and output system exclusive event via a MIDI port.

See also:
fts_midiport_output_system_exclusive_byte()

void fts_midiport_remove_listener_channel_pressure ( fts_midiport_t * port,
int chan,
fts_object_t * obj )
 

Remove channel pressure change event listener from a MIDI port.

See also:
fts_midiport_remove_listener_note()

void fts_midiport_remove_listener_control_change ( fts_midiport_t * port,
int chan,
int num,
fts_object_t * obj )
 

Remove controller change event listener from a MIDI port.

See also:
fts_midiport_remove_listener_note()

void fts_midiport_remove_listener_note ( fts_midiport_t * port,
int chan,
int num,
fts_object_t * obj )
 

Remove note event listener from a MIDI port.

An object listening to a MIDI port must be removed as listener before being destroyed. Typically this is done in the object's delete method.

Parameters:
port   the listened MIDI port
chan   the listened MIDI channel (1..16, MIDIPORT_ALL_CHANNELS for omni)
num   the listened MIDI note or controller number (0..127, MIDIPORT_ALL_NUMBERS for omni)
obj   the listening object

void fts_midiport_remove_listener_pitch_bend ( fts_midiport_t * port,
int chan,
fts_object_t * obj )
 

Remove system exclusive data event listener from a MIDI port.

See also:
fts_midiport_remove_listener_note()

void fts_midiport_remove_listener_poly_pressure ( fts_midiport_t * port,
int chan,
int num,
fts_object_t * obj )
 

Remove poly pressure change event listener from a MIDI port.

See also:
fts_midiport_remove_listener_note()

void fts_midiport_remove_listener_program_change ( fts_midiport_t * port,
int chan,
fts_object_t * obj )
 

Remove program change event listener from a MIDI port.

See also:
fts_midiport_remove_listener_note()

void fts_midiport_remove_listener_system_exclusive ( fts_midiport_t * port,
fts_object_t * obj )
 

Remove system exclusive data event listener from a MIDI port.

See also:
fts_midiport_remove_listener_note()

int fts_object_is_midiport ( fts_object_t * obj )
 

Check whether an FTS object implements the MIDI port abstraction.

An object who wants to listen to or output via a MIDI port should check if the object it referes to implements the MIDI port abstraction

Parameters:
obj   the object to be checked
Returns:
non-zero if object implements an FTS MIDI port


jMax server kernel documentation (FTS 2.5)
Generated 4 Jul 2001 Wed Jul 4 13:07:06 2001 by Doxygen 1.2.3 written by Dimitri van Heesch.