csound is a command for passing an orchestra file and score file to Csound to generate a soundfile. The score file can be in one of many different formats, according to user preference. Translation, sorting, and formatting into orchestra-readable numeric text is handled by various preprocessors; all or part of the score is then sent on to the orchestra. Orchestra performance is influenced by command flags, which set the level of displays and console reports, specify 1/0 filenames and sample formats, and declare the nature of realtime sensing and control.
IMPORTANT NOTE: These are generic Csound command flags. Various platform implementations may not react the same way to different flags!
The format of a command is:
csound [-flags] orchname scorename
where the arguments are of 2 types: flag arguments (beginning with a "-"), and name arguments (such as filenames). Certain flag arguments take a following name or numeric argument. The available flags are:
-U unam run utility program unam -C use Cscore processing of scorefile -I I-time only orch run -n no sound onto disk -i fnam sound input filename -o fnam sound output filename -b N sample frames (or -kprds) per software sound I/O buffer -B N samples per hardware sound I/O buffer -A create an AIFF format output soundfile -W create a WAV format output soundfile -h no header on output soundfile -c 8-bit signed_char sound samples -a alaw sound samples -8 8-bit unsigned_char sound samples -u ulaw sound samples -s short_int sound samples -l long_int sound samples -f float sound samples -r N orchestra srate override -k N orchestra krate override -v verbose orch translation -m N tty message level. Sum of: 1=note amps, 2=out-of-range msg, 4=warnings -d suppress all displays -g suppress graphics, use ascii displays -G suppress graphics, use Postscript displays -S score is in Scot format -x fnam extract from score.srt using extract file 'fnam' -t N use uninterpreted beats of the score, initially at tempo N -L dnam read Line-oriented realtime score events from device 'dnam' -M dnam read MIDI realtime events from device 'dnam' -F fnam read MIDIfile event stream from file 'fnam' -P N MIDI sustain pedal threshold (0 - 128) -R continually rewrite header while writing soundfile (WAV/AIFF) -H print a heartbeat character at each soundfile write -N notify (ring the bell) when score or miditrack is done -T terminate the performance when miditrack is done -D defer GEN01 soundfile loads until performance time -z List opcodes in this version
Flags may appear anywhere in the command line, either separately or bundled together. A flag taking a Name or Number will find it in that argument, or in the immediately subsequent one. The following are thus equivalent commands:
csound -nm3 orchname -Sxxfilename scorename csound -n -m 3 orchname -x xfilename -S scorename
All flags and names are optional. The default values are:
csound -s -otest -b1024 -B1024 -m7 -P128 orchname scorename
where orchname is a file containing Csound orchestra code, and scorename is a file of score data in standard numeric score format, optionally presorted and time-warped. If scorename is omitted, there are two default options: 1) if realtime input is expected (-L, -M or -F), a dummy scorefile is substituted consisting of the single statement 'f 0 3600' (i.e. listen for RT input for one hour); 2) else csound uses the previously processed score.srt in the current directory.
c 8-bit signed character a 8-bit a-law u 8-bit u-law s short integer l long integer f single-precision float (not playable, but can be read by -i, soundin and GEN01)
Although the result of all score preprocessing is retained in the file score.srt after orchestra performance (it exists as soon as score preprocessing has completed), the user may sometimes want to run these phases independently. The command
scot filename
will process the Scot formatted filename, and leave a standard numeric score result in a file named score for perusal or later processing.
The command
scscort < infile > outfile
will put a numeric score infile through Carry, Tempo, and Sort preprocessing, leaving the result in outfile.
Likewise extract, also normally invoked as part of the csound command, can be invoked as a standalone program:
extract xfile < score.sort > score.extract
This command expects an already sorted score. An unsorted score should first be sent through scsort then piped to the extract program:
scsort < scorefile | extract xfile > score.extract
This feature will extract a segment of a sorted numeric score file according to instructions taken from a control file. The control file contains an instrument list and two time points, from and to, in the form:
instruments 1 2 from 1:27.5 to 2:2
The component labels may be abbreviated as i, f and t. The time points denote the beginning and end of the extract in terms of:
[section no.] : [beat no.].
each of the three parts is also optional. The default values for missing i, f or t are:
all instruments, beginning of score, end of score.
extract reads an orchestra-readable score file and produces an orchestra-readable result. Comments, tabs and extra spaces are flushed, w and a statements are added and an f0 reflecting the extract length is appended to the output. Following an extract process, the abbreviated score will contain all function table statements, together with just those note statements that occur in the from-to interval specified. Notes lying completely in the interval will be unmodified; notes that lie only partly within will have their p3 durations truncated as necessary.