NAME

makeconverter - 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.


SYNOPSIS

pfield = makeconverter(input_handle, "converter_type")


DESCRIPTION

makeconverter returns a pfield-handle that will deliver data by applying an RTcmix data-representation format 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.


ARGUMENTS

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.


Converter Types

The string argument for the converter to operate on the input_pfield data stream can be any of the following: For more information on these conversion types, see the documentation for the RTcmix data format converters.


EXAMPLES

   mpfield = makeconnection("midi", 1, 127, 60, 0,
      1, "noteonpitch")
   octpfield = makeconverter(mpfield, "pchmidi")
mpfield receives MIDI note # 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.


SEE ALSO

maketable, makefilter, makeLFO, makerandom, makefilter, makemonitor