system_isystemMiscellaneoussystemsystem
Call an external program via the system call
DescriptionPlugin opcode in system_call.system and system_i call
any external command understood by the operating system, similarly
to the C function system(). system_i runs
at i-time only, while
system runs both at initialization and
performance time.
Syntaxires system_i itrig, Scmd, [inowait]kres system ktrig, Scmd, [knowait]InitializationScmd -- command string
itrig -- if greater than zero the opcode
executes the command; otherwise it is an null operation.
Performancektrig -- if greater than zero and different
from the value on the previous control cycle the opcode
executes the command. Initially this previous value is
taken as zero.
inowait,knowait -- if given an non zero the
command is run in the background and the command does not wait
for the result. (default = 0)
ires, kres -- the return code of the
command in wait mode and if the command is run.In other cases
returns zero.
More than one system command (a script) can be executed with a single system opcode by using double braces strings {{ }}.
This opcode is very system dependant, so should be used with extreme care (or not used) if platform neutrality is desired.
Example
Here is an example of the system_i opcode. It uses the file system.csd.
Example of the system opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoMiscellaneous opcodesCreditsAuthor: &namejohn;2007New in version 5.06