scaling
scaling(
@inmin 0
@inmax 1
@outmin 0
@outmax 1
) -> llll
Generates an audio process operation for applying amplitude scaling to a buffer.
Arguments
@inmin
[int/float/llll]: Input minimum value. (default:0
).@inmax
[int/float/llll]: Input maximum value. (default:1
).@outmin
[int/float/llll]: Output minimum value. (default:0
).@outmax
[int/float/llll]: Output maximum value. (default:1
).
Output
Scaling operation [llll]
Usage
scaling
is meant to be used with the process
function:
$buffer = cycle(@frequency 5 @duration 1000); ## input buffer
$op = scaling(-1, 1, 0, 1); ## processing operation
$buffer = $buffer.process($op); ## apply processing
$buffer.view('after scaling process')