Loading...
Searching...
No Matches
Realtime Midi I/O

## Functions

PUBLIC void | csoundSetMIDIModule (CSOUND *csound, const char *module)
| Sets the current MIDI IO module.
PUBLIC void | csoundSetHostImplementedMIDIIO (CSOUND *csound, int state)
| call this function with state 1 if the host is implementing MIDI via the callbacks below.
PUBLIC int | csoundGetMIDIDevList (CSOUND *csound, CS_MIDIDEVICE *list, int isOutput)
| This function can be called to obtain a list of available input or output midi devices.
PUBLIC void | csoundSetExternalMidiInOpenCallback (CSOUND *, int(*func)(CSOUND *, void **userData, const char *devName))
| Sets callback for opening real time MIDI input.
PUBLIC void | csoundSetExternalMidiReadCallback (CSOUND *, int(*func)(CSOUND *, void *userData, unsigned char *buf, int nBytes))
| Sets callback for reading from real time MIDI input.
PUBLIC void | csoundSetExternalMidiInCloseCallback (CSOUND *, int(*func)(CSOUND *, void *userData))
| Sets callback for closing real time MIDI input.
PUBLIC void | csoundSetExternalMidiOutOpenCallback (CSOUND *, int(*func)(CSOUND *, void **userData, const char *devName))
| Sets callback for opening real time MIDI output.
PUBLIC void | csoundSetExternalMidiWriteCallback (CSOUND *, int(*func)(CSOUND *, void *userData, const unsigned char *buf, int nBytes))
| Sets callback for writing to real time MIDI output.
PUBLIC void | csoundSetExternalMidiOutCloseCallback (CSOUND *, int(*func)(CSOUND *, void *userData))
| Sets callback for closing real time MIDI output.
PUBLIC void | csoundSetExternalMidiErrorStringCallback (CSOUND *, const char *(*func)(int))
| Sets callback for converting MIDI error codes to strings.
PUBLIC void | csoundSetMIDIDeviceListCallback (CSOUND *csound, int(*mididevlist__)(CSOUND *, CS_MIDIDEVICE *list, int isOutput))
| Sets a function that is called to obtain a list of MIDI devices.

## Detailed Description

## Function Documentation

## csoundGetMIDIDevList()

PUBLIC int csoundGetMIDIDevList | ( | CSOUND * | csound,
|  | CS_MIDIDEVICE * | list,
|  | int | isOutput )

This function can be called to obtain a list of available input or output midi devices.

If list is NULL, the function will only return the number of devices (isOutput=1 for out devices, 0 for in devices). If list is non-NULL, then it should contain enough memory for one CS_MIDIDEVICE structure per device. Hosts will typically call this function twice: first to obtain a number of devices, then, after allocating space for each device information structure, pass an array of CS_MIDIDEVICE structs to be filled. (see also csoundGetAudioDevList())

References PUBLIC.

## csoundSetExternalMidiErrorStringCallback()

PUBLIC void csoundSetExternalMidiErrorStringCallback | ( | CSOUND * | ,
|  | const char *(* | func )(int) )

Sets callback for converting MIDI error codes to strings.

References PUBLIC.

## csoundSetExternalMidiInCloseCallback()

PUBLIC void csoundSetExternalMidiInCloseCallback | ( | CSOUND * | ,
|  | int(* | func )(CSOUND *, void *userData) )

Sets callback for closing real time MIDI input.

References PUBLIC.

## csoundSetExternalMidiInOpenCallback()

PUBLIC void csoundSetExternalMidiInOpenCallback | ( | CSOUND * | ,
|  | int(* | func )(CSOUND *, void **userData, const char *devName) )

Sets callback for opening real time MIDI input.

References PUBLIC.

## csoundSetExternalMidiOutCloseCallback()

PUBLIC void csoundSetExternalMidiOutCloseCallback | ( | CSOUND * | ,
|  | int(* | func )(CSOUND *, void *userData) )

Sets callback for closing real time MIDI output.

References PUBLIC.

## csoundSetExternalMidiOutOpenCallback()

PUBLIC void csoundSetExternalMidiOutOpenCallback | ( | CSOUND * | ,
|  | int(* | func )(CSOUND *, void **userData, const char *devName) )

Sets callback for opening real time MIDI output.

References PUBLIC.

## csoundSetExternalMidiReadCallback()

PUBLIC void csoundSetExternalMidiReadCallback | ( | CSOUND * | ,
|  | int(* | func )(CSOUND *, void *userData, unsigned char *buf, int nBytes) )

Sets callback for reading from real time MIDI input.

References PUBLIC.

## csoundSetExternalMidiWriteCallback()

PUBLIC void csoundSetExternalMidiWriteCallback | ( | CSOUND * | ,
|  | int(* | func )(CSOUND *, void *userData, const unsigned char *buf, int nBytes) )

Sets callback for writing to real time MIDI output.

References PUBLIC.

## csoundSetHostImplementedMIDIIO()

PUBLIC void csoundSetHostImplementedMIDIIO | ( | CSOUND * | csound,
|  | int | state )

call this function with state 1 if the host is implementing MIDI via the callbacks below.

References PUBLIC.

## csoundSetMIDIDeviceListCallback()

PUBLIC void csoundSetMIDIDeviceListCallback | ( | CSOUND * | csound,
|  | int(* | mididevlist__ )(CSOUND *, CS_MIDIDEVICE *list, int isOutput) )

Sets a function that is called to obtain a list of MIDI devices.

This should be set by IO plugins, and should not be used by hosts. (See csoundGetMIDIDevList())

References PUBLIC.

## csoundSetMIDIModule()

PUBLIC void csoundSetMIDIModule | ( | CSOUND * | csound,
|  | const char * | module )

Sets the current MIDI IO module.

References PUBLIC.