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.inspect('after mix process')