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
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