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.view('after panning process')