I am writing a music player using FMOD which is the very best engine.

Recently I added a pan function, but there is something I don’t really get.

The pan values go from 0 to 255, 0 for total left, 255 for total right

and 128 for center.

The strange thing about it is that if I count the number of values it

is 256, form 0 to 255, which is a even number and means there is

no actual middle, for example:

0 to 7 (this example had only 8 numbers, I was not planning on

explaining this one with 0 to 255)

0 1 2 3 4 5 6 7

x

the center would be on the 4 here, since it is 128 for 0 to 255, now if

we take a close look we see that panning from center to the total left

goes in 4 steps (3, 2, 1, 0) and panning to the total right goes in only

3 steps (5, 6, 7). So panning to the left goes in 128 steps and to the

right in only 127 steps.

My question is, if I the panning isn’t equally divided, so 1 step to the

left is not exactly the same amount as 1 step to the right. I don’t think

it goes like this.

Or if values 0 and 1 are the same so that 1 is total left which leaves us

with 127 steps to the left, the same as tot the right. But then, I cannot

find this in the documentation.

Thanks in advance.

- SpaceNuts asked 14 years ago

- You must login to post comments

Well uh, you are right, you really can not tell the difference with your ears.

And maybe this is something really stupid to even worry about but the point is that if 128 is center, there are 128 steps to the left until you reach 0 and 127 to the right until you reach 255.

Isn’t it possible to make 0 and 1 equal in pan value, so you can make

a slider that goed 127 to the left too?

Thanks already

- SpaceNuts answered 14 years ago

- You must login to post comments

Brett didn’t say that 128 is the center, 127.5 would be.

But you really can’t tell the difference between 128 and 127, so it doesn’t matter which one you use as center.

- night answered 14 years ago

- You must login to post comments

Yes I see now, thanks.

I took 128 for center because that is what the documentation says but

it doesn’t actually matter if I take 128 or 127 as center.

Keeping it on 128 and make my slider from 1 till 255 so I have it

equally divided over the two halves.

At least this cleared up the bothering about the pan values. 😛

Thanks.

- SpaceNuts answered 14 years ago

- You must login to post comments

**Your Answer**

Please login first to submit.