Skip to main content

panning

panning(
@position 0.5
@numchannels 2
@panmode 0
@panlaw 1
@rangetype 1
@range 0 1
@compensate 1
@spread 1
@envtimeunit 2
) -> llll

Generates an audio process operation for applying 1-D panning to a buffer.


Arguments

  • @position [int/float/list/llll]: panning position, as either a single number, envelope, or buffer. (default: 0.5).
  • @numchannels [int]: number of output channels. (default: 2).
  • @panmode [int]: panning mode. (default: 0).
    • 0: linear
    • 1: circular
  • @panlaw [int]: panning law. (default: 1).
    • 0: nearest neighbor
    • 1: cosine
  • @rangetype [int]: panning range type. (default: 1).
    • 0: custom
    • 1: 0 to 1
    • 2: -1 to 1
    • 3: loudspeaker number — 0-based
    • 4: loudspeaker number — 1-based
  • @range [list]: panning range, as a <min> <max> value pair. Ignored unless @rangetype is 0 (default: 0 1).
  • @compensate [int]: Reduce gain for multichannel files by a factor of the number of channels. (default: 1).
    • 0: off
    • 1: on
  • @spread [int/float]: multichannel panning spread, between 0 and 1. (default: 1).
  • @envtimeunit [int]: time unit for @gain envelope. (default: 2).
    • 0: milliseconds
    • 1: samples
    • 2: duration ratio
    • 3: milliseconds difference
    • 4: samples difference

Output

panning operation [llll]


Usage

panning is meant to be used with the process function:

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