| 1 | |
| 2 | <refentry id="OSCinitM"> |
| 3 | <indexterm id="IndexOSCinitM"><primary>OSCinitM</primary></indexterm> |
| 4 | <refentryinfo><title>OSC</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>OSCinitM</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>OSCinitM</refname> |
| 11 | <refpurpose> |
| 12 | Start a listening process for multicast OSC messages to a particular port. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para>Plugin opcode in osc.</para> |
| 19 | <para> |
| 20 | Starts a multicast listening process, which can be used by OSClisten. |
| 21 | </para> |
| 22 | </refsect1> |
| 23 | |
| 24 | <refsect1> |
| 25 | <title>Syntax</title> |
| 26 | <synopsis>ihandle <command>OSCinitM</command> Sgroup, iport</synopsis> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Initialization</title> |
| 31 | <para> |
| 32 | <emphasis>Sgroup</emphasis> -- string giving the IP address of the |
| 33 | multicast group. |
| 34 | </para> |
| 35 | <para> |
| 36 | <emphasis>ihandle</emphasis> |
| 37 | -- handle returned that can be passed to any number of OSClisten |
| 38 | opcodes to receive messages on this port. |
| 39 | </para> |
| 40 | <para> |
| 41 | <emphasis>iport</emphasis> |
| 42 | -- the port on which to listen. |
| 43 | </para> |
| 44 | </refsect1> |
| 45 | |
| 46 | <refsect1> |
| 47 | <title>Performance</title> |
| 48 | <para> |
| 49 | The listener runs in the background. See OSClisten for details. |
| 50 | </para> |
| 51 | </refsect1> |
| 52 | |
| 53 | <refsect1> |
| 54 | <title>Example</title> |
| 55 | <para> |
| 56 | The example shows a pair of floating point numbers being received |
| 57 | on port 7770. |
| 58 | </para> |
| 59 | |
| 60 | <informalexample> |
| 61 | <programlisting> |
| 62 | <emphasis role="ohdr">sr</emphasis> <emphasis role="op">=</emphasis> 44100 |
| 63 | <emphasis role="ohdr">ksmps</emphasis> <emphasis role="op">=</emphasis> 100 |
| 64 | <emphasis role="ohdr">nchnls</emphasis> <emphasis role="op">=</emphasis> 2 |
| 65 | |
| 66 | gihandle <emphasis role="opc">OSCinitM</emphasis> "225.0.0.1", 7770 |
| 67 | |
| 68 | <emphasis role="oblock">instr</emphasis> 1 |
| 69 | kf1 <emphasis role="opc">init</emphasis> 0 |
| 70 | kf2 <emphasis role="opc">init</emphasis> 0 |
| 71 | <emphasis role="olabel">nxtmsg</emphasis>: |
| 72 | kk <emphasis role="opc">OSClisten</emphasis> gihandle, "/foo/bar", "ff", kf1, kf2 |
| 73 | <emphasis role="octrl">if</emphasis> (kk <emphasis role="op">==</emphasis> 0) <emphasis role="octrl">goto</emphasis> <emphasis role="olabel">ex</emphasis> |
| 74 | <emphasis role="opc">printk</emphasis> 0,kf1 |
| 75 | <emphasis role="opc">printk</emphasis> 0,kf2 |
| 76 | <emphasis role="opc">kgoto</emphasis> <emphasis role="olabel">nxtmsg</emphasis> |
| 77 | <emphasis role="olabel">ex</emphasis>: |
| 78 | <emphasis role="oblock">endin</emphasis> |
| 79 | </programlisting> |
| 80 | </informalexample> |
| 81 | </refsect1> |
| 82 | |
| 83 | <refsect1> |
| 84 | <title>See also</title> |
| 85 | <para><link linkend="OSC"><citetitle>OSC (Open Sound Control)</citetitle></link></para> |
| 86 | <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> |
| 87 | </refsect1> |
| 88 | |
| 89 | <refsect1> |
| 90 | <title>Credits</title> |
| 91 | <para> |
| 92 | <simplelist> |
| 93 | <member>Author: &namejohn;</member> |
| 94 | <member>2016</member> |
| 95 | </simplelist> |
| 96 | </para> |
| 97 | </refsect1> |
| 98 | </refentry> |