TonicAudio / Tonic

Easy and efficient audio synthesis in C++
The Unlicense
523 stars 63 forks source link

Single Panner/Balance Generator that can handle stereo or mono signals #209

Open morganpackard opened 11 years ago

morganpackard commented 11 years ago

Maybe just a naive, linear amplitude reduction in left and right, depending on pan value? Just a simple enhancement to MonoToStereoPanner to allow it to handle stereo signals? Any thoughts @ndonald2?

ndonald2 commented 11 years ago

Yeah, that sounds about right. But the name should probably be changed to just Panner, which acts as a linear panner for mono signals and a linear balance for stereo signals. IMO that's what most people would probably expect.

If there's enough of a concern for backwards compatibility we can just make an empty public subclass as an alias of Panner called MonoToStereoPanner so things still work.

Personally I prefer other curves to linear, but we can add EqualPowerPanner and StereoImagePanner or whatever as they become necessary.

ndonald2 commented 11 years ago

If there's enough of a concern for backwards compatibility we can just make an empty public subclass as an alias of Panner called MonoToStereoPanner so things still work.

Or a macro that redefines existing declarations:

#define MonoToStereoPanner Panner