Csound Csound-dev Csound-tekno Search About

[Csnd] simple math question re panning

Date2011-01-21 12:04
Frompeiman khosravi
Subject[Csnd] simple math question re panning
Hello,

I have a very basic question. I know the formula for stereo panning
but how is this implemented with more than two channels?

E.g. the value 0 routes the entire signal into channel one, .5 mixes
the sound into channels one and two, and 1.5 mixes the signal into
channels 3 and 4.

I know that there are panning opcodes for this but I am trying to
implement it in a udo that mixes the FFT bins among different
speakers. I have found a way to do this discretely between channels
but I would like to know the formula so that I can interpolated
between the channels (to avoid drastic splits of the bins within
listening space that can lead to bubbly artifacts). Naturally this
means using a table for each channel of audio with a table size of
FFT/2 and using another table to control the frequency dependent
panning. It remains to be seen if it is viable in terms of CPU.

Thanks very much in advance.

Best,

Peiman


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-21 12:08
FromVictor Lazzarini
SubjectRe: [Csnd] simple math question re panning
For more than 2 channels, I'd suggest using VBAP:  vector-based  
amplitude panning.

Victor

On 21 Jan 2011, at 12:04, peiman khosravi wrote:

> Hello,
>
> I have a very basic question. I know the formula for stereo panning
> but how is this implemented with more than two channels?
>
> E.g. the value 0 routes the entire signal into channel one, .5 mixes
> the sound into channels one and two, and 1.5 mixes the signal into
> channels 3 and 4.
>
> I know that there are panning opcodes for this but I am trying to
> implement it in a udo that mixes the FFT bins among different
> speakers. I have found a way to do this discretely between channels
> but I would like to know the formula so that I can interpolated
> between the channels (to avoid drastic splits of the bins within
> listening space that can lead to bubbly artifacts). Naturally this
> means using a table for each channel of audio with a table size of
> FFT/2 and using another table to control the frequency dependent
> panning. It remains to be seen if it is viable in terms of CPU.
>
> Thanks very much in advance.
>
> Best,
>
> Peiman
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-21 12:12
Fromjpff@cs.bath.ac.uk
SubjectRe: [Csnd] simple math question re panning
> For more than 2 channels, I'd suggest using VBAP:  vector-based
> amplitude panning.
>
> Victor

Or ambisonics?

>
> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>
>> Hello,
>>
>> I have a very basic question. I know the formula for stereo panning
>> but how is this implemented with more than two channels?
>>
>> E.g. the value 0 routes the entire signal into channel one, .5 mixes
>> the sound into channels one and two, and 1.5 mixes the signal into
>> channels 3 and 4.
>>
>> I know that there are panning opcodes for this but I am trying to
>> implement it in a udo that mixes the FFT bins among different
>> speakers. I have found a way to do this discretely between channels
>> but I would like to know the formula so that I can interpolated
>> between the channels (to avoid drastic splits of the bins within
>> listening space that can lead to bubbly artifacts). Naturally this
>> means using a table for each channel of audio with a table size of
>> FFT/2 and using another table to control the frequency dependent
>> panning. It remains to be seen if it is viable in terms of CPU.
>>
>> Thanks very much in advance.
>>
>> Best,
>>
>> Peiman
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>> "unsubscribe csound"
>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>
>
>




Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-21 12:32
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
I am using VBAP for general panning but the problem is that VBAP
applied to one FFT bin at a time is just not practical. Nor is
ambisonics.

In fact I am not really using the formula for panning as such but as
part of an algorithm that can mix the content of one table into six or
more tables. So for example:

value (amplitude data) at index 1 of table_A is divided in half  (or *
.5)  and then set to the index 1 of table_B and table_C. Or simply:
multiply index 1 one table_B and table_C by 0.5 and the remaining
tables by zero.

In the above example the user has defined an input of 0.5 that mixed
the value equally into table one and two.

Thanks

Peiman



On 21 January 2011 12:12,   wrote:
>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>> amplitude panning.
>>
>> Victor
>
> Or ambisonics?
>
>>
>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>
>>> Hello,
>>>
>>> I have a very basic question. I know the formula for stereo panning
>>> but how is this implemented with more than two channels?
>>>
>>> E.g. the value 0 routes the entire signal into channel one, .5 mixes
>>> the sound into channels one and two, and 1.5 mixes the signal into
>>> channels 3 and 4.
>>>
>>> I know that there are panning opcodes for this but I am trying to
>>> implement it in a udo that mixes the FFT bins among different
>>> speakers. I have found a way to do this discretely between channels
>>> but I would like to know the formula so that I can interpolated
>>> between the channels (to avoid drastic splits of the bins within
>>> listening space that can lead to bubbly artifacts). Naturally this
>>> means using a table for each channel of audio with a table size of
>>> FFT/2 and using another table to control the frequency dependent
>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>
>>> Thanks very much in advance.
>>>
>>> Best,
>>>
>>> Peiman
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>> "unsubscribe csound"
>>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>>
>>
>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-21 12:40
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
ps VBAP would work great if I new how it is actually implemented so
that I can implement it in a UDO without using the VBAP opcodes.

On 21 January 2011 12:32, peiman khosravi  wrote:
> I am using VBAP for general panning but the problem is that VBAP
> applied to one FFT bin at a time is just not practical. Nor is
> ambisonics.
>
> In fact I am not really using the formula for panning as such but as
> part of an algorithm that can mix the content of one table into six or
> more tables. So for example:
>
> value (amplitude data) at index 1 of table_A is divided in half  (or *
> .5)  and then set to the index 1 of table_B and table_C. Or simply:
> multiply index 1 one table_B and table_C by 0.5 and the remaining
> tables by zero.
>
> In the above example the user has defined an input of 0.5 that mixed
> the value equally into table one and two.
>
> Thanks
>
> Peiman
>
>
>
> On 21 January 2011 12:12,   wrote:
>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>> amplitude panning.
>>>
>>> Victor
>>
>> Or ambisonics?
>>
>>>
>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>
>>>> Hello,
>>>>
>>>> I have a very basic question. I know the formula for stereo panning
>>>> but how is this implemented with more than two channels?
>>>>
>>>> E.g. the value 0 routes the entire signal into channel one, .5 mixes
>>>> the sound into channels one and two, and 1.5 mixes the signal into
>>>> channels 3 and 4.
>>>>
>>>> I know that there are panning opcodes for this but I am trying to
>>>> implement it in a udo that mixes the FFT bins among different
>>>> speakers. I have found a way to do this discretely between channels
>>>> but I would like to know the formula so that I can interpolated
>>>> between the channels (to avoid drastic splits of the bins within
>>>> listening space that can lead to bubbly artifacts). Naturally this
>>>> means using a table for each channel of audio with a table size of
>>>> FFT/2 and using another table to control the frequency dependent
>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>
>>>> Thanks very much in advance.
>>>>
>>>> Best,
>>>>
>>>> Peiman
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-21 12:41
FromVictor Lazzarini
SubjectRe: [Csnd] simple math question re panning
Stereo amplitude panning is two-channel. An extension of it to more  
than two channels is VBAP.
Multichannel audio can also be encoded in ambisonics.
Anything else will be an ad-hoc solution which will not give proper  
localisation. What you are
looking at is some sort of amplitude panning that is not based on the  
vbap formulae. Why
not use VBAP then? All you need is to look up the literature and find  
out what equations are
used for scaling.

Victor
On 21 Jan 2011, at 12:32, peiman khosravi wrote:

> I am using VBAP for general panning but the problem is that VBAP
> applied to one FFT bin at a time is just not practical. Nor is
> ambisonics.
>
> In fact I am not really using the formula for panning as such but as
> part of an algorithm that can mix the content of one table into six or
> more tables. So for example:
>
> value (amplitude data) at index 1 of table_A is divided in half  (or *
> .5)  and then set to the index 1 of table_B and table_C. Or simply:
> multiply index 1 one table_B and table_C by 0.5 and the remaining
> tables by zero.
>
> In the above example the user has defined an input of 0.5 that mixed
> the value equally into table one and two.
>
> Thanks
>
> Peiman
>
>
>
> On 21 January 2011 12:12,   wrote:
>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>> amplitude panning.
>>>
>>> Victor
>>
>> Or ambisonics?
>>
>>>
>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>
>>>> Hello,
>>>>
>>>> I have a very basic question. I know the formula for stereo panning
>>>> but how is this implemented with more than two channels?
>>>>
>>>> E.g. the value 0 routes the entire signal into channel one, .5  
>>>> mixes
>>>> the sound into channels one and two, and 1.5 mixes the signal into
>>>> channels 3 and 4.
>>>>
>>>> I know that there are panning opcodes for this but I am trying to
>>>> implement it in a udo that mixes the FFT bins among different
>>>> speakers. I have found a way to do this discretely between channels
>>>> but I would like to know the formula so that I can interpolated
>>>> between the channels (to avoid drastic splits of the bins within
>>>> listening space that can lead to bubbly artifacts). Naturally this
>>>> means using a table for each channel of audio with a table size of
>>>> FFT/2 and using another table to control the frequency dependent
>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>
>>>> Thanks very much in advance.
>>>>
>>>> Best,
>>>>
>>>> Peiman
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>> "unsubscribe csound"
>>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>>
>>>
>>>
>>>
>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/? 
>> group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-21 12:44
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Also I suppose the operation can be done with conditional statements:

if value is between 0-1 got to section A. If 2-3 kgoto B and so on.
But there must be an easier way.

Thanks

Peiman

On 21 January 2011 12:40, peiman khosravi  wrote:
> ps VBAP would work great if I new how it is actually implemented so
> that I can implement it in a UDO without using the VBAP opcodes.
>
> On 21 January 2011 12:32, peiman khosravi  wrote:
>> I am using VBAP for general panning but the problem is that VBAP
>> applied to one FFT bin at a time is just not practical. Nor is
>> ambisonics.
>>
>> In fact I am not really using the formula for panning as such but as
>> part of an algorithm that can mix the content of one table into six or
>> more tables. So for example:
>>
>> value (amplitude data) at index 1 of table_A is divided in half  (or *
>> .5)  and then set to the index 1 of table_B and table_C. Or simply:
>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>> tables by zero.
>>
>> In the above example the user has defined an input of 0.5 that mixed
>> the value equally into table one and two.
>>
>> Thanks
>>
>> Peiman
>>
>>
>>
>> On 21 January 2011 12:12,   wrote:
>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>> amplitude panning.
>>>>
>>>> Victor
>>>
>>> Or ambisonics?
>>>
>>>>
>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I have a very basic question. I know the formula for stereo panning
>>>>> but how is this implemented with more than two channels?
>>>>>
>>>>> E.g. the value 0 routes the entire signal into channel one, .5 mixes
>>>>> the sound into channels one and two, and 1.5 mixes the signal into
>>>>> channels 3 and 4.
>>>>>
>>>>> I know that there are panning opcodes for this but I am trying to
>>>>> implement it in a udo that mixes the FFT bins among different
>>>>> speakers. I have found a way to do this discretely between channels
>>>>> but I would like to know the formula so that I can interpolated
>>>>> between the channels (to avoid drastic splits of the bins within
>>>>> listening space that can lead to bubbly artifacts). Naturally this
>>>>> means using a table for each channel of audio with a table size of
>>>>> FFT/2 and using another table to control the frequency dependent
>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>
>>>>> Thanks very much in advance.
>>>>>
>>>>> Best,
>>>>>
>>>>> Peiman
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe csound"
>>>>>
>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>>
>>>
>>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-21 12:48
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Yes exactly. I thought you were refering to the actual VBAP opcode.
Problem is that the last time I looked the literature was full of
maths that I didn't understand! Also they mostly deal with
three-dimensional space that makes the formula  a bit more convoluted.
I will try again today and see if I can get it.

