Skip to main content

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 = importaudio('singing.wav'); ## input buffer
$op = scaling(); ## processing operation
$buffer = $buffer.process($op); ## apply processing
$buffer.inspect('after scaling process')