Command-line Flags

Many flags are generic Csound command-line flags. Various platform implementations may not react the same way to different flags!

The format of a command is either:

csound [-flags] [orchname] [scorename]

or

csound [-flags] [csdfilename]

where the arguments are of 2 types: flags arguments (beginning with a "-"), and name arguments (such as filenames). Certain flag arguments take a following name or numeric argument.

Command-line Flags

-@ FILE

Provide an extended command-line in file "FILE"

-3, --format=24bit

Use 24-bit audio samples.

-8, --format=uchar

Use 8-bit unsigned character audio samples.

-A, --aiff

Write an AIFF format soundfile. Use with the -c, -s, -l, or -f flags.

-a, --format=alaw

Use a-law audio samples.

-B NUM, --hardwarebufsamps=NUM

Number of audio sample-frames held in the DAC hardware buffer. This is a threshold on which software audio I/O (above) will wait before returning. A small number reduces audio I/O delay; but the value is often hardware limited, and small values will risk data lates. The default is 1024.

-b NUM, --iobufsamps=NUM

Number of audio sample-frames per sound i/o software buffer. Large is efficient, but small will reduce audio I/O delay. The default is 1024. In real-time performance, Csound waits on audio I/O on NUM boundaries. It also processes audio (and polls for other input like MIDI) on orchestra ksmps boundaries. The two can be made synchronous. For convenience, if NUM = -NUM (is negative) the effective value is ksmps * NUM (audio synchronous with k-period boundaries). With NUM small (e.g. 1) polling is then frequent and also locked to fixed DAC sample boundaries.

-C, --cscore

Use Cscore processing of the scorefile.

-c, --format=schar

Use 8-bit signed character audio samples.

-D, --defer-gen1

Defer GEN01 soundfile loads until performance time.

-d, --nodisplays

Suppress all displays.

-E NUM, --graphs=NUM

Mac only. Number of tables in graphics window. (was -G)

-e, --format=rescale

Mac only. Rescale floats as shorts to max amplitude.

-F FILE, --midifile=FILE

Read MIDI events from MIDI file FILE.

-f, --format=float