Thanks

Peiman

On 21 January 2011 12:41, Victor Lazzarini  wrote:
> Stereo amplitude panning is two-channel. An extension of it to more than two
> channels is VBAP.
> Multichannel audio can also be encoded in ambisonics.
> Anything else will be an ad-hoc solution which will not give proper
> localisation. What you are
> looking at is some sort of amplitude panning that is not based on the vbap
> formulae. Why
> not use VBAP then? All you need is to look up the literature and find out
> what equations are
> used for scaling.
>
> Victor
> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>
>> I am using VBAP for general panning but the problem is that VBAP
>> applied to one FFT bin at a time is just not practical. Nor is
>> ambisonics.
>>
>> In fact I am not really using the formula for panning as such but as
>> part of an algorithm that can mix the content of one table into six or
>> more tables. So for example:
>>
>> value (amplitude data) at index 1 of table_A is divided in half  (or *
>> .5)  and then set to the index 1 of table_B and table_C. Or simply:
>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>> tables by zero.
>>
>> In the above example the user has defined an input of 0.5 that mixed
>> the value equally into table one and two.
>>
>> Thanks
>>
>> Peiman
>>
>>
>>
>> On 21 January 2011 12:12,   wrote:
>>>>
>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>> amplitude panning.
>>>>
>>>> Victor
>>>
>>> Or ambisonics?
>>>
>>>>
>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>
>>>>> Hello,
>>>>>
>>>>> I have a very basic question. I know the formula for stereo panning
>>>>> but how is this implemented with more than two channels?
>>>>>
>>>>> E.g. the value 0 routes the entire signal into channel one, .5 mixes
>>>>> the sound into channels one and two, and 1.5 mixes the signal into
>>>>> channels 3 and 4.
>>>>>
>>>>> I know that there are panning opcodes for this but I am trying to
>>>>> implement it in a udo that mixes the FFT bins among different
>>>>> speakers. I have found a way to do this discretely between channels
>>>>> but I would like to know the formula so that I can interpolated
>>>>> between the channels (to avoid drastic splits of the bins within
>>>>> listening space that can lead to bubbly artifacts). Naturally this
>>>>> means using a table for each channel of audio with a table size of
>>>>> FFT/2 and using another table to control the frequency dependent
>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>
>>>>> Thanks very much in advance.
>>>>>
>>>>> Best,
>>>>>
>>>>> Peiman
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe csound"
>>>>>
>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-21 12:55
FromVictor Lazzarini
SubjectRe: [Csnd] simple math question re panning
This paper is not too bad:

http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf

Besides, if you implement it the way you are planning, it should give  
you an interesting research paper.

Victor
On 21 Jan 2011, at 12:48, peiman khosravi wrote:

> Yes exactly. I thought you were refering to the actual VBAP opcode.
> Problem is that the last time I looked the literature was full of
> maths that I didn't understand! Also they mostly deal with
> three-dimensional space that makes the formula  a bit more convoluted.
> I will try again today and see if I can get it.
>
> Thanks
>
> Peiman
>
> On 21 January 2011 12:41, Victor Lazzarini  
>  wrote:
>> Stereo amplitude panning is two-channel. An extension of it to more  
>> than two
>> channels is VBAP.
>> Multichannel audio can also be encoded in ambisonics.
>> Anything else will be an ad-hoc solution which will not give proper
>> localisation. What you are
>> looking at is some sort of amplitude panning that is not based on  
>> the vbap
>> formulae. Why
>> not use VBAP then? All you need is to look up the literature and  
>> find out
>> what equations are
>> used for scaling.
>>
>> Victor
>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>
>>> I am using VBAP for general panning but the problem is that VBAP
>>> applied to one FFT bin at a time is just not practical. Nor is
>>> ambisonics.
>>>
>>> In fact I am not really using the formula for panning as such but as
>>> part of an algorithm that can mix the content of one table into  
>>> six or
>>> more tables. So for example:
>>>
>>> value (amplitude data) at index 1 of table_A is divided in half   
>>> (or *
>>> .5)  and then set to the index 1 of table_B and table_C. Or simply:
>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>> tables by zero.
>>>
>>> In the above example the user has defined an input of 0.5 that mixed
>>> the value equally into table one and two.
>>>
>>> Thanks
>>>
>>> Peiman
>>>
>>>
>>>
>>> On 21 January 2011 12:12,   wrote:
>>>>>
>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>> amplitude panning.
>>>>>
>>>>> Victor
>>>>
>>>> Or ambisonics?
>>>>
>>>>>
>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>
>>>>>> Hello,
>>>>>>
>>>>>> I have a very basic question. I know the formula for stereo  
>>>>>> panning
>>>>>> but how is this implemented with more than two channels?
>>>>>>
>>>>>> E.g. the value 0 routes the entire signal into channel one, .5  
>>>>>> mixes
>>>>>> the sound into channels one and two, and 1.5 mixes the signal  
>>>>>> into
>>>>>> channels 3 and 4.
>>>>>>
>>>>>> I know that there are panning opcodes for this but I am trying to
>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>> speakers. I have found a way to do this discretely between  
>>>>>> channels
>>>>>> but I would like to know the formula so that I can interpolated
>>>>>> between the channels (to avoid drastic splits of the bins within
>>>>>> listening space that can lead to bubbly artifacts). Naturally  
>>>>>> this
>>>>>> means using a table for each channel of audio with a table size  
>>>>>> of
>>>>>> FFT/2 and using another table to control the frequency dependent
>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>
>>>>>> Thanks very much in advance.
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe csound"
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/? 
>>> group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-21 13:10
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Thanks very much Victor. I shall do some brainstorming today.

Best,

Peiman

On 21 January 2011 12:55, Victor Lazzarini  wrote:
> This paper is not too bad:
>
> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>
> Besides, if you implement it the way you are planning, it should give you an
> interesting research paper.
>
> Victor
> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>
>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>> Problem is that the last time I looked the literature was full of
>> maths that I didn't understand! Also they mostly deal with
>> three-dimensional space that makes the formula  a bit more convoluted.
>> I will try again today and see if I can get it.
>>
>> Thanks
>>
>> Peiman
>>
>> On 21 January 2011 12:41, Victor Lazzarini 
>> wrote:
>>>
>>> Stereo amplitude panning is two-channel. An extension of it to more than
>>> two
>>> channels is VBAP.
>>> Multichannel audio can also be encoded in ambisonics.
>>> Anything else will be an ad-hoc solution which will not give proper
>>> localisation. What you are
>>> looking at is some sort of amplitude panning that is not based on the
>>> vbap
>>> formulae. Why
>>> not use VBAP then? All you need is to look up the literature and find out
>>> what equations are
>>> used for scaling.
>>>
>>> Victor
>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>
>>>> I am using VBAP for general panning but the problem is that VBAP
>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>> ambisonics.
>>>>
>>>> In fact I am not really using the formula for panning as such but as
>>>> part of an algorithm that can mix the content of one table into six or
>>>> more tables. So for example:
>>>>
>>>> value (amplitude data) at index 1 of table_A is divided in half  (or *
>>>> .5)  and then set to the index 1 of table_B and table_C. Or simply:
>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>> tables by zero.
>>>>
>>>> In the above example the user has defined an input of 0.5 that mixed
>>>> the value equally into table one and two.
>>>>
>>>> Thanks
>>>>
>>>> Peiman
>>>>
>>>>
>>>>
>>>> On 21 January 2011 12:12,   wrote:
>>>>>>
>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>> amplitude panning.
>>>>>>
>>>>>> Victor
>>>>>
>>>>> Or ambisonics?
>>>>>
>>>>>>
>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>
>>>>>>> Hello,
>>>>>>>
>>>>>>> I have a very basic question. I know the formula for stereo panning
>>>>>>> but how is this implemented with more than two channels?
>>>>>>>
>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5 mixes
>>>>>>> the sound into channels one and two, and 1.5 mixes the signal into
>>>>>>> channels 3 and 4.
>>>>>>>
>>>>>>> I know that there are panning opcodes for this but I am trying to
>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>> speakers. I have found a way to do this discretely between channels
>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>> between the channels (to avoid drastic splits of the bins within
>>>>>>> listening space that can lead to bubbly artifacts). Naturally this
>>>>>>> means using a table for each channel of audio with a table size of
>>>>>>> FFT/2 and using another table to control the frequency dependent
>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>
>>>>>>> Thanks very much in advance.
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Peiman
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe csound"
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-21 13:18
FromVictor Lazzarini
SubjectRe: [Csnd] simple math question re panning
Are you still at City? If so, get Jim Grant to give you help with the  
maths.

Victor
On 21 Jan 2011, at 13:10, peiman khosravi wrote:

