summaryrefslogtreecommitdiff
path: root/opcodes/OSCinit.xml
blob: f5cb6ded37776ced80b4c3ff27beec267ab7e0d3 (plain)
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
<refentry id="OSCinit">
<indexterm id="IndexOSCinit"><primary>OSCinit</primary></indexterm>
  <refentryinfo><title>OSC</title></refentryinfo>
  <refmeta>
    <refentrytitle>OSCinit</refentrytitle>
  </refmeta>



  <refnamediv>
    <refname>OSCinit</refname>
    <refpurpose>
      Start a listening process for OSC messages to a particular port.
          </refpurpose>
  </refnamediv>

  <refsect1>
    <title>Description</title>
    <para>
      Starts a listening process, which can be used by OSClisten.
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>ihandle <command>OSCinit</command> iport</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ihandle</emphasis>
      -- handle returned that can be passed to any number of OSClisten
      opcodes to receive messages on this port.
    </para>
    <para>
      <emphasis>iport</emphasis>
      -- the port on which to listen.
    </para>

  </refsect1>

  <refsect1>
    <title>Performance</title>

    <para>
    The listener runs in the background.  See OSClisten for details.
    </para>

  </refsect1>

  <refsect1>
    <title>Example</title>
    <para>
      The example shows a pair of floating point numbers being received
      on port 7770.
    </para>

      <informalexample>
        <programlisting>
<emphasis role="ohdr">sr</emphasis> <emphasis role="op">=</emphasis> 44100
<emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 100
<emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 2

gihandle <emphasis role="opc">OSCinit</emphasis> 7770

  <emphasis role="oblock">instr</emphasis>   1
    kf1 <emphasis role="opc">init</emphasis> 0
    kf2 <emphasis role="opc">init</emphasis> 0
<emphasis role="olabel">nxtmsg</emphasis>:
    kk  <emphasis role="opc">OSClisten</emphasis> gihandle, &quot;/foo/bar&quot;, &quot;ff&quot;, kf1, kf2
<emphasis role="octrl">if</emphasis> (kk <emphasis role="op">==</emphasis> 0) <emphasis role="octrl">goto</emphasis> <emphasis role="olabel">ex</emphasis>
    <emphasis role="opc">printk</emphasis> 0,kf1
    <emphasis role="opc">printk</emphasis> 0,kf2
    <emphasis role="opc">kgoto</emphasis> <emphasis role="olabel">nxtmsg</emphasis>
<emphasis role="olabel">ex</emphasis>:
  <emphasis role="oblock">endin</emphasis>
        </programlisting>
      </informalexample>

  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>
      <simplelist>
        <member>Author: &namejohn;</member>
        <member>2005</member>
      </simplelist>
    </para>
  </refsect1>
</refentry>