How to mix stereo channels¶
L/R to M/S¶
Input/output data. See how to pass data to KFR
univector<float> left;
univector<float> right;
univector<float> middle;
univector<float> side;
unpack(middle, side) = mixdown_stereo(left, right, matrix_halfsum_halfdiff());
mixdown_stereo
function takes arrays representing L and R channels and returns values multiplied by the given matrix.matrix_halfsum_halfdiff
specifies that \((L+R)/2\) and \((L-R)/2\) must be returnedunpack
writes M+S values to the given arrays
M/S to L/R¶
Code
unpack(left, right) = mixdown_stereo(middle, side, matrix_sum_diff());
matrix_sum_diff
specifies that \(M+S\) and \(M-S\) must be returned, effectively reverting back L and R channels
Downmix to mono¶
Input/output data.
univector<float> left;
univector<float> right;
univector<float> mono;
mono = (left + right) * 0.5f;
mono = left + right;