inch

inch — Reads from numbered channels in an external audio signal or stream.

Description

Reads from numbered channels in an external audio signal or stream.

Syntax

ain1[, ...] inch kchan1[,...]

Performance

ain1, ... - input audio signals

kchan1,... - channel numbers

inch reads from numbered channels determined by the corresponding kchan into the associated ain. If the command-line -i flag is set, sound is read continuously from the audio input stream (e.g. stdin or a soundfile). inch can also be used to receive audio in realtime from the audio interface using -iadc.

[Note] Note

The highest number for kchan available for use with inch depends on nchnls_i. If kchan is greater than nchnls_i, ain will be silent. Note that inch will give a warning but not an error in this case.

Examples

Here is an example of the inch opcode. It uses the file inch.csd.

Example 394. Example of the inch opcode.

<CsoundSynthesizer>
<CsOptions>
; Select audio/midi flags here according to platform
-odac   -idac   ;;;realtime audio I/O
; For Non-realtime ouput leave only the line below:
; inch.wav -W ;;; for file output any platform
</CsOptions>
<CsInstruments>

sr = 44100
ksmps = 32
nchnls = 2
0dbfs  = 1

instr 1 ;nchnls channels in, two channels out

ain1, ainr inch 1, 2			;grab your mic and sing
adel  linseg 0, p3*.5, 0.02, p3*.5, 0	;max delay time = 20ms
aoutl flanger ain1, adel, .7
aoutr flanger ain1, adel*2, .8
      fout "in_ch.wav", 14, aoutl, aoutr ;write to stereo file,
      outs aoutl, aoutr			;16 bits with header

endin
</CsInstruments>
<CsScore>

i 1 0 10
e
</CsScore>
</CsoundSynthesizer>


See Also

in32, inx, inz

Credits

Author: John ffitch
University of Bath/Codemist Ltd.
Bath, UK
May 2000

New in Csound Version 4.07

Multiple arguments from version 5.13