> Thanks very much Victor. I shall do some brainstorming today.
>
> Best,
>
> Peiman
>
> On 21 January 2011 12:55, Victor Lazzarini  
>  wrote:
>> This paper is not too bad:
>>
>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>
>> Besides, if you implement it the way you are planning, it should  
>> give you an
>> interesting research paper.
>>
>> Victor
>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>
>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>> Problem is that the last time I looked the literature was full of
>>> maths that I didn't understand! Also they mostly deal with
>>> three-dimensional space that makes the formula  a bit more  
>>> convoluted.
>>> I will try again today and see if I can get it.
>>>
>>> Thanks
>>>
>>> Peiman
>>>
>>> On 21 January 2011 12:41, Victor Lazzarini  
>>> 
>>> wrote:
>>>>
>>>> Stereo amplitude panning is two-channel. An extension of it to  
>>>> more than
>>>> two
>>>> channels is VBAP.
>>>> Multichannel audio can also be encoded in ambisonics.
>>>> Anything else will be an ad-hoc solution which will not give proper
>>>> localisation. What you are
>>>> looking at is some sort of amplitude panning that is not based on  
>>>> the
>>>> vbap
>>>> formulae. Why
>>>> not use VBAP then? All you need is to look up the literature and  
>>>> find out
>>>> what equations are
>>>> used for scaling.
>>>>
>>>> Victor
>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>
>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>> ambisonics.
>>>>>
>>>>> In fact I am not really using the formula for panning as such  
>>>>> but as
>>>>> part of an algorithm that can mix the content of one table into  
>>>>> six or
>>>>> more tables. So for example:
>>>>>
>>>>> value (amplitude data) at index 1 of table_A is divided in half   
>>>>> (or *
>>>>> .5)  and then set to the index 1 of table_B and table_C. Or  
>>>>> simply:
>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>> tables by zero.
>>>>>
>>>>> In the above example the user has defined an input of 0.5 that  
>>>>> mixed
>>>>> the value equally into table one and two.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Peiman
>>>>>
>>>>>
>>>>>
>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>
>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>> amplitude panning.
>>>>>>>
>>>>>>> Victor
>>>>>>
>>>>>> Or ambisonics?
>>>>>>
>>>>>>>
>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>
>>>>>>>> Hello,
>>>>>>>>
>>>>>>>> I have a very basic question. I know the formula for stereo  
>>>>>>>> panning
>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>
>>>>>>>> E.g. the value 0 routes the entire signal into channel one, . 
>>>>>>>> 5 mixes
>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal  
>>>>>>>> into
>>>>>>>> channels 3 and 4.
>>>>>>>>
>>>>>>>> I know that there are panning opcodes for this but I am  
>>>>>>>> trying to
>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>> speakers. I have found a way to do this discretely between  
>>>>>>>> channels
>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>> between the channels (to avoid drastic splits of the bins  
>>>>>>>> within
>>>>>>>> listening space that can lead to bubbly artifacts). Naturally  
>>>>>>>> this
>>>>>>>> means using a table for each channel of audio with a table  
>>>>>>>> size of
>>>>>>>> FFT/2 and using another table to control the frequency  
>>>>>>>> dependent
>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>
>>>>>>>> Thanks very much in advance.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe csound"
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>          https://sourceforge.net/tracker/? 
>>>> group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/? 
>>> group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe
>>> csound"
>>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe
>> csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-21 14:08
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Yes I am still at City (should be my last year if I ever get this PhD
done!). I haven't seen Jim for years, he thaught us music technology
when I did my undergrad there (8 years ago or so!). I shall contact
him.

Thanks

Peiman

