Read data from one pfield-handle or table-handle and transform it to a different representation, passing the altered data out through another pfield-handle.
pfield = makeconverter(input_handle, “converter_type”)
makeconverter returns a pfield-handle that will deliver data by applying an RTcmix data-representation conversion routine as specified by the “convertor_type” string argument. This will be applied to 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).
Many of the arguments for makeconverter may themselves also be pfield-handles.
input_handle
This is a pfield-handle variable referring to a data stream, possibly from an external device or interface or an internal PField data-generating process.
converter_type
This string value (i.e., enclosed in “double quotes” in the scorefile) determines which RTcmix data-format conversion routines (listed below) will be used to transform the values coming through the input_handle. The pfield-handle returned from the makeconverter command will refer to this transformed data stream.
The string argument for the converter to operate on the input_handle data stream can be any of the following:
For more information on these conversion types, see the documentation for the various RTcmix data format converters (such as ambdb, cpsoct, pchmidi, etc. (See the SEE ALSO section below.)
mpfield = makeconnection("midi", 1, 127, 60, 0, 1, "noteonpitch")
octpfield = makeconverter(mpfield, "pchmidi")
mpfield receives MIDI note number data from MIDI NoteOn events, and the makeconverter command will change them into the octave.pitch-class (see pchcps for a description of octave.pitch-class) notation format used by many RTcmix Instruments. The octpfield variable could then be used to control Instrument pitch dynamically.
maketable, makefilter, makeLFO, makerandom, makefilter, makemonitor, ampdb, boost, dbamp, cpsmidi, cpslet, cpsoct, cpspch, midipch, octcps, octlet, octmidi, octpch, pchcps, pchlet, pchmidi, pchoct