Skip to main content

mixdown

mixdown(
@numchannels 1
@channelmode 3
@autogain 0
) -> llll

Generates an audio process operation for mixing down (or up) the number of channels of a buffer.


Arguments

  • @numchannels [int]: Number of output channels. (default: 1).
  • @channelmode [int]: Downmixing channel conversion type. (default: 3).
    • 0: Delete all samples
    • 1: Only keep existing channels
    • 2: Pad last channel
    • 3: Cyclic repetition of channels while upmixing.
    • 4: Palindrome cycling of channels while upmixing.
    • 5: Pan channels to new configuration
  • @autogain [int]: Apply audio compensation, based on ratio between input and output channels. (default: 0).
    • 0: Off
    • 1: On

Output

Mixdown operation [llll]


Usage

mixdown is meant to be used with the process function:

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