makefilter

Create a “filter” to alter PField control data, reading from one pfield-handle or table-handle and passing the altered data through another pfield-handle.


Synopsis

pfield = makefilter(input_handle, “filter_type”, arg1, arg2, …)

Parameters inside the [brackets] are optional.


Description

makefilter returns a pfield-handle that will deliver data by applying an operation defined by “filter_type” to the data coming through the input-handle variable. The input_handle variable can be any of the PField-derived variables in RTcmix, such as a table-handle (see maketable) or another pfield-handle (see makeconnection, makeLFO or makerandom). The arguments vary depending on each filter_type.

Many of the arguments for makefilter may themselves also be pfield-handles.


Arguments


Filter Types


Examples

rpfield = makerandom("even", 7.0, 0.0, 100.0)
smpfield = makefilter("smooth", 20)
qpfield = makefilter("quantize", 20)
rpfield = makefilter("fitrange", 0.0, 1.0)

The makerandom scorefile command will output random numbers between 0.0 and 100.0 at a rate of 7 times/second (7.0 Hz). Three different makefilter commands modify that data. Associated with the smpfield variable will be data that is ‘smoothed’ by 20% – large jumps in the random values will be “filled in” by interpolated values. The qpfield stream will deliver data that consists of the closest integer multiple of 20 (the output will be [0.0, 20.0, 40.0, 60.0, 80.0, 100.0] depending on the value of the input). rpfield will take the [0.0, 100.0] range and scale it to fit between 0.0 and 1.0.

table = maketable("literal", "nonorm", 0, 8.00, 8.02, 8.04, 8.05, 8.07)
rpfield = makerandom("even", 10.0, 8.00, 8.07)
pitches = makefilter(rpfield, "constrain", table, 1.0)

This will take the random numbers (generated 10 times each second) coming through rpfield and cause them to generate one of the specific values in the table set of values. The result will be assigned through the p-field variable pitches

table = maketable("expbrk", 1000, 0.0001, 1000, 1.0)
newpfield = makefilter("invert", table)

The p-field newpfield will be associated with data containing a convex version of the concave exponential curve (or maybe vice-versa) created using the original “expbrk” table-type.


See Also

maketable, modtable, makeconnection, makeLFO, makerandom, makeconverter, makemonitor