Release 2.0  Copyright ã1991 by NeXT Computer, Inc.  All Rights Reserved.

MIDI Driver C Functions

The MIDI library C functions are grouped below in four sections:

·	Setup and Generic Operations
·	Receiving and Transmitting MIDI Data
·	Handling Replies
·	Timer Operations

Within each section, the functions are listed alphabetically.

The application programming interface for these functions contains several data types, constants, and structures that are defined in various system header files:

typedef int port_type_t;	<kern/std_types.h>
typedef int kern_return_t;	<machine/kern_return.h>
typedef unsigned int boolean_t;	<next/boolean.h>
#define TRUE ((boolean_t) 1)	<sys/boolean.h>
#define FALSE ((boolean_t) 0)	<sys/boolean.h>
typedef int port_name_t;	<sys/port.h>
typedef port_name_t port_t;	<sys/port.h>
typedef struct {...} msg_header_t;	<sys/message.h>
struct timeval {	<sys/time.h>
    long tv_sec; /* seconds */
    long tv_usec; /* and microseconds */
};

The file <midi/midi_types.h> contains additional data type definitions, including:

typedef port_t midi_dev_t;
typedef port_t midi_rx_t;
typedef port_t midi_time_t;
typedef struct timeval timeval_t;

<midi/midi_types.h> defines many constants, as well as the midi_raw_t, midi_cooked_t, and midi_packed_t structures.  It also gives the definitions of the midi_reply_t and midi_timer_reply_t structures, which are repeated below for convenience in the section ªHandling Replies.º