I am working on a project where I need to use a geomagnetic sensor data to drive a prerecorded sound such that the sound effect creates an auditory illusion that the source of the sound is always originating from the geographic north. I have limited processing power at my disposal, an MSP432 microcontroller.

  • You should provide more information on your intended application. There are a plethora of techniques for spatialisation and 3D sound but not all of them are intended for all cases. Techniques such as HRTF rendering are intended for headphone use, WFS (Wave Field Synthesis) for large speaker setups and techniques such as VBAP, DirAC and Ambisonics for more versatile applications. Additionally, simple stereophonic or polyphonic/multichannel amplitude techniques could work quite well (this is in fact identical to VBAP in principle).
    – ZaellixA
    Jul 22 '20 at 15:42

Do you have stereo output? If so, just manipulate the volumes in the left and right channel differently.

For example when:

  • facing north: both channel levels at 100%
  • facing east: left channel 60%, right channel 40%
  • facing south: both 20%
  • facing west: left channel 40%, right channel 60%

The user turns towards the loudest sound, and thereby should find north. I would avoid dropping levels below a certain threshold at all times. I'm sure you'll find an easy way to calculate the levels. Basically, on each hand side, there's one channel becoming quieter more quickly than the other channel until they both have their plateau in the south. Additionally, you can delay the channel's signal which is furthest away from north a little bit. E.g. when facing east the right channel's signal arrives a few milliseconds later than left (try above 50 ms or it is too hard to notice).

However, so far that's only good enough for orientation on a 2d plane. The user may not be on the surface but in a high-rise building or on a mountain. The height information makes the third dimension. One way is to reduce volume overall with height. But I think a better way is to change pitch. The closer to the ground the higher the frequency of the sound. But I don't know if this requires already too much processing by your chip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.