Previous Up Next

5.24.5  Averaging channel data : stereo2mono

stereo2mono takes a multichannel audio clip as its argument and returns a clip with input channels mixed down to a single channel. Every sample in the output is the arithmetic mean of the samples at the same position in the input channels.

For example, input :

t:=soundsec(3):;
L,R:=sin(2*pi*440*t),sin(2*pi*445*t):;
s:=stereo2mono(createwav([L,R])):; playsnd(s)

Previous Up Next