chnsend
Prev | Orchestra Opcodes and Operators | Next

## chnsend

chnsend — Sends data via the named software bus.

## Description

Send to a channel of the named software bus. Implies declaring the channel with imode=2 (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.

## Syntax

    chnsend ival, Sname

    chnsend kval, Sname

    chnsend aval, Sname

    chnsend Sval, Sname

## Initialization

Sname -- a string that indicates which named channel of the software bus to send to.

## Performance

ival -- the control value to write at i-time.

kval -- the control value to write at performance time.

aval -- the audio signal to write at performance time.

Sval -- the string value to write at i-time.

## Example

The example shows the software bus being used to write pitch information to a controlling program.

            sr = 44100
            ksmps = 100
            nchnls = 1

            instr   1
               a1    in
               kp,ka pitchamdf a1
                     chnsend   kp, "pitch"
            endin

## See Also

chnrecv, chnset, chnget

## Credits

Author: Istvan Varga
2005

Prev | Up | Next
chnrecv | Home | chnset