b Riding East: Binaural Sound in Chuck

Tuesday, June 10, 2008

Binaural Sound in Chuck

After spending considerable cycles last quarter developing a multi-channel class framework in the Chuck programming language, I began to wonder, in the end, how many people would actually be able to hear 16-channel pieces in a space like the ccrma listening room. I then decided it would be interesting to think about 3D audio spatialization over Chuck and a pair of headphones. So, in addition to convincing some friends to port Chuck to the iPhone (stay tuned), I spent some time reading papers on binaural sound models, including the paper published by Phillip Brown and Richard O. Duda in '98 titled "A Structural Model for Binaural Sound Synthesis".

I've come up with two implementations of binaural sound in Chuck now. The first is my own model built on approximations from my research. The second is a work in progress based on the Brown and Duda paper. As you scan the source, you'll notice how trivial it is to create binaural sound by creating a Chuck class that inherits from the BinAural class I've created. The demonstration code goes on to create sound buffers that load up wave files and buzz a bumble bee by your ears while a thunderclap cracks 130 meters above your head. Eventually it starts to rain. All referenced sound files for the demo are also available.

I will come back to this code shortly and finish implementing models for the pinna. Currently, I have ITD, ILD, and HRTF functions.

Version 1.0
Version 1.1

Data files (must be in a data subdirectory underneath Chuck)
BumbleBee
Thunderclap
Rain

4 Comments:

Blogger Charley said...

Very nice work, Jeffrey!! Keep going with this please. It's very interesting.

BTW, you forgot to post the animal_4f.wav file...

Thanks for your efforts :)

11:31 AM  
Blogger Rajiv said...

Jeff! Wow. I don't know if you remember me I joined Tumbleweed when we were small, and left for medical school. Now I am doing primary care/injury at Kaiser, living in SF. Sounds like you are going back to find your roots. Good work.

6:36 PM  
Blogger enigma said...

Hi! Can I have your email adress? I need some information of your implementation of the "Brown and Duda" article.
Thanks!

6:36 AM  
Blogger Andrea Muñoz H said...

Yesterday I went to the Daniel Pearl Memorial Concert, and loved your music. I would really love to hear it again, so I was wondering if there's any place where I can find out when you will be playing again. I am sorry for posting this here, but I couldn't find your email address.
Thank you very much and congratulations!

10:37 PM  

Post a Comment

<< Home