makeLFO - set up a low-frequency oscillator (LFO) for control purposes, using a pfield-handle connect to an Instrument parameter
pfield = makeLFO("waveform", [interp_type,] frequency, amp/min[, max])
Parameters inside the [brackets] are optional.
makeLFO returns a pfield-handle that will deliver data from an internal low-frequency oscillator (LFO) inside RTcmix for controlling various Instrument parameters perdiodically. The waveform used is deteremined by the "waveform" argument, with the frequency (in Hz) set by the frequency argument. There is no real upper bound on the 'low frequency' used, but practically the upper limit is constrained by the control reset rate (see the reset scorefile command for a discussion of this rate). Typically LFOs operate beyond the lower bound of human pitch-perception, below 20-25 Hz. Much higher rates can be used for various modulation effects (AM, FM, etc.) but using a PField with a high control rate to do this is rather inefficient. RTcmix provides a number of Instruments for performing these kinds of audio-modulation operations (see the FMINST, AMINST, AM and WIGGLE Instruments, for example). The LFO will produce periodic values ranging from +amp to -amp, or min to max. The optional interp_type specifier can change how values are delivered from the internal waveform table, in the same way that the "interp" optional specifier in the maketable command does.
Many of the arguments for makeLFO may themselves also be pfield-handles.
The following waveforms may be specified by a string argument for waveform:
vib = makeLFO("sine", 3.5, 10.0) pan = makeLFO("tri", 0.5, 0.0, 1.0) wave = maketable("wave", 1000, 1.0, 0.2, 0.1) WAVETABLE(0, 3.5, 15000, 478 + vib, pan, wave)This scorefile uses two low-frequency oscillators, one causing a 3.5 Hz sinusoidal deviation from the 478 Hz base frequency of the WAVETABLE Instrument by +/- 10 Hz through the vib pfield-handle, and the other controlling the stereo placement via a 0.5 Hz triangle-wave going from a minimum value of 0.0 to a maximum value of 1.0 (the pan pfield-handle).
makeconnection, maketable, makerandom, makefilter, makeconverter, makemonitor