On 21 January 2011 13:18, Victor Lazzarini  wrote:
> Are you still at City? If so, get Jim Grant to give you help with the maths.
>
> Victor
> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>
>> Thanks very much Victor. I shall do some brainstorming today.
>>
>> Best,
>>
>> Peiman
>>
>> On 21 January 2011 12:55, Victor Lazzarini 
>> wrote:
>>>
>>> This paper is not too bad:
>>>
>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>
>>> Besides, if you implement it the way you are planning, it should give you
>>> an
>>> interesting research paper.
>>>
>>> Victor
>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>
>>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>>> Problem is that the last time I looked the literature was full of
>>>> maths that I didn't understand! Also they mostly deal with
>>>> three-dimensional space that makes the formula  a bit more convoluted.
>>>> I will try again today and see if I can get it.
>>>>
>>>> Thanks
>>>>
>>>> Peiman
>>>>
>>>> On 21 January 2011 12:41, Victor Lazzarini 
>>>> wrote:
>>>>>
>>>>> Stereo amplitude panning is two-channel. An extension of it to more
>>>>> than
>>>>> two
>>>>> channels is VBAP.
>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>> Anything else will be an ad-hoc solution which will not give proper
>>>>> localisation. What you are
>>>>> looking at is some sort of amplitude panning that is not based on the
>>>>> vbap
>>>>> formulae. Why
>>>>> not use VBAP then? All you need is to look up the literature and find
>>>>> out
>>>>> what equations are
>>>>> used for scaling.
>>>>>
>>>>> Victor
>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>
>>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>> ambisonics.
>>>>>>
>>>>>> In fact I am not really using the formula for panning as such but as
>>>>>> part of an algorithm that can mix the content of one table into six or
>>>>>> more tables. So for example:
>>>>>>
>>>>>> value (amplitude data) at index 1 of table_A is divided in half  (or *
>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or simply:
>>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>>> tables by zero.
>>>>>>
>>>>>> In the above example the user has defined an input of 0.5 that mixed
>>>>>> the value equally into table one and two.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>>
>>>>>>
>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>
>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>>> amplitude panning.
>>>>>>>>
>>>>>>>> Victor
>>>>>>>
>>>>>>> Or ambisonics?
>>>>>>>
>>>>>>>>
>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>
>>>>>>>>> Hello,
>>>>>>>>>
>>>>>>>>> I have a very basic question. I know the formula for stereo panning
>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>
>>>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5
>>>>>>>>> mixes
>>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal into
>>>>>>>>> channels 3 and 4.
>>>>>>>>>
>>>>>>>>> I know that there are panning opcodes for this but I am trying to
>>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>>> speakers. I have found a way to do this discretely between channels
>>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>>> between the channels (to avoid drastic splits of the bins within
>>>>>>>>> listening space that can lead to bubbly artifacts). Naturally this
>>>>>>>>> means using a table for each channel of audio with a table size of
>>>>>>>>> FFT/2 and using another table to control the frequency dependent
>>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>>
>>>>>>>>> Thanks very much in advance.
>>>>>>>>>
>>>>>>>>> Best,
>>>>>>>>>
>>>>>>>>> Peiman
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe csound"
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-22 08:46
FromOeyvind Brandtsegg
SubjectRe: [Csnd] simple math question re panning
As for an ad hoc solution, if you should need it,
you could adapt square root stereo panning to 2D micing like this:

	kJoyX		= (x axis mix control)
	kJoyY		= (y axis mix control)

	kwgain1		= sqrt((1-kJoyX)*(1-kJoyY))
	kwgain2		= sqrt(kJoyX*(1-kJoyY))
	kwgain3		= sqrt((1-kJoyX)*kJoyY)
	kwgain4		= sqrt(kJoyX*kJoyY)

... could also be extended to 3D with a kJoyZ parameter
I've used this snippet to mix 4 source sounds into one,
but it shsould work just as well distributin one sound to 4 outputs.

As Victor mentioned, it's an ad hoc solution.
Oeyvind


2011/1/21 peiman khosravi :
> Yes I am still at City (should be my last year if I ever get this PhD
> done!). I haven't seen Jim for years, he thaught us music technology
> when I did my undergrad there (8 years ago or so!). I shall contact
> him.
>
> Thanks
>
> Peiman
>
> On 21 January 2011 13:18, Victor Lazzarini  wrote:
>> Are you still at City? If so, get Jim Grant to give you help with the maths.
>>
>> Victor
>> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>>
>>> Thanks very much Victor. I shall do some brainstorming today.
>>>
>>> Best,
>>>
>>> Peiman
>>>
>>> On 21 January 2011 12:55, Victor Lazzarini 
>>> wrote:
>>>>
>>>> This paper is not too bad:
>>>>
>>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>>
>>>> Besides, if you implement it the way you are planning, it should give you
>>>> an
>>>> interesting research paper.
>>>>
>>>> Victor
>>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>>
>>>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>>>> Problem is that the last time I looked the literature was full of
>>>>> maths that I didn't understand! Also they mostly deal with
>>>>> three-dimensional space that makes the formula  a bit more convoluted.
>>>>> I will try again today and see if I can get it.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Peiman
>>>>>
>>>>> On 21 January 2011 12:41, Victor Lazzarini 
>>>>> wrote:
>>>>>>
>>>>>> Stereo amplitude panning is two-channel. An extension of it to more
>>>>>> than
>>>>>> two
>>>>>> channels is VBAP.
>>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>>> Anything else will be an ad-hoc solution which will not give proper
>>>>>> localisation. What you are
>>>>>> looking at is some sort of amplitude panning that is not based on the
>>>>>> vbap
>>>>>> formulae. Why
>>>>>> not use VBAP then? All you need is to look up the literature and find
>>>>>> out
>>>>>> what equations are
>>>>>> used for scaling.
>>>>>>
>>>>>> Victor
>>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>>
>>>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>>> ambisonics.
>>>>>>>
>>>>>>> In fact I am not really using the formula for panning as such but as
>>>>>>> part of an algorithm that can mix the content of one table into six or
>>>>>>> more tables. So for example:
>>>>>>>
>>>>>>> value (amplitude data) at index 1 of table_A is divided in half  (or *
>>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or simply:
>>>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>>>> tables by zero.
>>>>>>>
>>>>>>> In the above example the user has defined an input of 0.5 that mixed
>>>>>>> the value equally into table one and two.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Peiman
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>>
>>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>>>> amplitude panning.
>>>>>>>>>
>>>>>>>>> Victor
>>>>>>>>
>>>>>>>> Or ambisonics?
>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>>
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> I have a very basic question. I know the formula for stereo panning
>>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>>
>>>>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5
>>>>>>>>>> mixes
>>>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal into
>>>>>>>>>> channels 3 and 4.
>>>>>>>>>>
>>>>>>>>>> I know that there are panning opcodes for this but I am trying to
>>>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>>>> speakers. I have found a way to do this discretely between channels
>>>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>>>> between the channels (to avoid drastic splits of the bins within
>>>>>>>>>> listening space that can lead to bubbly artifacts). Naturally this
>>>>>>>>>> means using a table for each channel of audio with a table size of
>>>>>>>>>> FFT/2 and using another table to control the frequency dependent
>>>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>>>
>>>>>>>>>> Thanks very much in advance.
>>>>>>>>>>
>>>>>>>>>> Best,
>>>>>>>>>>
>>>>>>>>>> Peiman
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-22 09:40
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Thanks Oeyvind,

That is great. I spent yesterday reading on VBAP. The problem is that
I don't understand vectors in maths. I just about get the idea but not
the formula. So I am getting a book about vectors and I should be able
to work it out in a few day.

But I have one question. Reading the article I understand that VBAP
works with speaker pairs and that for more than two speakers the
vectors are changed accordingly.

So if VBAP is originally a stereo panning formula then what makes it
different or better than the sort of ad hoc solution that you have
when it comes to surround sound?

Best,

Peiman

On 22 January 2011 09:46, Oeyvind Brandtsegg  wrote:
> As for an ad hoc solution, if you should need it,
> you could adapt square root stereo panning to 2D micing like this:
>
>        kJoyX           = (x axis mix control)
>        kJoyY           = (y axis mix control)
>
>        kwgain1         = sqrt((1-kJoyX)*(1-kJoyY))
>        kwgain2         = sqrt(kJoyX*(1-kJoyY))
>        kwgain3         = sqrt((1-kJoyX)*kJoyY)
>        kwgain4         = sqrt(kJoyX*kJoyY)
>
> ... could also be extended to 3D with a kJoyZ parameter
> I've used this snippet to mix 4 source sounds into one,
> but it shsould work just as well distributin one sound to 4 outputs.
>
> As Victor mentioned, it's an ad hoc solution.
> Oeyvind
>
>
> 2011/1/21 peiman khosravi :
>> Yes I am still at City (should be my last year if I ever get this PhD
>> done!). I haven't seen Jim for years, he thaught us music technology
>> when I did my undergrad there (8 years ago or so!). I shall contact
>> him.
>>
>> Thanks
>>
>> Peiman
>>
>> On 21 January 2011 13:18, Victor Lazzarini  wrote:
>>> Are you still at City? If so, get Jim Grant to give you help with the maths.
>>>
>>> Victor
>>> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>>>
>>>> Thanks very much Victor. I shall do some brainstorming today.
>>>>
>>>> Best,
>>>>
>>>> Peiman
>>>>
>>>> On 21 January 2011 12:55, Victor Lazzarini 
>>>> wrote:
>>>>>
>>>>> This paper is not too bad:
>>>>>
>>>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>>>
>>>>> Besides, if you implement it the way you are planning, it should give you
>>>>> an
>>>>> interesting research paper.
>>>>>
>>>>> Victor
>>>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>>>
>>>>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>>>>> Problem is that the last time I looked the literature was full of
>>>>>> maths that I didn't understand! Also they mostly deal with
>>>>>> three-dimensional space that makes the formula  a bit more convoluted.
>>>>>> I will try again today and see if I can get it.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>> On 21 January 2011 12:41, Victor Lazzarini 
>>>>>> wrote:
>>>>>>>
>>>>>>> Stereo amplitude panning is two-channel. An extension of it to more
>>>>>>> than
>>>>>>> two
>>>>>>> channels is VBAP.
>>>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>>>> Anything else will be an ad-hoc solution which will not give proper
>>>>>>> localisation. What you are
>>>>>>> looking at is some sort of amplitude panning that is not based on the
>>>>>>> vbap
>>>>>>> formulae. Why
>>>>>>> not use VBAP then? All you need is to look up the literature and find
>>>>>>> out
>>>>>>> what equations are
>>>>>>> used for scaling.
>>>>>>>
>>>>>>> Victor
>>>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>>>
>>>>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>>>> ambisonics.
>>>>>>>>
>>>>>>>> In fact I am not really using the formula for panning as such but as
>>>>>>>> part of an algorithm that can mix the content of one table into six or
>>>>>>>> more tables. So for example:
>>>>>>>>
>>>>>>>> value (amplitude data) at index 1 of table_A is divided in half  (or *
>>>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or simply:
>>>>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>>>>> tables by zero.
>>>>>>>>
>>>>>>>> In the above example the user has defined an input of 0.5 that mixed
>>>>>>>> the value equally into table one and two.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>>>
>>>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>>>>> amplitude panning.
>>>>>>>>>>
>>>>>>>>>> Victor
>>>>>>>>>
>>>>>>>>> Or ambisonics?
>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>>>
>>>>>>>>>>> Hello,
>>>>>>>>>>>
>>>>>>>>>>> I have a very basic question. I know the formula for stereo panning
>>>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>>>
>>>>>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5
>>>>>>>>>>> mixes
>>>>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal into
>>>>>>>>>>> channels 3 and 4.
>>>>>>>>>>>
>>>>>>>>>>> I know that there are panning opcodes for this but I am trying to
>>>>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>>>>> speakers. I have found a way to do this discretely between channels
>>>>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>>>>> between the channels (to avoid drastic splits of the bins within
>>>>>>>>>>> listening space that can lead to bubbly artifacts). Naturally this
>>>>>>>>>>> means using a table for each channel of audio with a table size of
>>>>>>>>>>> FFT/2 and using another table to control the frequency dependent
>>>>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>>>>
>>>>>>>>>>> Thanks very much in advance.
>>>>>>>>>>>
>>>>>>>>>>> Best,
>>>>>>>>>>>
>>>>>>>>>>> Peiman
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe
>>>>>>>>>> csound"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-22 09:54
FromVictor Lazzarini
SubjectRe: [Csnd] simple math question re panning
I would say that it is because it has been shown to work well. Other  
solutions might
also do, but we don't know how well.

Victor
On 22 Jan 2011, at 09:40, peiman khosravi wrote:

> Thanks Oeyvind,
>
> That is great. I spent yesterday reading on VBAP. The problem is that
> I don't understand vectors in maths. I just about get the idea but not
> the formula. So I am getting a book about vectors and I should be able
> to work it out in a few day.
>
> But I have one question. Reading the article I understand that VBAP
> works with speaker pairs and that for more than two speakers the
> vectors are changed accordingly.
>
> So if VBAP is originally a stereo panning formula then what makes it
> different or better than the sort of ad hoc solution that you have
> when it comes to surround sound?
>
> Best,
>
> Peiman
>
> On 22 January 2011 09:46, Oeyvind Brandtsegg  > wrote:
>> As for an ad hoc solution, if you should need it,
>> you could adapt square root stereo panning to 2D micing like this:
>>
>>        kJoyX           = (x axis mix control)
>>        kJoyY           = (y axis mix control)
>>
>>        kwgain1         = sqrt((1-kJoyX)*(1-kJoyY))
>>        kwgain2         = sqrt(kJoyX*(1-kJoyY))
>>        kwgain3         = sqrt((1-kJoyX)*kJoyY)
>>        kwgain4         = sqrt(kJoyX*kJoyY)
>>
>> ... could also be extended to 3D with a kJoyZ parameter
>> I've used this snippet to mix 4 source sounds into one,
>> but it shsould work just as well distributin one sound to 4 outputs.
>>
>> As Victor mentioned, it's an ad hoc solution.
>> Oeyvind
>>
>>
>> 2011/1/21 peiman khosravi :
>>> Yes I am still at City (should be my last year if I ever get this  
>>> PhD
>>> done!). I haven't seen Jim for years, he thaught us music technology
>>> when I did my undergrad there (8 years ago or so!). I shall contact
>>> him.
>>>
>>> Thanks
>>>
>>> Peiman
>>>
>>> On 21 January 2011 13:18, Victor Lazzarini  
>>>  wrote:
>>>> Are you still at City? If so, get Jim Grant to give you help with  
>>>> the maths.
>>>>
>>>> Victor
>>>> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>>>>
>>>>> Thanks very much Victor. I shall do some brainstorming today.
>>>>>
>>>>> Best,
>>>>>
>>>>> Peiman
>>>>>
>>>>> On 21 January 2011 12:55, Victor Lazzarini >>>> >
>>>>> wrote:
>>>>>>
>>>>>> This paper is not too bad:
>>>>>>
>>>>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>>>>
>>>>>> Besides, if you implement it the way you are planning, it  
>>>>>> should give you
>>>>>> an
>>>>>> interesting research paper.
>>>>>>
>>>>>> Victor
>>>>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>>>>
>>>>>>> Yes exactly. I thought you were refering to the actual VBAP  
>>>>>>> opcode.
>>>>>>> Problem is that the last time I looked the literature was full  
>>>>>>> of
>>>>>>> maths that I didn't understand! Also they mostly deal with
>>>>>>> three-dimensional space that makes the formula  a bit more  
>>>>>>> convoluted.
>>>>>>> I will try again today and see if I can get it.
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Peiman
>>>>>>>
>>>>>>> On 21 January 2011 12:41, Victor Lazzarini >>>>>> >
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Stereo amplitude panning is two-channel. An extension of it  
>>>>>>>> to more
>>>>>>>> than
>>>>>>>> two
>>>>>>>> channels is VBAP.
>>>>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>>>>> Anything else will be an ad-hoc solution which will not give  
>>>>>>>> proper
>>>>>>>> localisation. What you are
>>>>>>>> looking at is some sort of amplitude panning that is not  
>>>>>>>> based on the
>>>>>>>> vbap
>>>>>>>> formulae. Why
>>>>>>>> not use VBAP then? All you need is to look up the literature  
>>>>>>>> and find
>>>>>>>> out
>>>>>>>> what equations are
>>>>>>>> used for scaling.
>>>>>>>>
>>>>>>>> Victor
>>>>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>>>>
>>>>>>>>> I am using VBAP for general panning but the problem is that  
>>>>>>>>> VBAP
>>>>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>>>>> ambisonics.
>>>>>>>>>
>>>>>>>>> In fact I am not really using the formula for panning as  
>>>>>>>>> such but as
>>>>>>>>> part of an algorithm that can mix the content of one table  
>>>>>>>>> into six or
>>>>>>>>> more tables. So for example:
>>>>>>>>>
>>>>>>>>> value (amplitude data) at index 1 of table_A is divided in  
>>>>>>>>> half  (or *
>>>>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or  
>>>>>>>>> simply:
>>>>>>>>> multiply index 1 one table_B and table_C by 0.5 and the  
>>>>>>>>> remaining
>>>>>>>>> tables by zero.
>>>>>>>>>
>>>>>>>>> In the above example the user has defined an input of 0.5  
>>>>>>>>> that mixed
>>>>>>>>> the value equally into table one and two.
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Peiman
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>>>>
>>>>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector- 
>>>>>>>>>>> based
>>>>>>>>>>> amplitude panning.
>>>>>>>>>>>
>>>>>>>>>>> Victor
>>>>>>>>>>
>>>>>>>>>> Or ambisonics?
>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>>>>
>>>>>>>>>>>> Hello,
>>>>>>>>>>>>
>>>>>>>>>>>> I have a very basic question. I know the formula for  
>>>>>>>>>>>> stereo panning
>>>>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>>>>
>>>>>>>>>>>> E.g. the value 0 routes the entire signal into channel  
>>>>>>>>>>>> one, .5
>>>>>>>>>>>> mixes
>>>>>>>>>>>> the sound into channels one and two, and 1.5 mixes the  
>>>>>>>>>>>> signal into
>>>>>>>>>>>> channels 3 and 4.
>>>>>>>>>>>>
>>>>>>>>>>>> I know that there are panning opcodes for this but I am  
>>>>>>>>>>>> trying to
>>>>>>>>>>>> implement it in a udo that mixes the FFT bins among  
>>>>>>>>>>>> different
>>>>>>>>>>>> speakers. I have found a way to do this discretely  
>>>>>>>>>>>> between channels
>>>>>>>>>>>> but I would like to know the formula so that I can  
>>>>>>>>>>>> interpolated
>>>>>>>>>>>> between the channels (to avoid drastic splits of the bins  
>>>>>>>>>>>> within
>>>>>>>>>>>> listening space that can lead to bubbly artifacts).  
>>>>>>>>>>>> Naturally this
>>>>>>>>>>>> means using a table for each channel of audio with a  
>>>>>>>>>>>> table size of
>>>>>>>>>>>> FFT/2 and using another table to control the frequency  
>>>>>>>>>>>> dependent
>>>>>>>>>>>> panning. It remains to be seen if it is viable in terms  
>>>>>>>>>>>> of CPU.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks very much in advance.
>>>>>>>>>>>>
>>>>>>>>>>>> Best,
>>>>>>>>>>>>
>>>>>>>>>>>> Peiman
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe
>>>>>>>>>>> csound"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe
>>>>>>>>>> csound"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>>> "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>>> "unsubscribe csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/? 
>> group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
>> "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body  
> "unsubscribe csound"
>



Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-22 11:44
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Thanks Victor,

It makes sense. I am going to work out VBAP in a few days (as soon as
I've read the relevant chapters on the maths behind it). In the
meantime I shall try the ad hoc option and see what it sounds like.

Best,

Peiman

On 22 January 2011 09:54, Victor Lazzarini  wrote:
> I would say that it is because it has been shown to work well. Other
> solutions might
> also do, but we don't know how well.
>
> Victor
> On 22 Jan 2011, at 09:40, peiman khosravi wrote:
>
>> Thanks Oeyvind,
>>
>> That is great. I spent yesterday reading on VBAP. The problem is that
>> I don't understand vectors in maths. I just about get the idea but not
>> the formula. So I am getting a book about vectors and I should be able
>> to work it out in a few day.
>>
>> But I have one question. Reading the article I understand that VBAP
>> works with speaker pairs and that for more than two speakers the
>> vectors are changed accordingly.
>>
>> So if VBAP is originally a stereo panning formula then what makes it
>> different or better than the sort of ad hoc solution that you have
>> when it comes to surround sound?
>>
>> Best,
>>
>> Peiman
>>
>> On 22 January 2011 09:46, Oeyvind Brandtsegg 
>> wrote:
>>>
>>> As for an ad hoc solution, if you should need it,
>>> you could adapt square root stereo panning to 2D micing like this:
>>>
>>>       kJoyX           = (x axis mix control)
>>>       kJoyY           = (y axis mix control)
>>>
>>>       kwgain1         = sqrt((1-kJoyX)*(1-kJoyY))
>>>       kwgain2         = sqrt(kJoyX*(1-kJoyY))
>>>       kwgain3         = sqrt((1-kJoyX)*kJoyY)
>>>       kwgain4         = sqrt(kJoyX*kJoyY)
>>>
>>> ... could also be extended to 3D with a kJoyZ parameter
>>> I've used this snippet to mix 4 source sounds into one,
>>> but it shsould work just as well distributin one sound to 4 outputs.
>>>
>>> As Victor mentioned, it's an ad hoc solution.
>>> Oeyvind
>>>
>>>
>>> 2011/1/21 peiman khosravi :
>>>>
>>>> Yes I am still at City (should be my last year if I ever get this PhD
>>>> done!). I haven't seen Jim for years, he thaught us music technology
>>>> when I did my undergrad there (8 years ago or so!). I shall contact
>>>> him.
>>>>
>>>> Thanks
>>>>
>>>> Peiman
>>>>
>>>> On 21 January 2011 13:18, Victor Lazzarini 
>>>> wrote:
>>>>>
>>>>> Are you still at City? If so, get Jim Grant to give you help with the
>>>>> maths.
>>>>>
>>>>> Victor
>>>>> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>>>>>
>>>>>> Thanks very much Victor. I shall do some brainstorming today.
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>> On 21 January 2011 12:55, Victor Lazzarini 
>>>>>> wrote:
>>>>>>>
>>>>>>> This paper is not too bad:
>>>>>>>
>>>>>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>>>>>
>>>>>>> Besides, if you implement it the way you are planning, it should give
>>>>>>> you
>>>>>>> an
>>>>>>> interesting research paper.
>>>>>>>
>>>>>>> Victor
>>>>>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>>>>>
>>>>>>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>>>>>>> Problem is that the last time I looked the literature was full of
>>>>>>>> maths that I didn't understand! Also they mostly deal with
>>>>>>>> three-dimensional space that makes the formula  a bit more
>>>>>>>> convoluted.
>>>>>>>> I will try again today and see if I can get it.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>> On 21 January 2011 12:41, Victor Lazzarini
>>>>>>>> 
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Stereo amplitude panning is two-channel. An extension of it to more
>>>>>>>>> than
>>>>>>>>> two
>>>>>>>>> channels is VBAP.
>>>>>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>>>>>> Anything else will be an ad-hoc solution which will not give proper
>>>>>>>>> localisation. What you are
>>>>>>>>> looking at is some sort of amplitude panning that is not based on
>>>>>>>>> the
>>>>>>>>> vbap
>>>>>>>>> formulae. Why
>>>>>>>>> not use VBAP then? All you need is to look up the literature and
>>>>>>>>> find
>>>>>>>>> out
>>>>>>>>> what equations are
>>>>>>>>> used for scaling.
>>>>>>>>>
>>>>>>>>> Victor
>>>>>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>>>>>
>>>>>>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>>>>>> ambisonics.
>>>>>>>>>>
>>>>>>>>>> In fact I am not really using the formula for panning as such but
>>>>>>>>>> as
>>>>>>>>>> part of an algorithm that can mix the content of one table into
>>>>>>>>>> six or
>>>>>>>>>> more tables. So for example:
>>>>>>>>>>
>>>>>>>>>> value (amplitude data) at index 1 of table_A is divided in half
>>>>>>>>>>  (or *
>>>>>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or
>>>>>>>>>> simply:
>>>>>>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>>>>>>> tables by zero.
>>>>>>>>>>
>>>>>>>>>> In the above example the user has defined an input of 0.5 that
>>>>>>>>>> mixed
>>>>>>>>>> the value equally into table one and two.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> Peiman
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>>>>>>> amplitude panning.
>>>>>>>>>>>>
>>>>>>>>>>>> Victor
>>>>>>>>>>>
>>>>>>>>>>> Or ambisonics?
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I have a very basic question. I know the formula for stereo
>>>>>>>>>>>>> panning
>>>>>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>>>>>
>>>>>>>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5
>>>>>>>>>>>>> mixes
>>>>>>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal
>>>>>>>>>>>>> into
>>>>>>>>>>>>> channels 3 and 4.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I know that there are panning opcodes for this but I am trying
>>>>>>>>>>>>> to
>>>>>>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>>>>>>> speakers. I have found a way to do this discretely between
>>>>>>>>>>>>> channels
>>>>>>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>>>>>>> between the channels (to avoid drastic splits of the bins
>>>>>>>>>>>>> within
>>>>>>>>>>>>> listening space that can lead to bubbly artifacts). Naturally
>>>>>>>>>>>>> this
>>>>>>>>>>>>> means using a table for each channel of audio with a table size
>>>>>>>>>>>>> of
>>>>>>>>>>>>> FFT/2 and using another table to control the frequency
>>>>>>>>>>>>> dependent
>>>>>>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks very much in advance.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Peiman
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>
>>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>
>>>>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>> csound"
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>
>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe
>>>>>>>>>>> csound"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe
>>>>>>>>>> csound"
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-22 13:15
Fromjoachim heintz
SubjectRe: [Csnd] simple math question re panning
as far as i understood the ville pulkki papers i have read, it's on one
hand a question of efficiency to work with vectors, and particularily to
have a simple way to go to 3d. and vbap offers a simple way to work with
irregular speaker configurations, which is really great for many
situations (just change the vbaplsinit, and it works).
perhaps your approach is different, because you want to interpolate
between two tables. so the sqare root method which oeyvind suggests, or
(very similar) using sine sectors, or even simple linear interpolation
may work very well.
	joachim

Am 22.01.2011 12:44, schrieb peiman khosravi:
> Thanks Victor,
> 
> It makes sense. I am going to work out VBAP in a few days (as soon as
> I've read the relevant chapters on the maths behind it). In the
> meantime I shall try the ad hoc option and see what it sounds like.
> 
> Best,
> 
> Peiman
> 
> On 22 January 2011 09:54, Victor Lazzarini  wrote:
>> I would say that it is because it has been shown to work well. Other
>> solutions might
>> also do, but we don't know how well.
>>
>> Victor
>> On 22 Jan 2011, at 09:40, peiman khosravi wrote:
>>
>>> Thanks Oeyvind,
>>>
>>> That is great. I spent yesterday reading on VBAP. The problem is that
>>> I don't understand vectors in maths. I just about get the idea but not
>>> the formula. So I am getting a book about vectors and I should be able
>>> to work it out in a few day.
>>>
>>> But I have one question. Reading the article I understand that VBAP
>>> works with speaker pairs and that for more than two speakers the
>>> vectors are changed accordingly.
>>>
>>> So if VBAP is originally a stereo panning formula then what makes it
>>> different or better than the sort of ad hoc solution that you have
>>> when it comes to surround sound?
>>>
>>> Best,
>>>
>>> Peiman
>>>
>>> On 22 January 2011 09:46, Oeyvind Brandtsegg 
>>> wrote:
>>>>
>>>> As for an ad hoc solution, if you should need it,
>>>> you could adapt square root stereo panning to 2D micing like this:
>>>>
>>>>       kJoyX           = (x axis mix control)
>>>>       kJoyY           = (y axis mix control)
>>>>
>>>>       kwgain1         = sqrt((1-kJoyX)*(1-kJoyY))
>>>>       kwgain2         = sqrt(kJoyX*(1-kJoyY))
>>>>       kwgain3         = sqrt((1-kJoyX)*kJoyY)
>>>>       kwgain4         = sqrt(kJoyX*kJoyY)
>>>>
>>>> ... could also be extended to 3D with a kJoyZ parameter
>>>> I've used this snippet to mix 4 source sounds into one,
>>>> but it shsould work just as well distributin one sound to 4 outputs.
>>>>
>>>> As Victor mentioned, it's an ad hoc solution.
>>>> Oeyvind
>>>>
>>>>
>>>> 2011/1/21 peiman khosravi :
>>>>>
>>>>> Yes I am still at City (should be my last year if I ever get this PhD
>>>>> done!). I haven't seen Jim for years, he thaught us music technology
>>>>> when I did my undergrad there (8 years ago or so!). I shall contact
>>>>> him.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Peiman
>>>>>
>>>>> On 21 January 2011 13:18, Victor Lazzarini 
>>>>> wrote:
>>>>>>
>>>>>> Are you still at City? If so, get Jim Grant to give you help with the
>>>>>> maths.
>>>>>>
>>>>>> Victor
>>>>>> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>>>>>>
>>>>>>> Thanks very much Victor. I shall do some brainstorming today.
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Peiman
>>>>>>>
>>>>>>> On 21 January 2011 12:55, Victor Lazzarini 
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> This paper is not too bad:
>>>>>>>>
>>>>>>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>>>>>>
>>>>>>>> Besides, if you implement it the way you are planning, it should give
>>>>>>>> you
>>>>>>>> an
>>>>>>>> interesting research paper.
>>>>>>>>
>>>>>>>> Victor
>>>>>>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>>>>>>
>>>>>>>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>>>>>>>> Problem is that the last time I looked the literature was full of
>>>>>>>>> maths that I didn't understand! Also they mostly deal with
>>>>>>>>> three-dimensional space that makes the formula  a bit more
>>>>>>>>> convoluted.
>>>>>>>>> I will try again today and see if I can get it.
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Peiman
>>>>>>>>>
>>>>>>>>> On 21 January 2011 12:41, Victor Lazzarini
>>>>>>>>> 
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Stereo amplitude panning is two-channel. An extension of it to more
>>>>>>>>>> than
>>>>>>>>>> two
>>>>>>>>>> channels is VBAP.
>>>>>>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>>>>>>> Anything else will be an ad-hoc solution which will not give proper
>>>>>>>>>> localisation. What you are
>>>>>>>>>> looking at is some sort of amplitude panning that is not based on
>>>>>>>>>> the
>>>>>>>>>> vbap
>>>>>>>>>> formulae. Why
>>>>>>>>>> not use VBAP then? All you need is to look up the literature and
>>>>>>>>>> find
>>>>>>>>>> out
>>>>>>>>>> what equations are
>>>>>>>>>> used for scaling.
>>>>>>>>>>
>>>>>>>>>> Victor
>>>>>>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>>>>>>
>>>>>>>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>>>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>>>>>>> ambisonics.
>>>>>>>>>>>
>>>>>>>>>>> In fact I am not really using the formula for panning as such but
>>>>>>>>>>> as
>>>>>>>>>>> part of an algorithm that can mix the content of one table into
>>>>>>>>>>> six or
>>>>>>>>>>> more tables. So for example:
>>>>>>>>>>>
>>>>>>>>>>> value (amplitude data) at index 1 of table_A is divided in half
>>>>>>>>>>>  (or *
>>>>>>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or
>>>>>>>>>>> simply:
>>>>>>>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>>>>>>>> tables by zero.
>>>>>>>>>>>
>>>>>>>>>>> In the above example the user has defined an input of 0.5 that
>>>>>>>>>>> mixed
>>>>>>>>>>> the value equally into table one and two.
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>>
>>>>>>>>>>> Peiman
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>>>>>>>> amplitude panning.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Victor
>>>>>>>>>>>>
>>>>>>>>>>>> Or ambisonics?
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have a very basic question. I know the formula for stereo
>>>>>>>>>>>>>> panning
>>>>>>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5
>>>>>>>>>>>>>> mixes
>>>>>>>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal
>>>>>>>>>>>>>> into
>>>>>>>>>>>>>> channels 3 and 4.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I know that there are panning opcodes for this but I am trying
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>>>>>>>> speakers. I have found a way to do this discretely between
>>>>>>>>>>>>>> channels
>>>>>>>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>>>>>>>> between the channels (to avoid drastic splits of the bins
>>>>>>>>>>>>>> within
>>>>>>>>>>>>>> listening space that can lead to bubbly artifacts). Naturally
>>>>>>>>>>>>>> this
>>>>>>>>>>>>>> means using a table for each channel of audio with a table size
>>>>>>>>>>>>>> of
>>>>>>>>>>>>>> FFT/2 and using another table to control the frequency
>>>>>>>>>>>>>> dependent
>>>>>>>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks very much in advance.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Peiman
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>
>>>>>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>
>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>> csound"
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe
>>>>>>>>>>> csound"
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe
>>>>>>>>>> csound"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
> 
> 
> Send bugs reports to the Sourceforge bug tracker
>             https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
> 
> 


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"

Date2011-01-23 11:38
FromAndres Cabrera
SubjectRe: [Csnd] simple math question re panning
Hi Peiman,

Also bear in mind that amplitude panning between side speakers is
completely different to amplitude panning in the front, because you
can't really create stable and clear virtual images on the sides. Try
doing simple stereo panning between two speakers on the side and you
will see that images are not stable at all and sometimes jump from one
speaker to the other with a slight change. You might also find that
complex sources might dissociate, and each part can be perceived in a
different point between the speakers. This has been actually used for
a long time in ea diffusion of stereo pieces, by placing the stereo
mix both in the front and the back, and the result is that the sound
is spread all across the side (differently for each listener!).

Cheers,
Andres

On Sat, Jan 22, 2011 at 11:44 AM, peiman khosravi
 wrote:
> Thanks Victor,
>
> It makes sense. I am going to work out VBAP in a few days (as soon as
> I've read the relevant chapters on the maths behind it). In the
> meantime I shall try the ad hoc option and see what it sounds like.
>
> Best,
>
> Peiman
>
> On 22 January 2011 09:54, Victor Lazzarini  wrote:
>> I would say that it is because it has been shown to work well. Other
>> solutions might
>> also do, but we don't know how well.
>>
>> Victor
>> On 22 Jan 2011, at 09:40, peiman khosravi wrote:
>>
>>> Thanks Oeyvind,
>>>
>>> That is great. I spent yesterday reading on VBAP. The problem is that
>>> I don't understand vectors in maths. I just about get the idea but not
>>> the formula. So I am getting a book about vectors and I should be able
>>> to work it out in a few day.
>>>
>>> But I have one question. Reading the article I understand that VBAP
>>> works with speaker pairs and that for more than two speakers the
>>> vectors are changed accordingly.
>>>
>>> So if VBAP is originally a stereo panning formula then what makes it
>>> different or better than the sort of ad hoc solution that you have
>>> when it comes to surround sound?
>>>
>>> Best,
>>>
>>> Peiman
>>>
>>> On 22 January 2011 09:46, Oeyvind Brandtsegg 
>>> wrote:
>>>>
>>>> As for an ad hoc solution, if you should need it,
>>>> you could adapt square root stereo panning to 2D micing like this:
>>>>
>>>>       kJoyX           = (x axis mix control)
>>>>       kJoyY           = (y axis mix control)
>>>>
>>>>       kwgain1         = sqrt((1-kJoyX)*(1-kJoyY))
>>>>       kwgain2         = sqrt(kJoyX*(1-kJoyY))
>>>>       kwgain3         = sqrt((1-kJoyX)*kJoyY)
>>>>       kwgain4         = sqrt(kJoyX*kJoyY)
>>>>
>>>> ... could also be extended to 3D with a kJoyZ parameter
>>>> I've used this snippet to mix 4 source sounds into one,
>>>> but it shsould work just as well distributin one sound to 4 outputs.
>>>>
>>>> As Victor mentioned, it's an ad hoc solution.
>>>> Oeyvind
>>>>
>>>>
>>>> 2011/1/21 peiman khosravi :
>>>>>
>>>>> Yes I am still at City (should be my last year if I ever get this PhD
>>>>> done!). I haven't seen Jim for years, he thaught us music technology
>>>>> when I did my undergrad there (8 years ago or so!). I shall contact
>>>>> him.
>>>>>
>>>>> Thanks
>>>>>
>>>>> Peiman
>>>>>
>>>>> On 21 January 2011 13:18, Victor Lazzarini 
>>>>> wrote:
>>>>>>
>>>>>> Are you still at City? If so, get Jim Grant to give you help with the
>>>>>> maths.
>>>>>>
>>>>>> Victor
>>>>>> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>>>>>>
>>>>>>> Thanks very much Victor. I shall do some brainstorming today.
>>>>>>>
>>>>>>> Best,
>>>>>>>
>>>>>>> Peiman
>>>>>>>
>>>>>>> On 21 January 2011 12:55, Victor Lazzarini 
>>>>>>> wrote:
>>>>>>>>
>>>>>>>> This paper is not too bad:
>>>>>>>>
>>>>>>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>>>>>>
>>>>>>>> Besides, if you implement it the way you are planning, it should give
>>>>>>>> you
>>>>>>>> an
>>>>>>>> interesting research paper.
>>>>>>>>
>>>>>>>> Victor
>>>>>>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>>>>>>
>>>>>>>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>>>>>>>> Problem is that the last time I looked the literature was full of
>>>>>>>>> maths that I didn't understand! Also they mostly deal with
>>>>>>>>> three-dimensional space that makes the formula  a bit more
>>>>>>>>> convoluted.
>>>>>>>>> I will try again today and see if I can get it.
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Peiman
>>>>>>>>>
>>>>>>>>> On 21 January 2011 12:41, Victor Lazzarini
>>>>>>>>> 
>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Stereo amplitude panning is two-channel. An extension of it to more
>>>>>>>>>> than
>>>>>>>>>> two
>>>>>>>>>> channels is VBAP.
>>>>>>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>>>>>>> Anything else will be an ad-hoc solution which will not give proper
>>>>>>>>>> localisation. What you are
>>>>>>>>>> looking at is some sort of amplitude panning that is not based on
>>>>>>>>>> the
>>>>>>>>>> vbap
>>>>>>>>>> formulae. Why
>>>>>>>>>> not use VBAP then? All you need is to look up the literature and
>>>>>>>>>> find
>>>>>>>>>> out
>>>>>>>>>> what equations are
>>>>>>>>>> used for scaling.
>>>>>>>>>>
>>>>>>>>>> Victor
>>>>>>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>>>>>>
>>>>>>>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>>>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>>>>>>> ambisonics.
>>>>>>>>>>>
>>>>>>>>>>> In fact I am not really using the formula for panning as such but
>>>>>>>>>>> as
>>>>>>>>>>> part of an algorithm that can mix the content of one table into
>>>>>>>>>>> six or
>>>>>>>>>>> more tables. So for example:
>>>>>>>>>>>
>>>>>>>>>>> value (amplitude data) at index 1 of table_A is divided in half
>>>>>>>>>>>  (or *
>>>>>>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or
>>>>>>>>>>> simply:
>>>>>>>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>>>>>>>> tables by zero.
>>>>>>>>>>>
>>>>>>>>>>> In the above example the user has defined an input of 0.5 that
>>>>>>>>>>> mixed
>>>>>>>>>>> the value equally into table one and two.
>>>>>>>>>>>
>>>>>>>>>>> Thanks
>>>>>>>>>>>
>>>>>>>>>>> Peiman
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>>>>>>>> amplitude panning.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Victor
>>>>>>>>>>>>
>>>>>>>>>>>> Or ambisonics?
>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>>>>>>
>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I have a very basic question. I know the formula for stereo
>>>>>>>>>>>>>> panning
>>>>>>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5
>>>>>>>>>>>>>> mixes
>>>>>>>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal
>>>>>>>>>>>>>> into
>>>>>>>>>>>>>> channels 3 and 4.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> I know that there are panning opcodes for this but I am trying
>>>>>>>>>>>>>> to
>>>>>>>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>>>>>>>> speakers. I have found a way to do this discretely between
>>>>>>>>>>>>>> channels
>>>>>>>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>>>>>>>> between the channels (to avoid drastic splits of the bins
>>>>>>>>>>>>>> within
>>>>>>>>>>>>>> listening space that can lead to bubbly artifacts). Naturally
>>>>>>>>>>>>>> this
>>>>>>>>>>>>>> means using a table for each channel of audio with a table size
>>>>>>>>>>>>>> of
>>>>>>>>>>>>>> FFT/2 and using another table to control the frequency
>>>>>>>>>>>>>> dependent
>>>>>>>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Thanks very much in advance.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Peiman
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>
>>>>>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>
>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>> csound"
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe
>>>>>>>>>>> csound"
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe
>>>>>>>>>> csound"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-23 12:14
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Hi Andres,

Yes you are absolutely right. For me the stereo image is stage
oriented, I would use the surround speakers to expand the panorama
rather than pan/move point sources around. Scattering/moving textures
in flocks (spatial texture) works much better than moving a single
source around.

One thing I have learned from my teacher:

send a stereo signal to the front and back but revers the channels in
the back (so that you get a sort of diagonal stereo image as well as
the frontal and back stereo image). This means that the off-center
listeners still get a feel of the stereo space. The effect can be
exaggerated if you add something like 10-40 ms delay to the back.
Naturally in diffusion you wouldn't have the back speakers active at
all times and would only bring them in when you want to create a more
circumspatial image (as required by the sounds).

P

On 23 January 2011 12:38, Andres Cabrera  wrote:
> Hi Peiman,
>
> Also bear in mind that amplitude panning between side speakers is
> completely different to amplitude panning in the front, because you
> can't really create stable and clear virtual images on the sides. Try
> doing simple stereo panning between two speakers on the side and you
> will see that images are not stable at all and sometimes jump from one
> speaker to the other with a slight change. You might also find that
> complex sources might dissociate, and each part can be perceived in a
> different point between the speakers. This has been actually used for
> a long time in ea diffusion of stereo pieces, by placing the stereo
> mix both in the front and the back, and the result is that the sound
> is spread all across the side (differently for each listener!).
>
> Cheers,
> Andres
>
> On Sat, Jan 22, 2011 at 11:44 AM, peiman khosravi
>  wrote:
>> Thanks Victor,
>>
>> It makes sense. I am going to work out VBAP in a few days (as soon as
>> I've read the relevant chapters on the maths behind it). In the
>> meantime I shall try the ad hoc option and see what it sounds like.
>>
>> Best,
>>
>> Peiman
>>
>> On 22 January 2011 09:54, Victor Lazzarini  wrote:
>>> I would say that it is because it has been shown to work well. Other
>>> solutions might
>>> also do, but we don't know how well.
>>>
>>> Victor
>>> On 22 Jan 2011, at 09:40, peiman khosravi wrote:
>>>
>>>> Thanks Oeyvind,
>>>>
>>>> That is great. I spent yesterday reading on VBAP. The problem is that
>>>> I don't understand vectors in maths. I just about get the idea but not
>>>> the formula. So I am getting a book about vectors and I should be able
>>>> to work it out in a few day.
>>>>
>>>> But I have one question. Reading the article I understand that VBAP
>>>> works with speaker pairs and that for more than two speakers the
>>>> vectors are changed accordingly.
>>>>
>>>> So if VBAP is originally a stereo panning formula then what makes it
>>>> different or better than the sort of ad hoc solution that you have
>>>> when it comes to surround sound?
>>>>
>>>> Best,
>>>>
>>>> Peiman
>>>>
>>>> On 22 January 2011 09:46, Oeyvind Brandtsegg 
>>>> wrote:
>>>>>
>>>>> As for an ad hoc solution, if you should need it,
>>>>> you could adapt square root stereo panning to 2D micing like this:
>>>>>
>>>>>       kJoyX           = (x axis mix control)
>>>>>       kJoyY           = (y axis mix control)
>>>>>
>>>>>       kwgain1         = sqrt((1-kJoyX)*(1-kJoyY))
>>>>>       kwgain2         = sqrt(kJoyX*(1-kJoyY))
>>>>>       kwgain3         = sqrt((1-kJoyX)*kJoyY)
>>>>>       kwgain4         = sqrt(kJoyX*kJoyY)
>>>>>
>>>>> ... could also be extended to 3D with a kJoyZ parameter
>>>>> I've used this snippet to mix 4 source sounds into one,
>>>>> but it shsould work just as well distributin one sound to 4 outputs.
>>>>>
>>>>> As Victor mentioned, it's an ad hoc solution.
>>>>> Oeyvind
>>>>>
>>>>>
>>>>> 2011/1/21 peiman khosravi :
>>>>>>
>>>>>> Yes I am still at City (should be my last year if I ever get this PhD
>>>>>> done!). I haven't seen Jim for years, he thaught us music technology
>>>>>> when I did my undergrad there (8 years ago or so!). I shall contact
>>>>>> him.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>> On 21 January 2011 13:18, Victor Lazzarini 
>>>>>> wrote:
>>>>>>>
>>>>>>> Are you still at City? If so, get Jim Grant to give you help with the
>>>>>>> maths.
>>>>>>>
>>>>>>> Victor
>>>>>>> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>>>>>>>
>>>>>>>> Thanks very much Victor. I shall do some brainstorming today.
>>>>>>>>
>>>>>>>> Best,
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>> On 21 January 2011 12:55, Victor Lazzarini 
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> This paper is not too bad:
>>>>>>>>>
>>>>>>>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>>>>>>>
>>>>>>>>> Besides, if you implement it the way you are planning, it should give
>>>>>>>>> you
>>>>>>>>> an
>>>>>>>>> interesting research paper.
>>>>>>>>>
>>>>>>>>> Victor
>>>>>>>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>>>>>>>
>>>>>>>>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>>>>>>>>> Problem is that the last time I looked the literature was full of
>>>>>>>>>> maths that I didn't understand! Also they mostly deal with
>>>>>>>>>> three-dimensional space that makes the formula  a bit more
>>>>>>>>>> convoluted.
>>>>>>>>>> I will try again today and see if I can get it.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> Peiman
>>>>>>>>>>
>>>>>>>>>> On 21 January 2011 12:41, Victor Lazzarini
>>>>>>>>>> 
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Stereo amplitude panning is two-channel. An extension of it to more
>>>>>>>>>>> than
>>>>>>>>>>> two
>>>>>>>>>>> channels is VBAP.
>>>>>>>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>>>>>>>> Anything else will be an ad-hoc solution which will not give proper
>>>>>>>>>>> localisation. What you are
>>>>>>>>>>> looking at is some sort of amplitude panning that is not based on
>>>>>>>>>>> the
>>>>>>>>>>> vbap
>>>>>>>>>>> formulae. Why
>>>>>>>>>>> not use VBAP then? All you need is to look up the literature and
>>>>>>>>>>> find
>>>>>>>>>>> out
>>>>>>>>>>> what equations are
>>>>>>>>>>> used for scaling.
>>>>>>>>>>>
>>>>>>>>>>> Victor
>>>>>>>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>>>>>>>
>>>>>>>>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>>>>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>>>>>>>> ambisonics.
>>>>>>>>>>>>
>>>>>>>>>>>> In fact I am not really using the formula for panning as such but
>>>>>>>>>>>> as
>>>>>>>>>>>> part of an algorithm that can mix the content of one table into
>>>>>>>>>>>> six or
>>>>>>>>>>>> more tables. So for example:
>>>>>>>>>>>>
>>>>>>>>>>>> value (amplitude data) at index 1 of table_A is divided in half
>>>>>>>>>>>>  (or *
>>>>>>>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or
>>>>>>>>>>>> simply:
>>>>>>>>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>>>>>>>>> tables by zero.
>>>>>>>>>>>>
>>>>>>>>>>>> In the above example the user has defined an input of 0.5 that
>>>>>>>>>>>> mixed
>>>>>>>>>>>> the value equally into table one and two.
>>>>>>>>>>>>
>>>>>>>>>>>> Thanks
>>>>>>>>>>>>
>>>>>>>>>>>> Peiman
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>>>>>>>>> amplitude panning.
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Victor
>>>>>>>>>>>>>
>>>>>>>>>>>>> Or ambisonics?
>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I have a very basic question. I know the formula for stereo
>>>>>>>>>>>>>>> panning
>>>>>>>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5
>>>>>>>>>>>>>>> mixes
>>>>>>>>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal
>>>>>>>>>>>>>>> into
>>>>>>>>>>>>>>> channels 3 and 4.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> I know that there are panning opcodes for this but I am trying
>>>>>>>>>>>>>>> to
>>>>>>>>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>>>>>>>>> speakers. I have found a way to do this discretely between
>>>>>>>>>>>>>>> channels
>>>>>>>>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>>>>>>>>> between the channels (to avoid drastic splits of the bins
>>>>>>>>>>>>>>> within
>>>>>>>>>>>>>>> listening space that can lead to bubbly artifacts). Naturally
>>>>>>>>>>>>>>> this
>>>>>>>>>>>>>>> means using a table for each channel of audio with a table size
>>>>>>>>>>>>>>> of
>>>>>>>>>>>>>>> FFT/2 and using another table to control the frequency
>>>>>>>>>>>>>>> dependent
>>>>>>>>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Thanks very much in advance.
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Peiman
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>>
>>>>>>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>
>>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>>> csound"
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>> csound"
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe
>>>>>>>>>>> csound"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe
>>>>>>>>>> csound"
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>>
>>
>
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-23 12:15
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Thanks. I just wanted to be sure that I am not missing a crucial part
of the theory.

Best

Peiman


On 22 January 2011 10:54, Victor Lazzarini  wrote:
> I would say that it is because it has been shown to work well. Other
> solutions might
> also do, but we don't know how well.
>
> Victor
> On 22 Jan 2011, at 09:40, peiman khosravi wrote:
>
>> Thanks Oeyvind,
>>
>> That is great. I spent yesterday reading on VBAP. The problem is that
>> I don't understand vectors in maths. I just about get the idea but not
>> the formula. So I am getting a book about vectors and I should be able
>> to work it out in a few day.
>>
>> But I have one question. Reading the article I understand that VBAP
>> works with speaker pairs and that for more than two speakers the
>> vectors are changed accordingly.
>>
>> So if VBAP is originally a stereo panning formula then what makes it
>> different or better than the sort of ad hoc solution that you have
>> when it comes to surround sound?
>>
>> Best,
>>
>> Peiman
>>
>> On 22 January 2011 09:46, Oeyvind Brandtsegg 
>> wrote:
>>>
>>> As for an ad hoc solution, if you should need it,
>>> you could adapt square root stereo panning to 2D micing like this:
>>>
>>>       kJoyX           = (x axis mix control)
>>>       kJoyY           = (y axis mix control)
>>>
>>>       kwgain1         = sqrt((1-kJoyX)*(1-kJoyY))
>>>       kwgain2         = sqrt(kJoyX*(1-kJoyY))
>>>       kwgain3         = sqrt((1-kJoyX)*kJoyY)
>>>       kwgain4         = sqrt(kJoyX*kJoyY)
>>>
>>> ... could also be extended to 3D with a kJoyZ parameter
>>> I've used this snippet to mix 4 source sounds into one,
>>> but it shsould work just as well distributin one sound to 4 outputs.
>>>
>>> As Victor mentioned, it's an ad hoc solution.
>>> Oeyvind
>>>
>>>
>>> 2011/1/21 peiman khosravi :
>>>>
>>>> Yes I am still at City (should be my last year if I ever get this PhD
>>>> done!). I haven't seen Jim for years, he thaught us music technology
>>>> when I did my undergrad there (8 years ago or so!). I shall contact
>>>> him.
>>>>
>>>> Thanks
>>>>
>>>> Peiman
>>>>
>>>> On 21 January 2011 13:18, Victor Lazzarini 
>>>> wrote:
>>>>>
>>>>> Are you still at City? If so, get Jim Grant to give you help with the
>>>>> maths.
>>>>>
>>>>> Victor
>>>>> On 21 Jan 2011, at 13:10, peiman khosravi wrote:
>>>>>
>>>>>> Thanks very much Victor. I shall do some brainstorming today.
>>>>>>
>>>>>> Best,
>>>>>>
>>>>>> Peiman
>>>>>>
>>>>>> On 21 January 2011 12:55, Victor Lazzarini 
>>>>>> wrote:
>>>>>>>
>>>>>>> This paper is not too bad:
>>>>>>>
>>>>>>> http://lib.tkk.fi/Diss/2001/isbn9512255324/article1.pdf
>>>>>>>
>>>>>>> Besides, if you implement it the way you are planning, it should give
>>>>>>> you
>>>>>>> an
>>>>>>> interesting research paper.
>>>>>>>
>>>>>>> Victor
>>>>>>> On 21 Jan 2011, at 12:48, peiman khosravi wrote:
>>>>>>>
>>>>>>>> Yes exactly. I thought you were refering to the actual VBAP opcode.
>>>>>>>> Problem is that the last time I looked the literature was full of
>>>>>>>> maths that I didn't understand! Also they mostly deal with
>>>>>>>> three-dimensional space that makes the formula  a bit more
>>>>>>>> convoluted.
>>>>>>>> I will try again today and see if I can get it.
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Peiman
>>>>>>>>
>>>>>>>> On 21 January 2011 12:41, Victor Lazzarini
>>>>>>>> 
>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Stereo amplitude panning is two-channel. An extension of it to more
>>>>>>>>> than
>>>>>>>>> two
>>>>>>>>> channels is VBAP.
>>>>>>>>> Multichannel audio can also be encoded in ambisonics.
>>>>>>>>> Anything else will be an ad-hoc solution which will not give proper
>>>>>>>>> localisation. What you are
>>>>>>>>> looking at is some sort of amplitude panning that is not based on
>>>>>>>>> the
>>>>>>>>> vbap
>>>>>>>>> formulae. Why
>>>>>>>>> not use VBAP then? All you need is to look up the literature and
>>>>>>>>> find
>>>>>>>>> out
>>>>>>>>> what equations are
>>>>>>>>> used for scaling.
>>>>>>>>>
>>>>>>>>> Victor
>>>>>>>>> On 21 Jan 2011, at 12:32, peiman khosravi wrote:
>>>>>>>>>
>>>>>>>>>> I am using VBAP for general panning but the problem is that VBAP
>>>>>>>>>> applied to one FFT bin at a time is just not practical. Nor is
>>>>>>>>>> ambisonics.
>>>>>>>>>>
>>>>>>>>>> In fact I am not really using the formula for panning as such but
>>>>>>>>>> as
>>>>>>>>>> part of an algorithm that can mix the content of one table into
>>>>>>>>>> six or
>>>>>>>>>> more tables. So for example:
>>>>>>>>>>
>>>>>>>>>> value (amplitude data) at index 1 of table_A is divided in half
>>>>>>>>>>  (or *
>>>>>>>>>> .5)  and then set to the index 1 of table_B and table_C. Or
>>>>>>>>>> simply:
>>>>>>>>>> multiply index 1 one table_B and table_C by 0.5 and the remaining
>>>>>>>>>> tables by zero.
>>>>>>>>>>
>>>>>>>>>> In the above example the user has defined an input of 0.5 that
>>>>>>>>>> mixed
>>>>>>>>>> the value equally into table one and two.
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> Peiman
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On 21 January 2011 12:12,   wrote:
>>>>>>>>>>>>
>>>>>>>>>>>> For more than 2 channels, I'd suggest using VBAP:  vector-based
>>>>>>>>>>>> amplitude panning.
>>>>>>>>>>>>
>>>>>>>>>>>> Victor
>>>>>>>>>>>
>>>>>>>>>>> Or ambisonics?
>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> On 21 Jan 2011, at 12:04, peiman khosravi wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>> Hello,
>>>>>>>>>>>>>
>>>>>>>>>>>>> I have a very basic question. I know the formula for stereo
>>>>>>>>>>>>> panning
>>>>>>>>>>>>> but how is this implemented with more than two channels?
>>>>>>>>>>>>>
>>>>>>>>>>>>> E.g. the value 0 routes the entire signal into channel one, .5
>>>>>>>>>>>>> mixes
>>>>>>>>>>>>> the sound into channels one and two, and 1.5 mixes the signal
>>>>>>>>>>>>> into
>>>>>>>>>>>>> channels 3 and 4.
>>>>>>>>>>>>>
>>>>>>>>>>>>> I know that there are panning opcodes for this but I am trying
>>>>>>>>>>>>> to
>>>>>>>>>>>>> implement it in a udo that mixes the FFT bins among different
>>>>>>>>>>>>> speakers. I have found a way to do this discretely between
>>>>>>>>>>>>> channels
>>>>>>>>>>>>> but I would like to know the formula so that I can interpolated
>>>>>>>>>>>>> between the channels (to avoid drastic splits of the bins
>>>>>>>>>>>>> within
>>>>>>>>>>>>> listening space that can lead to bubbly artifacts). Naturally
>>>>>>>>>>>>> this
>>>>>>>>>>>>> means using a table for each channel of audio with a table size
>>>>>>>>>>>>> of
>>>>>>>>>>>>> FFT/2 and using another table to control the frequency
>>>>>>>>>>>>> dependent
>>>>>>>>>>>>> panning. It remains to be seen if it is viable in terms of CPU.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Thanks very much in advance.
>>>>>>>>>>>>>
>>>>>>>>>>>>> Best,
>>>>>>>>>>>>>
>>>>>>>>>>>>> Peiman
>>>>>>>>>>>>>
>>>>>>>>>>>>>
>>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>>
>>>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>>> "unsubscribe csound"
>>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>>
>>>>>>>>>>>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>>> "unsubscribe
>>>>>>>>>>>> csound"
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>>
>>>>>>>>>>>  https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>>> "unsubscribe
>>>>>>>>>>> csound"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>>> "unsubscribe
>>>>>>>>>> csound"
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>>        https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>>> "unsubscribe
>>>>>>>>> csound"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>>> Discussions of bugs and features can be posted here
>>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>>> "unsubscribe
>>>>>>>> csound"
>>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>>         https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>>> Discussions of bugs and features can be posted here
>>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>>> "unsubscribe
>>>>>>> csound"
>>>>>>>
>>>>>>>
>>>>>>
>>>>>>
>>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>>> Discussions of bugs and features can be posted here
>>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>>> "unsubscribe
>>>>>> csound"
>>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Send bugs reports to the Sourceforge bug tracker
>>>>>          https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>>> Discussions of bugs and features can be posted here
>>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body
>>>>> "unsubscribe
>>>>> csound"
>>>>>
>>>>>
>>>>
>>>>
>>>> Send bugs reports to the Sourceforge bug tracker
>>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>>> Discussions of bugs and features can be posted here
>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>>> csound"
>>>>
>>>>
>>>
>>>
>>> Send bugs reports to the Sourceforge bug tracker
>>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>>> Discussions of bugs and features can be posted here
>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>>> csound"
>>>
>>>
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
>> csound"
>>
>
>
>
> Send bugs reports to the Sourceforge bug tracker
>           https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe
> csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-24 04:22
Frommatt ingalls
SubjectRe: [Csnd] simple math question re panning
> 
> send a stereo signal to the front and back but revers the channels in
> the back (so that you get a sort of diagonal stereo image as well as
> the frontal and back stereo image). This means that the off-center

that trick always leaves me disappointed, if not annoyed - the last concert i was
at where they were doing it i was sitting in the back half of the hall on the right and
there was no stereo image whatsoever.  if they just had the 2 front speakers on
it would have been much better!

btw, have you seen the wendy carlos surround site?
http://www.wendycarlos.com/gosurround.html

it's pretty good in laying out the basics and i find myself going to once a year or so.
the "digressions" and "blunders" are especially good reminders why "4 corner" quad
sucks!

-m

Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"


Date2011-01-24 11:10
Frompeiman khosravi
SubjectRe: [Csnd] simple math question re panning
Thanks for the links Matt.

RE your disappointment: had you heard the pieces before? Maybe there
just wasn't any stereo image in the pieces to begin with. Maybe it was
diffused badly or that the set-up wasn't great.

There could have been many other issues that caused this (my bet is a
combination of bad diffusion and lack of stereo image in the pieces to
begin with!). Also needless to say that this or any other tricks do
not work on every piece and set-up, it is the diffuser's job to make
the right judgment.

Best,

Peiman

On 24 January 2011 04:22, matt ingalls  wrote:
>>
>> send a stereo signal to the front and back but revers the channels in
>> the back (so that you get a sort of diagonal stereo image as well as
>> the frontal and back stereo image). This means that the off-center
>
> that trick always leaves me disappointed, if not annoyed - the last concert i was
> at where they were doing it i was sitting in the back half of the hall on the right and
> there was no stereo image whatsoever.  if they just had the 2 front speakers on
> it would have been much better!
>
> btw, have you seen the wendy carlos surround site?
> http://www.wendycarlos.com/gosurround.html
>
> it's pretty good in laying out the basics and i find myself going to once a year or so.
> the "digressions" and "blunders" are especially good reminders why "4 corner" quad
> sucks!
>
> -m
>
> Send bugs reports to the Sourceforge bug tracker
>            https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>


Send bugs reports to the Sourceforge bug tracker
            https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"