< Back to IRCAM Forum

Rotation in Spat5 rotates coordinate system?

Hello Everyone,

I’m trying to implement dynamic binaurilization with Spat5 and it seems spat5.transform as well as spat5.hoa.rotate do a rotation of the whole coordinate system when applying changes to yaw/pitch/roll. I already figured out that roll is applied to x-axis in spat convention, but when looking at Spat Viewer at the spat5.transform help file, one can see that after doing e.g. a 90 degree yaw rotation, roll rotates around the y-axis - so it seems that the x-axis was rotated by yaw to the former position of y-axis… The same behaviour seems to be true for spat5.hoa.rotate.

This makes it impossible to apply appropriate dynamic binaurilization by using tracker data to rotate the soundfield. Is this behaviour of rotatating the axis intented? Is it possible to somehow rotate with a fixed coordinate system?

Thanks in advance
Damian

Hello Damian,

  1. You don’t necessarily need spat5.transform or spat5.hoa.rotate for dynamic binauralization, as you could send the tracking data to directly set the listener’ orientation instead of rotating the sources (e.g. in spat5.binaural~).
  2. Orientation can be expressed either via Euler angles or quaternions (prefer quaternions if available).
  3. The behaviour you noticed is intended. Spat follows the “ZYX” rotation convention. See e.g. spat5.quat.fromeuler and spat5.quat.toeuler. So you should be able to convert your tracking data to something compatible with Spat.

Best,
T.

Hi tcarpent,

thanks for the quick reply!

  1. I know, but to be able to use different binauralizer (e.g. VSTs and such) the idea was to rotate the soundfield.

2-3) So it is possible to apply rotation without rotating the coordinate system?

Thanks and bests
Damian

It is theoretically possible to convert between intrinsic and extrinsic rotations. So, I believe you should be able to achieve what you want.
This is messy and usually requires banging one’s head against the wall, but should be possible.
(I’m sorry I probably cannot help further than that)

T.

Ok thanks - but just switch to quaternions wouldn’t do the job right?

It might, but I cannot say for sure.