Mix an Array of channels to an Array of channels.
in |
The input signal, an array. |
matrix |
The mixing matrix. |
mul |
Output will be multiplied by this value. |
add |
This value will be added to the output. |
An array of channels.
// hand code a mono signal to a planewave in B-format ( { var matrix; var sig; // define encoding matrix matrix = Matrix.with([ [ 2.sqrt.reciprocal ], [ 1 ], [ 0 ], [ 0 ] ]); // pink noise sig = PinkNoise.ar; // encode AtkMatrixMix.ar(sig, matrix); }.scope )
// hand code a stereo signal to a +/-45deg in B-format ( { var matrix; var sig; // define encoding matrix matrix = Matrix.with([ [ 2.sqrt.reciprocal, 2.sqrt.reciprocal ], [ 2.sqrt.reciprocal, 2.sqrt.reciprocal ], [ 2.sqrt.reciprocal, 2.sqrt.reciprocal.neg ], [ 0, 0 ] ]); // pink noise sig = PinkNoise.ar([1, 1]); // encode AtkMatrixMix.ar(sig, matrix); }.scope )