chnrecv — Recieves data from the software bus.


Receives data from a channel of the inward named software bus. Implies declaring the channel with imode=1 (see also chn_k, chn_a, and chn_S). Note that chnsend/chnrecv (which in Csound6 work identically to invalue/outvalue) are usually used for the callback-based communication between Csound and an external host. Use the chnset/chnget opcodes for sending and receiving data inside Csound.


ival chnrecv Sname
kval chnrecv Sname
aval chnrecv Sname
Sval chnrecv Sname


Sname -- a string that identifies a channel of the named software bus to read.


ival -- the control value read at i-time.

kval -- the control value read at performance time.

aval -- the audio signal read at performance time.

Sval -- the string value read at i-time.

[Note] Note


The example shows the software bus being used as an asynchronous control signal to select a filter cutoff. It assumes that an external program that has access to the API is feeding the values.

        sr = 44100
        ksmps = 100
        nchnls = 1

        instr   1
           kc   chnrecv    "cutoff"
           a1   oscil     p4, p5, 100
           a2   lowpass2  a1, kc, 200
                out       a2


Author: Istvan Varga