undersample

undersample — Sets a lower local sampling rate based on an undersampling factor.

Description

Sets the local sampling rate value in a user-defined opcode block.

Syntax

undersample ifactor[,imode] 

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.

imode -- resampling mode: 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.

[Note] Note

Calling this opcode in the same UDO as setksmps is not allowed. The opcode can only be used in UDOs. Audio or control rate array arguments are not allowed. Global variables or bus channels should not be used.

See Also

endop, opcode, xin, xout

Credits

Author: Victor Lazzarini

New in version 7.0