has panning been programmed?
-
- KVRist
- Topic Starter
- 128 posts since 17 Dec, 2003 from Germany
Hello
I'm building a plugin where I need to pan a mono audio between two outputs.
What I did is patch it to both outputs and multiply each side by something: 1 and 0 for left, 0 and 1 for right, o.k.,... but 0.5 and 0.5 for center is too soft. So this has to be what? Logarithmic somehow?
Can someone tell me if I find that in an already built plugin or how a formula for a sensible pan law would be?
Thanks!
Uli
EDIT: solved! For final version see below.
I'm building a plugin where I need to pan a mono audio between two outputs.
What I did is patch it to both outputs and multiply each side by something: 1 and 0 for left, 0 and 1 for right, o.k.,... but 0.5 and 0.5 for center is too soft. So this has to be what? Logarithmic somehow?
Can someone tell me if I find that in an already built plugin or how a formula for a sensible pan law would be?
Thanks!
Uli
EDIT: solved! For final version see below.
Last edited by hellleutel on Wed Dec 12, 2007 9:12 am, edited 1 time in total.
-
- KVRer
- 8 posts since 7 Dec, 2007 from London, UK
-
- KVRist
- Topic Starter
- 128 posts since 17 Dec, 2003 from Germany
that would be too loud in the middle. well I'm afraid it is logarithmic, so god have mercy on meeesn wrote:you could go [1*left, 1*right] for middle, [0*left 1*right] for hard right, vice versa for hard left?
-
- KVRist
- Topic Starter
- 128 posts since 17 Dec, 2003 from Germany
EDIT: solved! For final version see below.
---
I put the file to
http://www.bestsharing.com/files/kSdiUI ... a.zip.html
so maybe someone else will have mercy on me
BTW this filesharing service seems like a viable storage solution as long as there is no official one.
see you
Uli
---
I put the file to
http://www.bestsharing.com/files/kSdiUI ... a.zip.html
so maybe someone else will have mercy on me
BTW this filesharing service seems like a viable storage solution as long as there is no official one.
see you
Uli
Last edited by hellleutel on Wed Dec 12, 2007 9:12 am, edited 2 times in total.
-
- KVRAF
- 2029 posts since 21 Jul, 2004
Do some research about panning laws.
http://www.samplecraze.com/tutorial.php?xTutorialID=35
http://www.eqmag.com/article/how-are-things/Mar-05/7200
http://en.wikipedia.org/wiki/Pan_law
I'm not sure where any code examples are but there is probably some open source plug or application somewhere that you should be able to reference.
http://www.samplecraze.com/tutorial.php?xTutorialID=35
http://www.eqmag.com/article/how-are-things/Mar-05/7200
http://en.wikipedia.org/wiki/Pan_law
I'm not sure where any code examples are but there is probably some open source plug or application somewhere that you should be able to reference.
Do not lick the fablanky
-
- KVRist
- Topic Starter
- 128 posts since 17 Dec, 2003 from Germany
o.. yesfunkadil wrote:Do some research about panning laws.
So if I want the Left channel to be reduced by 6 db when a signal is panned to center and by -oo db when panned to the right side.
Don't know how to do that. I thought "research is great, asking the group is even better". Anyway I can live somehow without it.
best
Uli
-
- KVRist
- 92 posts since 29 Nov, 2007
OK I figured out the pan law problem. I made a -3dB pan law plug which could easily be turned into a -6dB pan law plug. I haven't exported the plug or made a GUI and the the pan control is currently a slider instead of a knob - thought I might like that for a change. Anyway, if you want to go ahead and make a nice gui with a big knob etc go for it.
A lot of variations on this theme are possible with different mappings to get from a center pan to a hard pan setting, even with just a -3dB pan law. The function used can be different than the square root curve I used and could give a whole different feel to playing with the panning knob even though the extremes and center would remain the same.
the sb file is called: Pan_Law_Minus3dB.sbc
and an explanation of the math is provided as a pdf: Pan_Law_Explain.pdf
Both files are posted at http://dscrofani.junker.org
This turned out to be a fun and interesting project. I learned a heck of a lot about pan laws.
A lot of variations on this theme are possible with different mappings to get from a center pan to a hard pan setting, even with just a -3dB pan law. The function used can be different than the square root curve I used and could give a whole different feel to playing with the panning knob even though the extremes and center would remain the same.
the sb file is called: Pan_Law_Minus3dB.sbc
and an explanation of the math is provided as a pdf: Pan_Law_Explain.pdf
Both files are posted at http://dscrofani.junker.org
This turned out to be a fun and interesting project. I learned a heck of a lot about pan laws.
-
- KVRist
- Topic Starter
- 128 posts since 17 Dec, 2003 from Germany
cool. Thank you, that's even a much more simple solution than I was expecting.dscro wrote: This turned out to be a fun and interesting project. I learned a heck of a lot about pan laws.
My final version (no time for creation of a cooler GUI) of "Allapanna"
http://www.bestsharing.com/files/RSklRI ... t.zip.html
Have a nice time!
uli
-
- KVRist
- 239 posts since 17 Aug, 2005
I've come up with a circuit which allows both -6 and -3dB pan laws.
I wish this forum allowed posting of images or attachments (read LAME LAME LAME!!!)
Basically a slider is given a value of -1 to +1
The slider output is fed to the LEFT chain:
constant subtraction, value = 1
negation
absolute value
constant multiply value = 0.5
This resulting signal feeds the "b" input of the LEFT audio multiplier.
The RIGHT signal chain is:
constant addition, value = 1
absolute value
constant multiply value = 0.5
This resulting signal feeds the "b" input of the RIGHT audio multiplier.
If you want a -3dB law, insert a 'square root' module after the 'constant multiply' module on each channel
I built one which uses a comparator to switch between the two laws.
CZ.[/img]
I wish this forum allowed posting of images or attachments (read LAME LAME LAME!!!)
Basically a slider is given a value of -1 to +1
The slider output is fed to the LEFT chain:
constant subtraction, value = 1
negation
absolute value
constant multiply value = 0.5
This resulting signal feeds the "b" input of the LEFT audio multiplier.
The RIGHT signal chain is:
constant addition, value = 1
absolute value
constant multiply value = 0.5
This resulting signal feeds the "b" input of the RIGHT audio multiplier.
If you want a -3dB law, insert a 'square root' module after the 'constant multiply' module on each channel
I built one which uses a comparator to switch between the two laws.
CZ.[/img]