mix
mix(
@buffers ## list/llll (required)
@gains null
@offsets null
@resamplingfiltersize 11
@resamplingmode 'sinc'
@resamplingpolicy 3
@ampunit 0
@envampunit 0
@timeunit 0
@envtimeunit 2
@interp 0
@normalize 0
) -> llll
Generates an audio process operation for mixing multiple buffers.
Arguments
@buffers
[list/llll]: List of buffers to mix. (required)@gains
[list/llll/null]: Gain values for each buffer to mix, as either a single number or envelope. (default:null
).@offsets
[list/null]: Time offset values for each buffer to mix. (default:null
).@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't1
: To lowest2
: To highest3
: To most common4
: To max. current
@ampunit
[int]: Amplitude unit. (default:0
).0
: Linear1
: Decibels
@envampunit
[int]: Envelope amplitude unit. (default:0
).0
: Linear1
: Decibels
@timeunit
[int]: Time unit. (default:0
).0
: Milliseconds1
: Samples2
: Duration ratio3
: Milliseconds difference4
: Samples difference
@envtimeunit
[int]: Envelope time unit. (default:2
).0
: Milliseconds1
: Samples2
: Duration ratio3
: Milliseconds difference4
: Samples difference
@interp
[int]: Band-limited interpolation via resampling for non-integer offsets. (default:0
).0
: Off1
: On
@normalize
[int]: Normalization. (default:0
).0
: Never1
: Always2
: Overload protection only
Output
Mix operation [llll]
Usage
mix
is meant to be used with the process
function:
$buffer = importaudio('singing.wav'); ## input buffer
$op = mix(
@buffers importaudio('guitar.wav') importaudio('drums.wav')
); ## processing operation
$buffer = $buffer.process($op); ## apply processing
$buffer.view('after mix process')