Skip to main content

rounding

rounding(
@value 1
@nearest 1
) -> llll

Generates an audio process operation for applying signal rounding to a buffer.


Arguments

  • @value [int/float/list/llll]: rounding value, as either a single number, envelope, or buffer. (default: 1).
  • @nearest [int]: rounding behavior (default: 1).
    • 0: floor
    • 1: nearest

Output

rounding operation [llll]


Usage

rounding is meant to be used with the process function:

$buffer = importaudio('singing.wav'); ## input buffer
$op = rounding(0.2); ## processing operation
$buffer = $buffer.process($op); ## apply processing
$buffer.inspect('after rounding process')