undersample
Sets a lower local sampling rate based on an undersampling factor.
Syntax
Initialization
ifactor -- sets the undersampling factor. It needs to be a positive integer > 1. A factor of 1 is a non-op, zero or negative factors are illegal. The local sampling rate is set as (1/ifactor) * sr. The value of the sr variable is then changed locally. Local ksmps is also changed accordingly.
icvt_in -- converter used for input: if Secret Rabbit Code is used, then 0 - best quality sync (default); 1 - medium quality sync; 2 - fast sync; 3 - zero-order hold; and 4 - linear. 5 to 9 are the same five converters.
icvt_out -- converter used for output, defaults to the input converter, but can be different. 5 to 9 are the same five converters.
Note
Higher-quality sync converters add latency to the signal (0, 1, 2, increasing with quality). At a factor of 2, through the input and output together, it is 574, 186 and 78 samples, and 4 and 3 samples for converters 3 and 4.
k-rate arguments and outputs, and arrays of them, pass through unconverted with every converter, as the control rate does not change. So 5 to 9, which hold them under oversample, are the same as 0 to 4 here.
Calling this opcode in the same UDO as setksmps is not allowed. The opcode can only be used in UDOs. Global variables or bus channels should not be used.
See also
Credits
Author: Victor Lazzarini
New in version 7.0