b Riding East: June 2008

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

Sunday, June 01, 2008

Granados and Ravel

I recently performed again in the Stanford Noon Concert Series as part of Professor George Barth's studio. It has been a busy quarter, and so I was less ambitious this time around. Our new daughter Sabine arrived on May 12th. She is so unique and beautiful. Her cry has a quality of sweetness. In addition to finishing my last quarter of classes for my program, I'm also starting a new company, and have been spending a lot of time over at Bessemer Venture Partners in Menlo Park. And I'm coaching my son's little league baseball team. And so I was less ambitious for this concert.

I chose two Granados pieces because I promised recordings to my friends in the film school, specifically Charlene and Mike. They created a wonderful documentary film on the lives of three young people trying out for circus school in Montreal. We discussed some potential musical material, and in the end, they liked the Granados. In order to avoid copyright issues, I've made these recordings for their film. It will soon become obvious to Charlene and Mike that there is a gap between my skills and those of Alicia de Larrocha. I also performed the Ravel Waltz in the style of Borodin at the concert, and took the opportunity to record it again to compare how my technique and style have evolved over the past year.

Danza II, en do menor (Oriental), Enrique Granados

Danza V, en mi menor (Andaluza), Enrique Granados

A la Manière De. . . Borodin, Maurice Ravel