|
Kyma Forum
![]() Tips & Techniques
![]() Panning polar coordinates
|
| next newest topic | next oldest topic |
| Author | Topic: Panning polar coordinates | |
|
garth paine Member |
Hi all - my math is not strong and so I need some help I am tracking someone (MoCAP) in a 3D space - I want to use the location of that person to pan a sound to that point on the radius of the circle of 8 speakers being driven by Kyma. So I am using MultichannelPan and want therefore to convert to location of the person into a range of 0-2 to drive the Angle parameter. I know the x,y,z location of the user, and I know the centre of the space. I know the size of the world as a total length x, y, z - I was thinking if I used the 'x' and 'z' positions and compared them to the centre point of the space and then used arcTan to calculate the angle from 0 pan - which will sit on the line dissecting the space on the 'x' plane at the centre point of the world - that this would give me and angle from 0 to 360, and that dividing that angle by 180 would give me the panning Angle - All messages are coming in as OSC messages. However, I can not work out how to do this in Kyma - was going to use a SoundToGlobalController but am getting myself confused by the math. Would love some help from one of you math brains Thanks, Garth IP: Logged | |
|
SSC Administrator |
Will this do the trick? It uses the ArcTan Sound to get: angle = arcTan (y/x) assuming x & y range from (-1,1) with zero at the center of the circle. IP: Logged | |
|
SSC Administrator |
p.s. Who is MoCAP? ![]() IP: Logged | |
|
garth paine Member |
MoCAP is a Parisian, Tunisian philosopher who specializes in Agency and actor network theory :-) I am working with a Motion Capture system (Optitrack) with Realtime OSC output. [This message has been edited by garth paine (edited 18 May 2013).] IP: Logged | |
|
pete Member |
I think the angle = arcTan (y/x) will only give you 180deg twice, You may need to include, if x is minus, angle =angle+180Deg (or PI if in radians). Pete [This message has been edited by pete (edited 17 May 2013).] IP: Logged | |
|
SSC Administrator |
Hi Pete, The output of the ArcTan Sound is the four-quadrant arctangent... so it does take the signs of x and y into account. Go ahead and give it a try. IP: Logged | |
|
pete Member |
Ohh that's classy nice work Pete IP: Logged |
All times are CT (US) | next newest topic | next oldest topic |
![]() |
|
This forum is provided solely for the support and edification of the customers of Symbolic Sound Corporation.