| 1 |
|
| 2 |
<refentry id="strtodk"> |
| 3 |
<indexterm id="Indexstrtodk"><primary>strtodk</primary></indexterm> |
| 4 |
<refentryinfo><title>Strings:Conversion</title></refentryinfo> |
| 5 |
<refmeta> |
| 6 |
<refentrytitle>strtodk</refentrytitle> |
| 7 |
</refmeta> |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
<refnamediv> |
| 12 |
<refname>strtodk</refname> |
| 13 |
<refpurpose> |
| 14 |
Converts a string to a float (k-rate). |
| 15 |
</refpurpose> |
| 16 |
</refnamediv> |
| 17 |
|
| 18 |
<refsect1> |
| 19 |
<title>Description</title> |
| 20 |
|
| 21 |
<para> Convert a string to a floating point value at i- or k-rate. It is also possible to pass an strset index or a string p-field from the score instead of a string |
| 22 |
argument. If the string cannot be parsed as a floating point or integer number, an init or perf error occurs and the instrument is deactivated. |
| 23 |
|
| 24 |
<note> |
| 25 |
<title>Note</title> |
| 26 |
<para>If a k-rate index variable is used, it should be |
| 27 |
valid at i-time as well. |
| 28 |
</para> |
| 29 |
</note> |
| 30 |
|
| 31 |
</para> |
| 32 |
|
| 33 |
</refsect1> |
| 34 |
|
| 35 |
<refsect1> |
| 36 |
<title>Syntax</title> |
| 37 |
<synopsis>kr <command>strtodk</command> Sstr</synopsis> |
| 38 |
|
| 39 |
<synopsis>kr <command>strtodk</command> kndx</synopsis> |
| 40 |
</refsect1> |
| 41 |
|
| 42 |
|
| 43 |
<refsect1> |
| 44 |
<title>Performance</title> |
| 45 |
<para> |
| 46 |
<emphasis>kr</emphasis> -- Value of string as float. |
| 47 |
</para> |
| 48 |
|
| 49 |
<para> |
| 50 |
<emphasis>Sstr</emphasis> -- String to convert. |
| 51 |
</para> |
| 52 |
|
| 53 |
<para> |
| 54 |
<emphasis>indx</emphasis> -- index of string set by strset |
| 55 |
</para> |
| 56 |
|
| 57 |
</refsect1> |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
<refsect1> |
| 76 |
<title>See Also</title> |
| 77 |
<para><link linkend="stringconvert"><citetitle></citetitle>String Conversion Opcodes</link></para> |
| 78 |
</refsect1> |
| 79 |
|
| 80 |
<refsect1> |
| 81 |
<title>Credits</title> |
| 82 |
<para> |
| 83 |
<simplelist> |
| 84 |
<member>Author: Istvan Varga</member> |
| 85 |
<member>2005</member> |
| 86 |
</simplelist> |
| 87 |
</para> |
| 88 |
</refsect1> |
| 89 |
</refentry> |