[PD] multi-speaker panning.. problamtic maths

alexandre r. decoupigny alex.decoupigny at gmail.com
Mon Oct 23 13:34:50 CEST 2006

hello there,

i am working on a pd patch for panning sound on a multispeaker setting
using a usb-joystick. i am using the xjimmies library  for dealing with the
spatialsation. i also
use the hid object joystick to the values on the x and y axis.
currently i am struggling with the maths of it all.

more in detail this means that the xjimmies library gives me the opportunity
to controll the sound distribution on a horizontal slider. the slider
outputs the
values 0-360, representing the degress of a circle. my difficulties is how
to match up the x and y output values of the joystick.
my approach is to use angle the beween the x and the y axis, sending both
values to an atan2 object. before that i extend their range from 0...1 to
i understand that atan2 outputs radiants and not degrees.
if i divide atan2's output by pi and then multiply it with 180
the results are not at all, what i imagine them to be,.
all i am trying to achieve is to translate the circular motion on the
joystick into space.. any ideas what i am doing wrong ?
(i apologize for not putting the objects in brackets, these dont live on my

best regards

alexandre r. decoupigny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20061023/ead5522f/attachment.htm>

More information about the Pd-list mailing list