Use Non-Frames Version Previous Page Next Page
Signal Input and Output: Input

in, ins, inq, inh, ino, soundin, diskin

  ar1                                   in

  ar1, ar2                              ins

  ar1, ar2,  ar3, a4                    inq

  ar3, ar4

  ar1, ar2, ar3, ar4, ar5, ar6           inh

  ar1, ar2, ar3, ar4, ar5, ar6, ar7, ar8 ino


  ar1                                    soundin   ifilcod[, iskptim[, iformat]]

  ar1, ar2                               soundin   ifilcod[, iskptim[, iformat]]

  ar1,...ar24                            soundin   ifilcod[, iskptim[, iformat]]

  ar3, ar4


  ar1[,ar2[, ar3,ar4]]                   diskin    ifilcod, kpitch[, iskiptim[, iwraparound[, iformat]]]


These units read audio data from an external device or stream.


ifilcod – integer or character-string denoting the source soundfile name. An integer denotes the file soundin.filcod ; a character-string (in double quotes, spaces permitted) gives the filename itself, optionally a full pathname. If not a full path, the named file is sought first in the current directory, then in that given by the environment variable SSDIR (if defined) then by SFDIR. See also GEN01.

iskptim (optional) – time in seconds of input sound to be skipped. The default value is 0.

iformat (optional) – specifies the audio data file format:

If iformat = 0 it is taken from the soundfile header, and if no header from the CSound -o command flag. The default value is 0.

iwraparound – 1 = on, 0 = off (wraps around to end of file either direction)

kpitch – can be any real number. a negative number signifies backwards playback. The given number is a pitch ratio, where:

	1   =  norm pitch

	2   =  oct higher

	3   =  12th higher, etc.

	.5  =  oct lower

	.25 =  2oct lower, etc.

	-1  =  norm pitch backwards

	-2  =  oct higher backwards, etc.


in, ins, inq, inh, ino – copy the current values from the standard audio input buffer. If the command-line -i flag is set, sound is read continuously from the audio input stream (e.g. stdain or a soundfile) into an internal buffer. Any number of these units can read freely from this buffer.

soundin is functionally an audio generator that derives its signal from a pre-existing file. The number of channels read in is controlled by the number of result cells, a1, a2, etc., which must match that of the input file. A soundin unit opens this file whenever the host instrument is initialized, then closes it again each time the instrument is turned off. There can be any number of soundin units within a single instrument or orchestra; also, two or more of them can read simultaneously from the same external file. Beginning with Csound version 4.13, soundin can read any number of channels, up to a maximum of 24 channels.

diskin is identical to soundin, except that it can alter the pitch of the sound that is being read.


Barry Vercoe, Matt Ingalls
MIT, Mills College

Use Non-Frames Version Previous Page Next Page
Signal Input and Output: Input