Loading...
Searching...
No Matches
General Input/Output

Setting the device or filename name for Csound input and output. More...

## Functions

PUBLIC const char * | csoundGetOutputName (CSOUND *)
| Returns the audio output name (-o).
PUBLIC const char * | csoundGetInputName (CSOUND *)
| Returns the audio input name (-i).
PUBLIC void | csoundSetOutput (CSOUND *csound, const char *name, const char *type, const char *format)
| Set output destination, type and format type can be one of "wav","aiff", "au","raw", "paf", "svx", "nist", "voc", "ircam","w64","mat4", "mat5", "pvf","xi", "htk","sds","avr","wavex","sd2", "flac", "caf","wve","ogg","mpc2k","rf64", or NULL (use default or realtime IO).
PUBLIC void | csoundGetOutputFormat (CSOUND *csound, char *type, char *format)
| Get output type and format.
PUBLIC void | csoundSetInput (CSOUND *csound, const char *name)
| Set input source.
PUBLIC void | csoundSetMIDIInput (CSOUND *csound, const char *name)
| Set MIDI input device name/number.
PUBLIC void | csoundSetMIDIFileInput (CSOUND *csound, const char *name)
| Set MIDI file input name.
PUBLIC void | csoundSetMIDIOutput (CSOUND *csound, const char *name)
| Set MIDI output device name/number.
PUBLIC void | csoundSetMIDIFileOutput (CSOUND *csound, const char *name)
| Set MIDI file utput name.
PUBLIC void | csoundSetFileOpenCallback (CSOUND *p, void(*func)(CSOUND *, const char *, int, int, int))
| Sets an external callback for receiving notices whenever Csound opens a file.

## Detailed Description

Setting the device or filename name for Csound input and output.

These functions are used to set the input and output command line flags that apply to both input and output of audio and MIDI. See command line flags -o, -i, -M and -Q in the Csound Reference Manual.

## Function Documentation

## csoundGetInputName()

PUBLIC const char * csoundGetInputName | ( | CSOUND * |  | ) |

Returns the audio input name (-i).

References PUBLIC.

## csoundGetOutputFormat()

PUBLIC void csoundGetOutputFormat | ( | CSOUND * | csound,
|  | char * | type,
|  | char * | format )

Get output type and format.

type should have space for at least 5 chars excluding termination, and format should have space for at least 7 chars. On return, these will hold the current values for these parameters.

References PUBLIC.

## csoundGetOutputName()

PUBLIC const char * csoundGetOutputName | ( | CSOUND * |  | ) |

Returns the audio output name (-o).

References PUBLIC.

## csoundSetFileOpenCallback()

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

Sets an external callback for receiving notices whenever Csound opens a file.

The callback is made after the file is successfully opened. The following information is passed to the callback: char* pathname of the file; either full or relative to current dir int a file type code from the enumeration CSOUND_FILETYPES int 1 if Csound is writing the file, 0 if reading int 1 if a temporary file that Csound will delete; 0 if not

Pass NULL to disable the callback. This callback is retained after a csoundReset() call.

References PUBLIC.

## csoundSetInput()

PUBLIC void csoundSetInput | ( | CSOUND * | csound,
|  | const char * | name )

Set input source.

References PUBLIC.

## csoundSetMIDIFileInput()

PUBLIC void csoundSetMIDIFileInput | ( | CSOUND * | csound,
|  | const char * | name )

Set MIDI file input name.

References PUBLIC.

## csoundSetMIDIFileOutput()

PUBLIC void csoundSetMIDIFileOutput | ( | CSOUND * | csound,
|  | const char * | name )

Set MIDI file utput name.

References PUBLIC.

## csoundSetMIDIInput()

PUBLIC void csoundSetMIDIInput | ( | CSOUND * | csound,
|  | const char * | name )

Set MIDI input device name/number.

References PUBLIC.

## csoundSetMIDIOutput()

PUBLIC void csoundSetMIDIOutput | ( | CSOUND * | csound,
|  | const char * | name )

Set MIDI output device name/number.

References PUBLIC.

## csoundSetOutput()

PUBLIC void csoundSetOutput | ( | CSOUND * | csound,
|  | const char * | name,
|  | const char * | type,
|  | const char * | format )

Set output destination, type and format type can be one of "wav","aiff", "au","raw", "paf", "svx", "nist", "voc", "ircam","w64","mat4", "mat5", "pvf","xi", "htk","sds","avr","wavex","sd2", "flac", "caf","wve","ogg","mpc2k","rf64", or NULL (use default or realtime IO).

format can be one of "alaw", "schar", "uchar", "float", "double", "long", "short", "ulaw", "24bit", "vorbis", or NULL (use default or realtime IO). For RT audio, use device_id from CS_AUDIODEVICE for a given audio device.

References PUBLIC.