Re: [Sursound] ambilib~ in C

2016-01-21 Thread Dave Malham
Hi Ricky,
If I remember rightly, all rotation parameters come into the code as
floats with a range of 0 to 1. In the code they are converted to radians, 0
to 2*KPi for azimuth, -KPi/2 to +KPi/2 for elevation since we generally
regard horizontal as 0 degrees (or radians) with downward angles negative
and upward angles as positive. Hope that helps - must admit that my brain
hurts from looking at that old and uncommented :-(  code, it's not a style
I personally like but we agreed that Matt would stick to Pd's coding style
for consistency with other externals when he did the port.

Dave

On 18 January 2016 at 22:01, Richard Graham <ri...@rickygraham.net> wrote:

> Hi all,
>
> I have some quick questions; I’m writing my own audio-rate control version
> of the ambilib~ library for Pd / Max and I wanted to clarify the following:
>
> The elevation param has an offset of -0.5: (x->APfElevationRight - 0.5)  *
> kPI.
>
> 1) Why is that?
>
> 2) The unit for elevation is radians, yes?
>
> All the best,
>
> Ricky
>
>
> ___
> Sursound mailing list
> Sursound@music.vt.edu
> https://mail.music.vt.edu/mailman/listinfo/sursound - unsubscribe here,
> edit account or options, view archives and so on.
>



-- 

As of 1st October 2012, I have retired from the University.

These are my own views and may or may not be shared by the University

Dave Malham
Honorary Fellow, Department of Music
The University of York
York YO10 5DD
UK

'Ambisonics - Component Imaging for Audio'
-- next part --
An HTML attachment was scrubbed...
URL: 
<https://mail.music.vt.edu/mailman/private/sursound/attachments/20160121/c86cdf74/attachment.html>
___
Sursound mailing list
Sursound@music.vt.edu
https://mail.music.vt.edu/mailman/listinfo/sursound - unsubscribe here, edit 
account or options, view archives and so on.


Re: [Sursound] ambilib~ in C

2016-01-21 Thread Richard Graham
Dave wrote: 

>  -KPi/2 to +KPi/2 for elevation since we generally
> regard horizontal as 0 degrees (or radians) with downward angles negative
> and upward angles as positive. 

Hi Dave,

Thanks, this does make sense. For anyone else interested:

Elevation for ambipan~ is defined as: x->APdELeft = (x->APfElevationLeft - 0.5) 
* kPI;
kPI = 3.14159265358979323846
x->APfElevationLeft = elevation input for, in this case, the left-most audio 
input
All input parameters are scaled 0 to 1. 
0 to 1 input offset by -0.5 gives us -0.5 to 0.5 range. 
Multiply that by 3.141 give us -KPi/2 to +KPi/2 (-1.5705 to + 1.5705)

Great! Thanks.

All the best,

Ricky

> 0 to 1 - 0.5)  * kPI.
___
Sursound mailing list
Sursound@music.vt.edu
https://mail.music.vt.edu/mailman/listinfo/sursound - unsubscribe here, edit 
account or options, view archives and so on.