Skip to main content

clip

clip(
@threshold 1
) -> llll

Generates an audio process operation for applying hard-clip distortion to a buffer.


Arguments

  • @threshold [int/float/llll]: distortion amplitude threshold, either as single number or envelope. (default: 1).

Output

clip operation [llll]


Usage

clip is meant to be used with the process function:

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