MixingMatrix

One of the type of Objects in Praat. A MixingMatrix shows a mapping of the channels of an input Sound to the channels of an output Sound. A channel in the input sound is called an input channel. Each output channel is a linear combination of input channels.

The mixing of input channels can be written as the matrix multiplication R=M·S. Here S is the matrix that represents the input sound, with numberOfInputs rows and numberOfSamples columns. Each row in S corresponds to one input channel. M is the numberOfOutputChannels× numberOfInputs MixingMatrix and R is the numberOfOutputChannels× numberOfSamples matrix that is the result of the mixing.

Row i in the MixingMatrix M therefore represents the weights mij of the different input channels j in output channel i, the number of rows of M determines the number of output channels in the resulting R. Column j in M represents the weight factors mij of input j in the different output channels i.

Examples

Given the following stereo Sound with a tone of 300 Hz in channel 1 and a tone of 600 Hz in channel two:

stereo = Create Sound from formula: "s", 2, 0, 1, 44100, "sin(2*pi*row*300*x)"
Example 1
mm1 = Create simple MixingMatrix: "mm1", 2, 1, "1 0"
selectObject: mm1, stereo
Mix
will produce a new mono Sound object that shows a tone with a frequency of 300 Hz.
The example creates a Mixing matrix with one row and two columns. The resulting new Sound object will have only one channel which is the result of adding the two channels from the stereo sound with weights of 1.0 and 0.0, respectively.
Example 2
mm2 = Create simple MixingMatrix: "mm2", 2, 1, "0 1"
selectObject: mm2, stereo
Mix
will produce a new mono Sound object that shows a tone with a frequency of 600 Hz.
Example 3
mm3 = Create simple MixingMatrix: "mm3", 2, 1, "1 1"
selectObject: mm3, stereo
Mix
will produce a new mono Sound object that shows a complex tone composed of frequencies 300 and 600 Hz. The amplitude of the output sound will be larger than 1
Example 4
mm4 = Create simple MixingMatrix: "mm4", 2, 2, "1 0 1 0"
selectObject: mm4, stereo
Mix
will produce a new stereo Sound object that shows a tone of frequency 300 Hz in both channels.
Example 5
mm5 = Create simple MixingMatrix: "mm5", 2, 1, "0.5 0.5"
selectObject: mm5, stereo
Mix
will produce a new mono Sound object that shows a complex tone composed of frequencies 300 and 600 Hz. The amplitudes of the output sound are now half the amplitude of the output sound of example 3.
Example 6
mono = Create Sound from formula: "s", 1, 0, 1, 44100, "sin(2*pi*300*x)"
mm6 = Create simple MixingMatrix: "mm6", 1, 2, "1 1"
selectObject: mm6, mono
Mix
will produce from the mono input sound a stereo output sound that shows a tone of frequency 300 Hz in both channels.
Example 7
mm7 = Create simple MixingMatrix: "mm7", 2, 2, "0 1 1 0"
selectObject: mm7, stereo
Mix
will interchange the channels.
Example 8

Links to this page


© djmw 20170907