# Connexions

You are here: Home » Content » Surround Sound Simulation

### Recently Viewed

This feature requires Javascript to be enabled.

# Surround Sound Simulation

Summary: Generating the illusion of directional sound using calculated directional transfer functions.

## Directional Test Signal Creation

In order to test the accuracy of our calculated HRTFs, we used 5.1 surround sound test files used to calibrate home theater systems. We first had to downsample these files from their original sampling rate of 48000 Hz to our sampling rate of 41000 Hz. Since the files were all meant to be played at the same time, each file only played sound part of the time. Therefore, we had to cut out the unused parts of each file and create new sound files which included only the testing segment of each directional file. After this process was complete, we were left with five signals, each of which specified which direction the sound was supposed to come from.

## Directional Sound Playback

We then simulated these signals coming from particular directions using the equation from the HRTF calculation:

H Channel ( ω ) IN ( ω ) H Directional ( ω ) = OUT ( ω ) H Channel ( ω ) IN ( ω ) H Directional ( ω ) = OUT ( ω ) size 12{H_ ital "Channel" $$ω$$ cdot ital "IN" $$ω$$ cdot H_ ital "Directional" $$ω$$ = ital "OUT" $$ω$$ } {}
(1)

In this case HChannelHChannel size 12{H_ ital "Channel"} {}is the earbud to ear channel transfer function. Unfortunately, we weren’t able to characterize this channel with our available resources, so in this instance we assumed that HChannel=1HChannel=1 size 12{H_ ital "Channel"=1} {}. This left us with the following equation:

IN ( ω ) H Directional ( ω ) = OUT ( ω ) IN ( ω ) H Directional ( ω ) = OUT ( ω ) size 12{ ital "IN" $$ω$$ cdot H_ ital "Directional" $$ω$$ = ital "OUT" $$ω$$ } {}
(2)

By applying this equation to each calculated HDirectional(ω)HDirectional(ω) size 12{H_ ital "Directional" $$ω$$ } {}for both ears we were able to generate a series of synthesized sound files for each ear which when played in stereo would mimic a cound coming from a particular direction by using the following code:

L_OUT=[SYNTH_FL_L, SYNTH_FC_L, SYNTH_FR_L, SYNTH_RR_L, SYNTH_RL_L];

L_OUT=L_OUT';

R_OUT=[SYNTH_FL_R, SYNTH_FC_R, SYNTH_FR_R, SYNTH_RR_R, SYNTH_RL_R];

R_OUT=R_OUT';

FINAL_OUT=[L_OUT, R_OUT];

sound(FINAL_OUT, Fs);

In this code, the SYNTH terms are the vectors corresponding to the filtered test signals for front-left, front-center, front-right, rear-right, and rear-left directions. With the left and right ear outputs arranged as shown in FINAL_OUT, the sound command plays the first set of terms to the left speaker/headphone and the second set of terms to the right speaker/headphone as we desired.

## Content actions

### Give feedback:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks