getcfgInstrument Control:Sensing and Controlgetcfggetcfg
Return Csound settings.
Description
Return various configuration settings in Svalue as a string at init time.
SyntaxSvalue getcfg ioptInitializationiopt
-- The parameter to be returned, can be one of:
1: the maximum length of string variables in
characters; this is at least the value of the -+max_str_len
command line option - 1. In Csound6 there is no
maximum string length so the returned value is meaningless2: the input sound file name (-i), or empty if there is no input file3: the output sound file name (-o), or empty if there is no output file4: return "1" if real time audio input or output is being used, and "0" otherwise5: return "1" if running in beat mode (-t command line option), and "0" otherwise6: the host operating system name7: return "1" if a callback function for the chnrecv and chnsend opcodes has been set, and "0" otherwise (which means these opcodes do nothing)Examples
Here is an example of the getcfg opcode. It uses the file getcfg.csd.
Example of the getcfg opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.
The output should include lines like these:
------------------------------
Max string len : 255
Input file name (-i) : adc
Output file name (-o) : dac
RTaudio (-odac) : 1
Beat mode (-t)? : 0
Host Op. Sys. : Linux
Callback ? : 0
------------------------------
See alsoSensing and Control: SystemCreditsAuthor: Istvan Varga2006New in version 5.02