Binaural experiments in max/msp

animalfarm's icon

Hello,

I'd like to start to explore binaural techniques in max. Any good starting pionts? I see theres 2 different main libraries, ambisonics and IRCAM spat, any advantages or disadvantages between the two (or other solutions)?

What I'd basically like to achieve is pretty much what this video shows:

Ideally in a 3d space, have a bug flying around the hearers "head". ideally the hearer should be able to localize the bugs position just by hearing.

Any help would be greatly appreciated!

roger.carruthers's icon

I started doing a project on binaural stuff a while back and made a little patch comparing three methods of binaural panning with a straight equal power pan.
You'll need to download the various HRTF's, and some 3rd party objects, but the URL's for the HRTF's are in the patches and +binaural and partconvolve can be found at:
http://soundhack.henfast.com/freeware/
http://www.alexanderjharker.co.uk/Software.html

Max Patch
Copy patch and select New From Clipboard in Max.

For the ticktock demo patch, find yourself a nice clock sample (or better still two!) and enjoy the sound I go to sleep to every night, of the two clocks either side of my bed gradually drifting in an out of sync!
Cheers
Roger

Roman Thilenius's icon

binaural is more than distribution/panning, it will require certain filters as well.

there is a free set of HRTF IR samples on the net, together with a max patch, maybe
someone knows the link.

the +binaural plug-in is good example for an FFT solution.

my long time favorite is two copies of ambisone vst with 180 degree offset for the postion
put onto a stereo source (real recordings work best.)

animalfarm's icon

Thanks for the replies!

@roger
I tried your attached patches, but no luck with the HRTF's, can't it working yet.

What would be the most straightforward way to simulate following effect,a nd it is even possible... i.e a tone source (imagine a bee) flying around the listeners head. Is it even possible to assign it a 3d location, i.e not just xy but also a z value?

Wetterberg's icon

Yes. It is possible to simulate it. It's also dreadfully impractical and the effect is to many, including me, underwhelming, I'm afraid.

The most straightforward way is the Roger Carruthers way from above, and the ideal ways include modelling ears, doing a model head binaural microphone, using THAT to record the HRTFs, then using THOSE to convolve your sound, and then decoding THAT signal into a virtual four-microphone ambisonics thing.

... yes, I'm even skipping steps here, I think.

the Jamoma package has a lot of great ambisonics stuff built in, I'd look into the docs for that, since it will probably give you the best headstart, but I have to be honest; a LOT of work will go into this.

Roman Thilenius's icon

indeed, there are also formulas for the frequency filters and/or volume curve for z (often called "elevation")

but dont forget that if you want to use filters, it will square the number of FIR or IR filters or data for
filtercurves compared to having only a 2d layer. (azimuth/distance or vertical/horizontal)

-110

j.y.bernier's icon

The Kemar HRTF (http://sound.media.mit.edu/resources/KEMAR.html) in "compact" form are 128 samples long, so they are easy to convolve with buffir~

j.y.bernier's icon

And here is the patch:

3238.FIRGardner
FIRGardner