< Back to IRCAM Forum

High order rotation in Spat and Csound

Hello,

I have noticed that spat5.hoa.rotate~ has roll, pitch and yaw available in higher orders. I have been trying to do this also in csound, but I don’t know about an implementation of it. I found this set of calculations from Blue Ripple: http://www.blueripplesound.com/rotations
Based on this and some other articles, I managed to create a third order yaw rotation in Csound. As I’m not a mathematician, I don’t know how to extend roll and pitch to third and higher orders. Is there some similar public information about roll and pitch in third or higher orders?
I will end up using Spat for decoding (Fuma channel ordering, maybe I will need to reroute channels). It would be great to have rotations already in the decoded files which I create with Csound, and have a Csound opcode with the same possibilities as spat5.hoa.rotate~.

Best
Ruben

Hi Ruben,

If I remember correctly, my implementation is based on:
C. H. Choi, J. Ivanic, M. S. Gordon, and K. Ruedenberg. Rapid and stable determination of rotation matrices between spherical harmonics by direct recursion. Journal of Chemical Physics, 111(19):8825–8831, 1999.
You will need a little bit of mathematical courage to read and implement it.

Also, I believe that Ambix is open-source and has yaw/pitch/roll rotations up to 7th order.

Good luck !
T.

Thank you!
I will have a look at the article and the code of Ambix.
Ruben