Headtracker DIY for Binaural rendering of Ambisonic

As discussed in the last Notam’s SuperCollider Online Meetup, I think it was @madskjeldgaard who referred to hedrot (Ambisonics tutorial: Binaural head rotation using Reaper, Hedrot and IEM Plugins :: Mads Kjeldgaard — Composer and developer). Since this project is stopped at the moment, I searched for alternatives and I found Head Tracker - Head Tracker based on Arduino Nano 33 BLE. So I purchased one and got it running quite smoothly, even on MacOS (except flashing the firmware which I did on Windows). The nice thing is that all necessary sensors are already on-board.

My question is: What are the building blocks to integrate into SuperCollider? I don’t use Reaper.
On the SuperCollider side I’d use the Atk library. Should I use the IEM Plug-in Suite instead?

I’d be grateful for any hints.

Hi ! I would not recommend hedrot since it makes use of an annoying middleware software used for communication between the tracker and your software of choice. Instead I recommend IEM’s Mr Head tracker which uses an arduino setup or our temix of the same which is a little bit simpler using a Teensy and it comes with a 3D printed enclosure. Also includes examples and a full quark for easy usage in SC:

The concept is rather simple. The head tracker sends gyroscope data (yaw, pitch, roll) as (14 bit) midi so it pretty much works just like any other midi controller. The midi data is then used to rotate the entire sound scene to give an impression of your head moving inside of the 3D space. After that, the rotated signal is sent to a binaural decoder that turns the ambisonic signal into an audio signal suitable for headphones.

I’d recommend using ATK inside of SC. It is beyond excellent and it contains some of the best ambisonics documentation around (I’ve actually never seen anything that comes close). But you should spend time reading the docs, even though it may be a demanding read it is really rewarding (and all code examples are interactive in SC, don’t forget) instead of diving head first into it.

Oh I didn’t see you already had bought a headtracker. If you can get it to output the data as midi or osc it should be the same workflow. Connect it to a rotation object placed just before the binaural decoder. Then stream and ambisonics into that chain, for example:

Mono sound->encoder->scene rotator(controlled by head tracker)->binaural decoder->headphones.