OSCbundle — Sends data to other processes using the OSC protocol by packing messages in a bundle.


Uses the OSC protocol to send one or more messages to other OSC listening processes in a single bundle. Unlike OSCsend, it can be used to send multiple messages at the same time, but only standard OSC numeric types are allowed.


OSCbundle kwhen, ihost, iport,
    Sdest[], Stype[],kArgs[][][,isize]


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.

isize -- maximum packet size in bytes, defaults to 65536.


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

Sdest[] -- an array of strings containing the destination address for each message. Length must agree with Stype[].

Stype[] -- an array of strings containing the types for each message. Only numeric types ('i' for integers and 'f' for floats) are supported. Length must agree with Sdest[].

kArg[][] -- a two-dimensional array containing the arguments for each message. Its dimension 1 (number of rows) must agree with Sdest[] and Stype[]. Each row should contain the arguments for the types of each message. If a row contains fewer arguments, any remaining data items are filled with zeros. Arguments in excess of what each type string requires are ignored.


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

Example 644. Example of the OSCbundle opcode.

See the sections Real-time Audio and Command Line Flags for more information on using command line flags.


instr 1
Sdest[] init 2
Stype[] init 2
kdata[][] init 2, 2

Sdest[0] = "/test/floats"
Sdest[1] = "/test/ints"
Stype[0] = "ff"
Stype[1] = "ii"

kdata fillarray 1,2,3,4

OSCbundle  1, "localhost", 7000, Sdest, Stype, kdata

i1 0 1

See Also

OSClisten, OSCinit


Author: Victor Lazzarini