Csound API  6.18
Realtime Midi I/O

Functions

PUBLIC void csoundSetMIDIModule (CSOUND *csound, const char *module)
 Sets the current MIDI IO module. More...
 
PUBLIC void csoundSetHostImplementedMIDIIO (CSOUND *csound, int state)
 call this function with state 1 if the host is implementing MIDI via the callbacks below. More...
 
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. More...
 
PUBLIC void csoundSetExternalMidiInOpenCallback (CSOUND *, int(*func)(CSOUND *, void **userData, const char *devName))
 Sets callback for opening real time MIDI input. More...
 
PUBLIC void csoundSetExternalMidiReadCallback (CSOUND *, int(*func)(CSOUND *, void *userData, unsigned char *buf, int nBytes))
 Sets callback for reading from real time MIDI input. More...
 
PUBLIC void csoundSetExternalMidiInCloseCallback (CSOUND *, int(*func)(CSOUND *, void *userData))
 Sets callback for closing real time MIDI input. More...
 
PUBLIC void csoundSetExternalMidiOutOpenCallback (CSOUND *, int(*func)(CSOUND *, void **userData, const char *devName))
 Sets callback for opening real time MIDI output. More...
 
PUBLIC void csoundSetExternalMidiWriteCallback (CSOUND *, int(*func)(CSOUND *, void *userData, const unsigned char *buf, int nBytes))
 Sets callback for writing to real time MIDI output. More...
 
PUBLIC void csoundSetExternalMidiOutCloseCallback (CSOUND *, int(*func)(CSOUND *, void *userData))
 Sets callback for closing real time MIDI output. More...
 
PUBLIC void csoundSetExternalMidiErrorStringCallback (CSOUND *, const char *(*func)(int))
 Sets callback for converting MIDI error codes to strings. More...
 
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. More...
 

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())

◆ csoundSetExternalMidiErrorStringCallback()

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

Sets callback for converting MIDI error codes to strings.

◆ csoundSetExternalMidiInCloseCallback()

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

Sets callback for closing real time MIDI input.

◆ csoundSetExternalMidiInOpenCallback()

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

Sets callback for opening real time MIDI input.

◆ csoundSetExternalMidiOutCloseCallback()

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

Sets callback for closing real time MIDI output.

◆ csoundSetExternalMidiOutOpenCallback()

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

Sets callback for opening real time MIDI output.

◆ csoundSetExternalMidiReadCallback()

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

Sets callback for reading from real time MIDI input.

◆ csoundSetExternalMidiWriteCallback()

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

Sets callback for writing to real time MIDI output.

◆ csoundSetHostImplementedMIDIIO()

PUBLIC void csoundSetHostImplementedMIDIIO ( CSOUND csound,
int  state 
)

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

◆ csoundSetMIDIDeviceListCallback()

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

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())

◆ csoundSetMIDIModule()

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

Sets the current MIDI IO module.