Skip to main content

power

power(
@operand 2
@resamplingfiltersize 11
@resamplingmode 'sinc'
@resamplingpolicy 3
@envtimeunit 2
) -> llll

Generates an audio process operation for performing exponentiation on a buffer.


Arguments

  • @operand [int/float/llll]: value to raise buffer signal to, either as a single number, envelope, or buffer. (default: 2).
  • @resamplingfiltersize [int]: resampling filter size. (default: 11).
  • @resamplingmode [symbol]: resampling mode. (default: 'sinc').
    • 'sinc'
    • 'nearest neighbor'
    • 'sample and hold'
    • 'linear'
    • 'quad'
    • 'cubic'
  • @resamplingpolicy [int]: resampling policy. (default: 3).
    • 0: don't
    • 1: to lowest
    • 2: to highest
    • 3: to most common
    • 4: to max. current
  • @envtimeunit [int]: envelope time unit. (default: 2).
    • 0: milliseconds
    • 1: samples
    • 2: duration ratio
    • 3: milliseconds difference
    • 4: samples difference

Output

power operation [llll]


Usage

power is meant to be used with the process function:

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