tablefilterTable Control:Read/Write Operationstablefiltertablefilter
Filters a source table and writes result into a destination table.
Description
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.
Syntaxknumpassed tablefilter kouttable, kintatble, kmode, kparamPerformanceknumpassed -- the number of elements that
have passed the filter.
kouttable -- the number of the table containing the values that have passed.
kintatble -- the number of the table used as filter input.
kmode -- mode of the filter:
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.
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.
kparam -- 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.
Examples
Here is an example of the tablefilter opcode. It uses the file tablefilter.csd.
Example of the tablefilter opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.See alsoRead/Write OperationsCreditsAuthor: Georg Boenn University of Glamorgan, UKNew in Csound version 5.13