reset / control_rate

Set the update rate for control functions and envelopes.


Synopsis

control_rate(update_rate)

reset(update_rate)


Description

For instruments that are designed to use resetval in updating control functions and envelopes (pfields), reset determines how many times/second the control function/envelope is ‘sampled’. For example,

   reset(48000)

will cause a control function to be sampled 48000 times/second (or once-every-sample for a standard 48k sampling-rate sound).

Why is this desired? Often it is not necessary to update control functions for every sample, and an instrument can run much more efficiently by choosing a lower sampling rate for control functions.

The default rate is 1000 times per second.

Most, but not all, RTcmix instrument control parameters will respond to the reset command. Exceptions for particular controls are usually noted in the instrument documentation.

If the reset rate is made too slow, a “stair-stepping” or “zippering” distortion effect can occur in control function access, especially noticeable in amplitude envelopes.


Arguments


Examples

   reset(10000)
   control_rate(22050)

See Also

rtsetparams