Audio Question


#1

What is the simplest juce way to convert a buffer of stereo channels into a new buffer with one mono channel?

processBlock( AudioSampleBuffer &buffer, MidiBuffer &midiMessages)
{
    if ( isMono )
   {
       AudioSampleBuffer monoBuffer;

       .......
    }

}


#2

Well, not sure about the best way in JUCE. But the general procedure is: Add both stereo channels and divide by two => mono channel.


#3

That is what I am doing for now. I thought juce might have a built-in method.

Thanks


#4

Not sure what your background is, nor what your case is, but a bit of information; doing what Alatar suggested risks ruining an intended stereo mix. Professional studio mixing engineers tend to have tested and prepared their stereo mix for monophonic playback (ie: movies, music) by using the left channel.


#5

Joel - my understanding is that the usual practise when checking mono compatibility with stereo monitors is to fold down the stereo channels to mono using summing (as described by Alatar) but then listen to the result through only one monitor speaker (left or right, depending on local convention). Is that what you meant?


#6

We have plenty of methods for adding channels and applying a gain. I think it'd be over-specialisation to add something that does stereo-to-mono specifically.