Head-Tracking for Virtual 3D Audio Environments – Part 1 (Research)

Inspired by a colleague at work who was required to research an area of audio technology as part of his audio engineering degree, i’ve been dabbling over the last few weeks with a Nintendo Wii Remote and DirectSound.

Basically, what he needed was a piece of software which could simulate a audio-centric virtual environment. The audio simulation would involve a sound being modified based on the head-orientation of the user. If the user looks to the left, the sound “appears” to come from the right side of the head, and the same vice-versa. In order to perform the head-tracking we were going to rely on the capabilities of the Wii remote and all it’s IR camera glory. As with all clients, there really wasn’t anything much clearer specified, and I was left to kind of work out the rest 😉

The general concept behind the head-tracking is to use two points-of-reference on the user’s head to determine which side is left/right. Just like Johnny Chung Lee had done with his head-tracking exercise. With a little nudge forward from my old high-school electronics days, and $10 at JayCar, I’d soldered and constructed 2 purpose-built head-mounted IR LEDs. Blu Tack is an amazing product, and there’s nothing I found it won’t stick to. I won’t go into the detail of making one of these. It took me 20 mins, and the following article on making an IR LED pen was sufficient enough. As a tip, to check if your IR light is working correctly, you can use a digital camera and point the IR light toward the camera. Our eyes can’t pick up infra-red light, but the CCD on a camera can.

Post-hardware construction, the first phase of this project basically entailed a proof of concept, and an opportunity for me to learn about the two major components of this project i knew close to nothing about:

  1. Connecting and using the the Wii remote on a PC
  2. Using DirectSound to control audio

But first there would be more pressing matters. Like getting my Soleil Bluetooth receiver to work under VirtualBox on Linux. I don’t run any development software under my windows-boot partition. My windows partition has one intended purpose….To cut a long story short, it looked like it would be a bigger hassle trying to get the BT dongle to work under linux than to just install VS in my gamebox partition…So that’s that.

The BlueSoleil software worked like a charm, and within minutes I was hooking up the Wiimote to the laptop. no problems. The Wiimote is detected as just another HID, so it pretty much worked out of the box on XP.

At this point, I went out to find *how* to actually do each of the individual unknowns for this project. And it’s at this point I need to credit two articles which pretty much gave me everything I needed to get going. I was fortunate enough to find this article on CodeProject on using DirectSound, and an MSDN blog with a managed library for controlling the Wiimote. Too easy.

Hooked up the sample Wiimote library, turned on the Wiimote, turned on my IR lights and voila – worked a treat.

And that’s it for this post….next post, i’ll describe in a bit more detail the putting together of the software – certainly more interesting than all this drivel – and with pictures…..

4 comments

  1. Hi.

    Today I´v heard and seen this Amazing Thing…..

    Maybe I can give You and your Friend a TIP:

    If he is Using CubaseSX (Cubase VST 3.6 and above), it has an Joystick Support for Surround Adjustings.
    To develope an Music-Software that manage Surround-Sound, is hard (THINK SO). U need to Setup an Mixer with Remote and Automation Data in Realtime, and all that without significant Delays. If You Just want to proof if the “HeadTracking” can be used, try to get the Signals of the WIIRemote into Joytstick DATA, and try it out in the DAW-Soft.
    What would be an Adventure, is to use the Accelleration Control DATA, from the WIIRemote and transform it into MIDI DATA and and make CC-DATA.

    Where I see a Problem is the Vertikal DATA from the WIIRemote, the most Surround Settings are “Round” no Y-axis only x-Axis and z-axis…

    Happy Remoting…… from Hamburg Germany (sorry for my bad English)
    THX and c..u Joshi

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>