OSCsend
Prev | Orchestra Opcodes and Operators | Next

## OSCsend

OSCsend — Sends data to other processes using the OSC protocol

## Description

Uses the OSC protocol to send message to other OSC listening processes.

## Syntax

    OSCsend kwhen, ihost, iport, idestination, itype [, kdata1, kdata2, ...]

## Initialization

ihost -- a string that is the intended host computer domain name. An empty string is interpreted as the current computer.

iport -- the number of the port that is used for the communication.

idest -- a string that is the destination address. This takes the form of a file name with directories. Csound just passes this string to the raw sending code and makes no interpretation.

itype -- a string that indicates the types of the optional arguments that are read at k-rate. The string can contain the characters "bcdfilmst" which stand for Boolean, character, double, float, 32-bit integer, 64-bit integer, MIDI, string and timestamp.

## Performance

kwhen -- a message is sent whenever this value changes. A message will always be sent on the first call.

The data is taken from the k-values that follow the format string. In a similar way to a printf format, the characters in order determine how the argument is interpreted. Note that a time stamp takes two arguments.

## Example

The example shows a simple instrument, which when called, sends a group of 3 messages to a computer called "xenakis", on port 7770, to be read by a process that recognises /foo/bar as its address.

          instr   1
              OSCsend     1, "xenakis.cs.bath.ac.uk",7770, "/foo/bar", "sis", "FOO", 42, "bar"
          endin

See the entry for OSClisten, for an example of send/recieve usage using OSC.

## See Also

OSClisten, OSCinit

More information on this opcode: http://www.youtube.com/watch?v=JX1C3TqP_9Y , made by Andrés Cabrera

## Credits

Author: John ffitch
2005

Prev | Up | Next
OSClisten | Home | out32