-
Notifications
You must be signed in to change notification settings - Fork 29
/
OSCsend.xml
118 lines (103 loc) · 4.27 KB
/
OSCsend.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
<refentry id="OSCsend">
<indexterm id="IndexOSCsend"><primary>OSCsend</primary></indexterm>
<refentryinfo><title>OSC</title></refentryinfo>
<refmeta>
<refentrytitle>OSCsend</refentrytitle>
</refmeta>
<refnamediv>
<refname>OSCsend</refname>
<refpurpose>
Sends data to other processes using the OSC protocol
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
Uses the OSC protocol to send message to other OSC listening processes.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis><command>OSCsend</command> kwhen, ihost, iport, idestination[, itype , xdata1, xdata2, ...]</synopsis>
</refsect1>
<refsect1>
<title>Initialization</title>
<para>
<emphasis>ihost</emphasis>
-- a string that is the intended host computer domain name. An
empty string is interpreted as the current computer.
</para>
<para>
<emphasis>iport</emphasis>
-- the number of the port that is used for the communication.
</para>
<para>
<emphasis>idestination</emphasis>
-- 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.
</para>
<para>
<emphasis>itype</emphasis>
-- a string that indicates the types of the optional arguments
that are read at k-rate. The string can contain the characters
"abcdfilmstAG" which stand for audio, Boolean, character, double, float,
32-bit integer, 64-bit integer, MIDI, string, timestamp, k-rate
array and ftable. The OSC message may not have any types,
in which case, it will consist only of the destination address.
</para>
</refsect1>
<refsect1>
<title>Performance</title>
<para>
<emphasis>kwhen</emphasis> -- a message is sent whenever this
value changes. A message will always be sent on the first call.
</para>
<para>
The data is taken from the k-values or a-value 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.
</para>
</refsect1>
<refsect1>
<title>Example</title>
<para>
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.
</para>
<informalexample>
<programlisting>
<emphasis role="oblock">instr</emphasis> 1
<emphasis role="opc">OSCsend</emphasis> 1, "xenakis.cs.bath.ac.uk",7770, "/foo/bar", "sis", "FOO", 42, "bar"
<emphasis role="oblock">endin</emphasis></programlisting>
</informalexample>
<para>
Here is a complete example of the OSCsend opcode. It uses the file <ulink url="examples/OSCsend.csd"><citetitle>OSCsend.csd</citetitle></ulink>.
<example>
<title>Example of the OSCsend opcode.</title>
<para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
<xi:include href="examples-xml/OSCsend.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
</refsect1>
<refsect1>
<title>See Also</title>
<para>
<link linkend="OSClisten"><citetitle>OSClisten</citetitle></link>,
<link linkend="OSCinit"><citetitle>OSCinit</citetitle></link>
</para>
<para> More information on this opcode: <ulink url="http://www.youtube.com/watch?v=JX1C3TqP_9Y"><citetitle>http://www.youtube.com/watch?v=JX1C3TqP_9Y</citetitle></ulink> , made by Andrés Cabrera </para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: &namejohn;</member>
<member>2005</member>
</simplelist>
</para>
<para>Data types a, A and G were added in 6.07; they send data via
blobs and are only really useful to other Csound instances or
custom listeners.</para>
</refsect1>
</refentry>