NAME

system - perform any system call


SYNOPSIS

system(command_line)


DESCRIPTION

This provides a way to do from an RTcmix script most anything you could do from the shell.

This is most useful in scores for older disk-based Cmix instruments, for reasons discussed below.


ARGUMENTS

command_line
A double-quoted string giving a system call to perform.


RETURNS

The return value of the system call.


EXAMPLES

   system("rm -f pvoctest.snd")
   system("sfcreate -c -s sun pvoctest.snd")
   output("pvoctest.snd")
   input("foo.aif")
   pvoc(0, 0, 20, 0, 1024, 2048, 150, 100, 0, 0)
   system("rescale -r pvoctest.snd")

Use system to call the sfcreate command-line utility to create an empty sound file. This is required by disk-based Cmix instruments. Use system to delete any existing ``pvoctest.snd'' file, because sfcreate complains if a file already exists. Finally, use system to call the rescale command-line utility.


NOTES

The call is performed during the initialization portion of an RTcmix script that contains calls to real-time instruments. That is, it happens while RTcmix is parsing the script, but before it has run any of the instruments called in the script. This means you can't use system to rescale a sound file generated by instruments in the script, because the file won't contain anything yet when system does its work.

This is in contrast to the way the older disk-based Cmix instruments work: they execute as they are encountered in the script. That's why it works to run pvoc and then rescale the file.


SEE ALSO

sfcreate, rescale, pvoc