<- C I ->

in, ins, inq, soundin, outs1, outs2, outs, outq1, outq2, outq3, outq4, outq


a1             in 
a1, a2         ins 
a1, a2, a3, a4 inq 
a1             soundin   ifilcod[, iskptim][, iformat] 
a1, a2         soundin   ifilcod[, iskptim][, iformat] 
a1, a2, a3, a4 soundin   ifilcod[, iskptim][, iformat] 
               out       asig 
               outs1     asig 
               outs2     asig 
               outs      asig1, asig2
               outq1     asig 
               outq2     asig
               outq3     asig 
               outq4     asig 
               outq      asig1, asig2, asig3, asig4  
These units read/write audio data from/to an external device or stream.

INITIALIZATION

filcod - 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 (1 = 8-bit signed char, 2 = 8-bit A-law bytes, 3 = 8-bit U-law bytes, 4 = 16-bit short integers, 5 = 32bit long integers, 6 = 32-bit floats). 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.

PERFORMANCE

in, ins, inq - copy the current values from the standard audio input buffer. If the command-line flag -i is set, sound is read continuously from the audio input stream (e.g. stdin 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 set by the number of result cells, a1, a2, etc. 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.

out, outs, outq send audio samples to an accumulating output buffer (created at the beginning of performance) which serves to collect the output of all active instruments before the sound is written to disk. There can be any number of these output units in an instrument. The type (mono, stereo, or quad) must agree with nchnls, but units can be chosen to direct sound to any particular channel: outs1 sends to stereo channel 1, outq3 to quad channel 3, etc.

<- C I ->
Prepared from the MIT Media Lab Csound Manual, PJN, Nov 1994.