| 1 | |
| 2 | <refentry id="nstrstr"> |
| 3 | <indexterm id="IndexNstrstr"><primary>nstrstr</primary></indexterm> |
| 4 | <refentryinfo><title>Instrument Control:Initialization and Reinitialization</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>nstrstr</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>nstrstr</refname> |
| 11 | <refpurpose> |
| 12 | Returns the string of a named instr from its number. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Returns the string of a named instr from its number or an empty |
| 20 | string if no such association exists. |
| 21 | </para> |
| 22 | </refsect1> |
| 23 | |
| 24 | <refsect1> |
| 25 | <title>Syntax</title> |
| 26 | <synopsis>Sname <command>nstrstr</command> insno</synopsis> |
| 27 | <synopsis>Sname <command>nstrstr</command> knsno</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | <emphasis>insno</emphasis> -- the instrument number of the named instrument. |
| 34 | </para> |
| 35 | </refsect1> |
| 36 | |
| 37 | <refsect1> |
| 38 | <title>Performance</title> |
| 39 | <para> |
| 40 | <emphasis>knsno</emphasis> -- the named instrument's number. |
| 41 | </para> |
| 42 | <para> |
| 43 | <emphasis>Sname</emphasis> -- the named instrument's name. |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | If an instrument with the specified name does not exist an empty |
| 48 | string is returned. |
| 49 | </para> |
| 50 | </refsect1> |
| 51 | |
| 52 | |
| 53 | <refsect1> |
| 54 | <title>Examples</title> |
| 55 | <para> |
| 56 | Here is an example of the nstrstr opcode. It uses the file <ulink url="examples/nstrnum_nstrstr.csd"><citetitle>nstrnum_nstrstr.csd</citetitle></ulink>. |
| 57 | <example> |
| 58 | <title>Example of the nstrstr opcode.</title> |
| 59 | <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> |
| 60 | <xi:include href="examples-xml/nstrnum_nstrstr.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 61 | </example> |
| 62 | </para> |
| 63 | |
| 64 | <para> |
| 65 | The example will produce the following output: |
| 66 | <screen> |
| 67 | instrument name = john |
| 68 | instrument number = 2 |
| 69 | </screen> |
| 70 | </para> |
| 71 | |
| 72 | </refsect1> |
| 73 | |
| 74 | |
| 75 | |
| 76 | <refsect1> |
| 77 | <title>Credits</title> |
| 78 | <para> |
| 79 | <simplelist> |
| 80 | <member>Author: &namejohn;</member> |
| 81 | <member>New in version 6.13</member> |
| 82 | <member>Written in the year 2019.</member> |
| 83 | </simplelist> |
| 84 | </para> |
| 85 | </refsect1> |
| 86 | </refentry> |