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
89
90
91
92
93
94
95
96
97
98
|
<refentry id="tablefilteri">
<indexterm id="IndexTablefilteri"><primary>tablefilteri</primary></indexterm>
<refentryinfo><title>Table Control:Read/Write Opreations</title></refentryinfo>
<refmeta>
<refentrytitle>tablefilteri</refentrytitle>
</refmeta>
<refnamediv>
<refname>tablefilteri</refname>
<refpurpose>
Filters a source table and writes result into a destination table.
</refpurpose>
</refnamediv>
<refsect1>
<title>Description</title>
<para>
This opcode can be used in order to filter values from function
tables following certain algorithms. The filtered output is
written into a destination table and the number of elements that
have passed the filter is returned.
</para>
</refsect1>
<refsect1>
<title>Syntax</title>
<synopsis>inumpassed <command>tablefilteri</command> iouttable, iintatble, imode, iparam</synopsis>
</refsect1>
<refsect1>
<title>Initialization</title>
<para>
<emphasis>inumpassed</emphasis> -- the number of elements that
have passed the filter.
</para>
<para>
<emphasis>iouttable</emphasis> -- the number of the table containing the values that have passed.
</para>
<para>
<emphasis>iintatble</emphasis> -- the number of the table used as filter input.
</para>
<para>
<emphasis>imode</emphasis> -- mode of the filter:
<itemizedlist>
<listitem>
1 -- tests the weight of the denominators of the fractions
in the source table. Letting pass only values from the
source that are less heavy than the weight of the threshold.
</listitem>
<listitem>
2 -- tests the weight of the denominators of the fractions
in the source table. Letting pass only values from the
source that are heavier than or equal to the weight of the
threshold.
</listitem>
</itemizedlist>
</para>
<para>
<emphasis>iparam</emphasis> -- integer threshold parameter for
the filter. It means that denominators whose weights are heavier
than the weight of this threshold are not passed through the
filter. The weight of an integer is calculated using Clarence
Barlow's function of indigestibility of a number. According to
this function, higher prime numbers contribute to an increased
weight of any natural integer they divide. The order of the
first 16 integers according to their indigestibility is: 1, 2,
4, 3, 8, 6, 16, 12, 9, 5, 10, 15, 7, 14.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<para>
Here is an example of the tablefilteri opcode. It uses the file <ulink url="examples/tablefilter.csd"><citetitle>tablefilter.csd</citetitle></ulink>.
<example>
<title>Example of the tablefilteri 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/tablefilter.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</example>
</para>
</refsect1>
<refsect1>
<title>Credits</title>
<para>
<simplelist>
<member>Author: Georg Boenn </member>
<member>University of Glamorgan, UK</member>
</simplelist>
</para>
<para>New in Csound version 5.13</para>
</refsect1>
</refentry>
|