Use single-precision float audio samples (not playable, but can be read by -i, soundin and GEN01

-G, --postscriptdisplay

Suppress graphics, use PostScript displays instead.

-g, --asciidisplay

Suppress graphics, use ASCII displays instead.

-H#, --heartbeat=NUM

Print a heartbeat after each soundfile buffer write:

  • no NUM, a rotating bar.

  • NUM = 1, a rotating bar.

  • NUM = 2, a dot (.)

  • NUM = 3, filesize in seconds.

  • NUM = 4, sound a bell.

-h, --noheader

No header on output soundfile. Don't write a file header, just binary samples.

--help

Display on-line help message.

-I, --i-only

i-time only. Allocate and initialize all instruments as per the score, but skip all p-time processing (no k-signals or a-signals, and thus no amplitudes and no sound). Provides a fast validity check of the score pfields and orchestra i-variables.

-i FILE, --input=FILE

Input soundfile name. If not a full pathname, the file will be sought first in the current directory, then in that given by the environment variable SSDIR (if defined), then by SFDIR. The name stdin will cause audio to be read from standard input. If RTAUDIO is enabled, the name devaudio will request sound from the host audio input device.

-J, --ircam

Write an IRCAM format soundfile.

-j FILE

Currently disabled. Use database FILE for messages to print to console during performance.

-K, --nopeaks

Do not generate any PEAK chunks.

-k NUM, --control-rate=NUM

Override the control rate (KR) supplied by the orchestra.

-L DEVICE, --score-in=DEVICE

Read line-oriented real-time score events from device DEVICE. The name stdin will permit score events to be typed at your terminal, or piped from another process. Each line-event is terminated by a carriage-return. Events are coded just like those in a standard numeric score, except that an event with p2=0 will be performed immediately, and an event with p2=T will be performed T seconds after arrival. Events can arrive at any time, and in any order. The score carry feature is legal here, as are held notes (p3 negative) and string arguments, but ramps and pp or np references are not.

-l, --format=long

Use long integer audio samples.

-M DEVICE, --midi-device=DEVICE

Read MIDI events from device DEVICE.

-m NUM, --messagelevel=NUM

Message level for standard (terminal) output. Takes the sum of 3 print control flags, turned on by the following values:

  • 1 = note amplitude messages

  • 2 = samples out of range message

  • 4 = warning messages

The default value is m7 (all messages on).

-N, --notify

Notify (ring the bell) when score or MIDI track is done.

-n, --nosound

No sound. Do all processing, but bypass writing of sound to disk. This flag does not change the execution in any other way.

-O FILE, --logfile=FILE

Log output to file FILE.

-o FILE, --output=FILE

Output soundfile name. If not a full pathname, the soundfile will be placed in the directory given by the environment variable SFDIR (if defined), else in the current directory. The name stdout will cause audio to be written to standard output. If no name is given, the default name will be test. If RTAUDIO is enabled, the name devaudio will send to the host audio output device.

-P NUM, --pollrate=NUM

Mac only. Poll events every NUM buffer writes.

-p, --play-on-end

Mac only. Play after rendering.

-Q DEVICE, -Q DIRECTORY, --analysis-directory=DIRECTORY

Beos and Linux only. Enables MIDI OUT operations and optionally chooses device id DEVICE (if the DEVICE argument is present). This flag allows parallel MIDI OUT and DAC performance. Unfortunately the real-time timing implemented in Csound is completely managed by DAC buffer sample flow. So MIDI OUT operations can present some time irregularities. These irregularities can be fully eliminated when suppressing DAC operations themselves (see -Y flag).

Mac only. Define the analysis (SADIR) directory.

-q DIRECTORY, --sample-directory=DIRECTORY

Mac only. Define the sound sample-in (SSDIR) directory.

-R, --rewrite

Continually rewrite the header while writing the soundfile (WAV/AIFF).

-r NUM, --sample-rate=NUM

Override the sampling rate (SR) supplied by the orchestra.

-s, --format=short

Use short integer audio samples.

--sched

Linux only. Use real-time scheduling and lock memory. (Also requires -d and either -o dac or -o devaudio).

-T, --terminate-on-midi

Terminate the performance when MIDI track is done.

-t0, --keep-sorted-score

Prevents Csound from deleting the sorted score file, score.srt, upon exit.

-t NUM, --tempo=NUM

Use the uninterpreted beats of score.srt for this performance, and set the initial tempo at NUM beats per minute. When this flag is set, the tempo of score performance is also controllable from within the orchestra.

-U UTILITY, --utility=UTILITY

Invoke the utility program UTILITY.

-u, --format=ulaw

Use u-law audio samples.

-V NUM, --screen-buffer=NUM, --volume=NUM

Linux only. Set real-time audio output volume to NUM (1 to 100).

Mac only. Number of chars in the screen buffer for the output window.

-v, --verbose

Verbose translate and run. Prints details of orch translation and performance, enabling errors to be more clearly located.

-W, --wave

Write a WAV format soundfile.

-w, --save-midi

Mac only. Record and save MIDI input to a file.

-X DIRECTORY, --sound-directory=DIRECTORY

Mac only. Define the sound file (SFDIR) directory.

-x FILE, --extract-score=FILE

Extract a portion of the sorted score, score.srt, using the extract file FILE (see Extract).

-Y NUM, --progress-rate=NUM

Currently disabled. Mac only. Enables progress display at rate NUM in seconds, or for negative NUM, at -NUM kperiods.

-y NUM, --profile-rate=NUM

Currently disabled. Mac only. Enables profile display at rate NUM in seconds, or for negative NUM, at -NUM kperiods.

-Z, --dither

Switch on dithering of audio conversion from internal floating point to 32, 16 and 8-bit formats.

-z NUM, --list-opcodesNUM

List opcodes in this version:

  • no NUM, just show names

  • NUM = 0, just show names

  • NUM = 1, show arguments to each opcode using the format <opname> <inargs> <outargs>