| 1 | |
| 2 | <refentry id="OSCraw"> |
| 3 | <indexterm id="IndexOSCraw"><primary>OSCraw</primary></indexterm> |
| 4 | <refentryinfo><title>OSC</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>OSCraw</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>OSCraw</refname> |
| 11 | <refpurpose> |
| 12 | Listen for all OSC messages at a given port. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | On each k-cycle looks to see if an OSC message has been received |
| 20 | at a given port and copies its contents to a string array. All |
| 21 | messages are copied. If a bundle of messages is received, the |
| 22 | output array will contain all of the messages in it. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis>Smess[],klen <command>OSCraw</command> iport</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>iport</emphasis> |
| 35 | -- a port where messages are going to be received from. |
| 36 | </para> |
| 37 | |
| 38 | </refsect1> |
| 39 | |
| 40 | <refsect1> |
| 41 | <title>Performance</title> |
| 42 | <para> |
| 43 | <emphasis>Smess[]</emphasis> -- an array of strings containing |
| 44 | the message components: address, types, and data items. If the |
| 45 | array does not exist (ie. has not been initialised), one will be |
| 46 | created with size 2. Arrays cannot grow with the size of the |
| 47 | message, so if a message with more than 2 items (ie. with any |
| 48 | data items) is to be fully copied into the output, a larger array needs to initialised |
| 49 | before it is used. If a message has more items than an array has |
| 50 | space for, it is truncated. |
| 51 | </para> |
| 52 | <para> |
| 53 | <emphasis>klen</emphasis> -- number of items placed in the |
| 54 | output array. It is 0 if no message has been received, and at |
| 55 | least 2 if a message has been received (address, types are the |
| 56 | minimum items). |
| 57 | </para> |
| 58 | |
| 59 | </refsect1> |
| 60 | |
| 61 | <refsect1> |
| 62 | <example> |
| 63 | <title>Example.</title> |
| 64 | <para>The following CSD file demonstrates how a message is |
| 65 | received by OSCraw:</para> |
| 66 | <xi:include href="examples-xml/OSCraw.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 67 | </example> |
| 68 | </refsect1> |
| 69 | |
| 70 | <refsect1> |
| 71 | <title>See also</title> |
| 72 | <para><link linkend="OSC"><citetitle>OSC (Open Sound Control)</citetitle></link></para> |
| 73 | <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> |
| 74 | </refsect1> |
| 75 | |
| 76 | <refsect1> |
| 77 | <title>Credits</title> |
| 78 | <para> |
| 79 | <simplelist> |
| 80 | <member>Authors: Oeyvind Brandtsegg, Victor Lazzarini</member> |
| 81 | <member>2017</member> |
| 82 | </simplelist> |
| 83 | </para> |
| 84 | <para>types aAG are new in Csound 6.07</para> |
| 85 | </refsect1> |
| 86 | </refentry> |