From: Tim E. R. <ter...@ro...> - 2013-04-12 20:00:51
|
On April 12, 2013 05:42:44 PM Florian Jung wrote: > Am 11.03.2013 08:55, schrieb Tim E. Real: > > Hey. > > I'm working in the audio mixing engine again. > > > > I'm finally adding sample-accurate track controllers > > > > such as volume and pan. The code also demonstrates the place > > to inject sample-accurate faders and cross-faders when we > > get around to adding them. > > > > I've noticed that we do possibly incorrect things with the pan control. > > > > Our pan knob goes from -1.0 to 1.0. > > > > The pan formula we use is: > > vol_L = _volume * (1.0 - _pan); > > vol_R = _volume * (1.0 + _pan); > > from analouge devices, i'm used to this: > > if PAN is set to "middle", both speakers are at 0dB > if PAN is turned toward the right speaker, then the left speaker gets > quieter, but the right speaker stays at the same volume. Ah, what you've got there is balance which generally applies to stereo strips. Whereas on mono strips the knob should operate like a pan using a formula similar to the above. Currently MusE simply uses the same formula for both mono and stereo strip knobs. So I considered tailoring the operation of the knob depending on whether it's a stereo or mono strip. But actually I haven't touched the formula(s) at all yet. That's likely gonna come later when I'm done all this audio engine stuff, sort of like icing on the cake. If and when I touch the mono pan formula it will likely be the sin2/cos2 law that was suggested to me on LAD. As for stereo balance, if it is to be done, I suppose it would be best to also include it at the same time. We'll see... Tim. > > i.e., when at center, you need more power to drive the boxes than when > at left/right. > > greetings, > flo |