has panning been programmed?

Official support for: sonicbirth.sourceforge.net
Post Reply New Topic
RELATED
PRODUCTS

Post

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.
Last edited by hellleutel on Wed Dec 12, 2007 9:12 am, edited 1 time in total.

Post

Yeah, I think it is logarithmic. Would a simple way to do it be to use the linear to dB and/or dB to linear converter modules? I gotta think about this one.

Post

you could go [1*left, 1*right] for middle, [0*left 1*right] for hard right, vice versa for hard left?

Post

eesn wrote:you could go [1*left, 1*right] for middle, [0*left 1*right] for hard right, vice versa for hard left?
that would be too loud in the middle. well I'm afraid it is logarithmic, so god have mercy on me ;)

Post

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
Last edited by hellleutel on Wed Dec 12, 2007 9:12 am, edited 2 times in total.

Post

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.
Do not lick the fablanky

Post

funkadil wrote:Do some research about panning laws.
o.. yes ;)

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

Post

I'll try it this afternoon after work. I think I can figure out the math.

Post

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. :oops:

Post

dscro wrote: This turned out to be a fun and interesting project. I learned a heck of a lot about pan laws. :oops:
cool. Thank you, that's even a much more simple solution than I was expecting.


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

Post

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]

Post

Alright. Nice. I totally agree about not having a nice central place to post files and pics etc. We have to find a place.

Post Reply

Return to “SonicBirth”