What's the easiest way to create a stereo pan control?
I was looking through the inventory of algorithms but did not see a simple stereo pan control. I'm guessing it has already been done. Any suggestions appreciated.
-CT
Hello CT,
Here's a method using basic blocks. As shown it works this way: Turn the pot (Aux ADC) to one extreme and you get unaltered stereo, the other extreme and the two channels change places. In the middle, both channels go to center (mono). If you use two pots and two Aux ADCs, you can control the two inputs independently, placing them wherever you wish.
In center position, the two mixed channels would be half-level (6 dB down), resulting in lower perceived volume. Approximate Square Root blocks adjust this level to 0.707 -- 3 dB down -- providing a smoother transition when panning. The Lowpass Filter at the Aux ADC allows use of simple multipliers instead of slew volume controls, saving instructions,
Best regards,
Bob
Thanks Bob,
I'll give that a try. How can I find the "Gain Control" in the Tree Tool box? I've always had a problem relating the graphical Sigma Studio block to it's name in the Tree Tool box. Am I missing a little tip here?
Thanks,
Charlie
Hello CT,
I'm not sure which DSP you're using -- as it turns out, here it makes a difference. I tested the above circuit with the ADAU1701, which has limited resources compared with the more advanced DSPs.
As described above, this pan pot arrangement needs Square Root blocks to provide smoother panning. The standard Square Root blocks for ADAU1701 work by Newton's iterative method, which requires many instructions. Those four blocks including "Gain Controls" are the Approximate Square Root blocks. They operate with a recursive method using fewer instructions. For more info on these two square-root methods, see Cheap square root via "op-amp" The Approximate Square Root block is found in the Toolbox as shown below. In most applications you can leave its "Gain Control" (which sets internal closed-loop gain) at its default number.
If you're using the ADAU1452, it has plenty of resources to run Square Root -- so its toolbox does not include the Approximate version. You can substitute regular Square Root blocks. The ADAU1452's Aux ADC also operates differently, with an output of 0 -- 1024 integer instead of 0 -- 1.00 decimal -- requiring additional changes to this circuit.
Best regards,
Bob
Please log in to reply.



