blob: 7a8ff7ed00f0f2d137584b485e4138eae17cb8ff (
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
|
<refentry id="strtolk">
<indexterm id="Indexstrtolk"><primary>strtolk</primary></indexterm>
<refentryinfo><title>Strings:Conversion</title></refentryinfo>
<refmeta>
<refentrytitle>strtolk</refentrytitle>
</refmeta>
<refnamediv>
<refname>strtolk</refname>
<refpurpose>
Converts a string to a signed integer (k-rate).
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<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
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.
<note>
<title>Note</title>
<para>If a k-rate index variable is used, it should be
valid at i-time as well.
</para>
</note>
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis>kr <command>strtolk</command> Sstr</synopsis>
<synopsis>kr <command>strtolk</command> kndx</synopsis>
<para> strtolk can parse numbers in decimal, octal (prefixed by 0), and
hexadecimal (with a prefix of 0x) format.</para>
</refsect1>
<refsect1>
<title>Performance</title>
<para>
<emphasis>kr</emphasis> -- Value of string as signed integer.
</para>
<para>
<emphasis>Sstr</emphasis> -- String to convert.
</para>
<para>
<emphasis>indx</emphasis> -- index of string set by strset
</para>
</refsect1>
<!--<refsect1>
<title>Examples</title>
<para>
Here is an example of the strtolk opcode. It uses the file <ulink url="examples/strtolk.csd"><citetitle>strtolk.csd</citetitle></ulink>.
<example>
<title>Example of the strtolk opcode.</title>
<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>
<xi:include href="examples-xml/strtolk.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
</refsect1>-->
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: Istvan Varga</member>
<member>2005</member>
</simplelist>
</para>
</refsect1>
</refentry>
|