True binaural recording uses stereo mics pointed outwards from inside your ears to capture as closely as possible the exact sound pressure waves entering your ear canals. The binaural technique captures filter (transfer function) differences caused by body parts shadowing and reflecting sounds arriving from various directions: the ear flaps (pinnae), head, shoulders, etc. Played back over headphones or earbuds,binaural preserves the IID and ITD cues which are basic to sound localization.
In this part of the assignment, we'll use four channels of sound (giving you a much wider plane of possible locations for your sound sources - essentially, two in front of your listener and two behind, as in the quad speaker setups at CCRMA) and process those quad signals into a stereo binaural file for posting to the homework factory.
Before you jump into the world of 4-channel sound system, you'll need to have a channel test tool for sanity's sake, and equipment that has more than two output channels. Its recommended that you find time to use the CCRMA stations, as they are setup to handle multichannel, while your laptop is likely only setup for two. NOTE: If you
In this section, we set up a quick test to make sure we're hearing all four channels. At a quad station with a linux computer (or laptop where you hear all four channels, even if they are via headphones) launch jack and prepare its setup to be connected to the appropriate soundcard. You can launch the control panel for Jack with the following command in terminal:
qjackctl &
NOTE: If you're working at a house linux computer with a Tascam quad soundcard and you are listening via headphones, you will still hear all four channels but they will be "hard-panned" left and right.
Hit start. You're good if the GUI starts showing a changing computer status (otherwise, you will get a complaint popup). Sound is now live.
Download and open DacBeeps.ck in miniAudicle. In miniAudicle preferences, set output channels to 4.
Preferences > Audio > Output Channels > 4
Or if you are executing chuck from the command line use
chuck --channels:4 DacBeeps.ck
Add the shred and adjust speaker levels for reasonable balance. You should get one beep for speaker 1, two beeps for speaker 2, etc. up to four. When your'e hearing that, congratulations! You are now working in a world of multichannel.
You can now send sounds not only from left to right and from right to left, but pan from behind your left shoulder to in front of your left shoulder, or diagonally across your body. (Again, if you're using the quad stations, you'll be able to experience this spatialization fully; if you are using the house heapdhones, and sending sound from channel 1 to channel 3, the sound won't pan at all because they will be sent to the same headphone.) Conceptualize at least one part of your composition such that you're taking advantage of the four possible audio outs. You can address each of these channels by using:
dac.chan(0) dac.chan(1) dac.chan(2) dac.chan(3)
Note: A good way to pan in ChucK is to shred the DBAP4.ck file and pass through a portion of a wav file that you would like to pan in 4 channel space with this file: DBAP4_ex.ck, in which the third to last line, p.setPosition(Math.sin(t),0) can be changed to p.setPosition(Math.sin(t),Math.cos(t)) to send your sound in a circle around all four speakers (for example).
In the next section, we will be using code that converts four mono .wav files to two stereo files by mixing them down to binaural. So, your radio play needs to be exported into four .wav files. Modify the "write to a file" code from previous assignments to output to four different .wav files. i.e. make four of these WvOut instances with a naming convention of 'chan0','chan1', etc.:
dac.chan(0) => WvOut chan0 => blackhole; me.Sourcedir() + "/chan0.wav" => string _capture0; _capture0 => chan0.wavFilename;
Follow that code at the end of the file with the following for each WvOut object:
chan0.closeFile();
This section details the steps necessary to take your four mono .wav files and mix them down to stereo.