Spatial Audio Simulation System
Audio3D is a program to simulate simple virtual audio environments. Multiple monophonic sound sources can be placed in a virtual room and are combined using room response and head-related transfer functions into a real-time binaural audio signal that can be listened to over headphones. Audio3D also supports a head-tracker such that the sound sources appear at a constant room position even if the header orientation changes. A server version Audio3DServer can be controlled by external clients.
Download and Installation
Audio3D and Audio3DServer are only available for Windows PCs by anonymous FTP from:
Download the file called audio3dddd.exe into a temporary directory. Then find and run the file to unpack and install.
- Audio3DServer: implement reverberation in frequency-domain to allow longer reverb times.
- Audio3DServer: corrections to early reflections in terms of delay and amplitude.
- Audio3DServer: add "render_errors" property to detect replay errors.
- Audio3DServer: put null head model into configuration dialogue.
- Audio3DServer: move HRTF initialisation to program start so occurs once only.
- Audio3DServer: add "gain_irlen" parameter to set length of impulse response used to implement frequency-dependent relections.
- Audio3DServer: HR impulse responses now automatically resampled to mixer rate, allowing operation at rates other than 44100 with CIPIC HRIR.
- Improved stability on lower powered CPUs.
- Audio3DServer: Only open render device when replay starts for the first time.
- Improved performance copes with longer reverberation times.
- Head tracker calibration/reset commeand.
- Audio capture now synchronised to source play/pause to guarantee alignment and duration.
- Add capture and download of head tracker data in audio3dserver
- Supplied NULL version of HRIR to make calibration measurements
- Bug fix for frequency-dependent gains in Audio3DServer
- Supplied minimum phase versions of HRIR
- 'Reset' command in Audio3DServer
- Frequency-dependent gains on wall reflections
- Improved image method implementation
- Improved implementation of room reverberation
- Spherical head model as alternative to HRIR measurements
- User specified equalisation impulse response
- User specified reverberation impulse response
- Diffuse sound sources
- Fix source signal level
Full details of operation of Audio3D can be found in the Program Documentation.
- The configuration file is a text file with file extension "a3d".
- Comment lines must be prefixed with '#'.
- Sections in the file are marked with '[name]'
- Attribute value pairs are indicated as 'attribute=value', with one attribute per line.
- Currently these sections are supported:
[config] [listener] [source] [noise]
- room: sets the size of the room (width, depth, height) in metres. Default: room= 4 3 2.5
- reflect: sets the wall, floor and ceiling reflection coefficients. Cannot be used together with "gains" below. Default: reflect= 0.9 0.7 0.7
- gains: set the frequency-dependent gains at 125, 250, 500, 1000, 2000, 4000 and 8000Hz. Cannot be used with "reflect" above. Default: none.
- srate: sets the operational sampling rate (samples/sec). Note all impulse responses must be supplied at this rate. Default: srate= 44100
- level: sets the reference level in dB for the audio mixer for RMS of full wave sine. This is also the maximum level before distortion. Default: level= 80
- reverb: sets duration of the reverberation impulse response in seconds. Maximum 1 second. Default 0.05 seconds. Or specifies WAV file containing user-specified reverberation impulse response. reverb=0.05
- position: sets the position of the listener (x, y, z) in metres. Default is centre of room. The position of the listener is currently fixed. position= 2 1.5 1.25
- facing: sets the direction that the listener is facing. The orientation of the listener can be manipulated using keyboard commands or the head tracker. Two values specify azimuth and elevation in degrees. Three values specify a location in space in metres. Default: facing= 0 0
- hrir: gives filename of head-related impulse responses in either full format (.hrir) or PCA component format (.hrpca). This value can also be supplied/overridden by a menu option. Use 'spherical' to use the built-in spherical head model instead of an external set of HRIR. Default none. hrir= subject_003.hrir
- npca: sets the maximum number of components to use for PCA coded HRIR. Zero means use all available components. Default: npca= 0
- equalisation: specifies the name of a WAV file containing a headphone equalisation impulse response. Channel 1 for left ear, channel 2 for right ear. Monophonic signal is used for both ears. equalisation=telephone.wav
- audio: gives name of audio file containing source signal. Will be changed to single channel at mixer sampling rate if required. Relative filenames are resolved with respect to the folder containing the configuration file. This value can also be supplied/overridden by a menu option. If the filename is given as "capture" then the audio capture device is used as the signal source instead of a file. audio= filename.wav
- level: specifies the presentation level of the source as if measured at 1m (dB). This is calculated using the RMS of the signal compared to the mixer level. If the value is given as "num,auto", then the level can be adjusted dynamically with the up/down arrow keys. If the level is given as 'fix', no level adjustment is performed. level= 65
- position: sets the (initial) position of the source (x, y, z) in metres. Or use 'none' for diffuse source. position= 2 2.5 1.25
- loop: plays the audio in a continuous loop. Values: on/off. Default: on. loop= on
- circuit: allows the source to move in a circuit around the listener, controlled by the mouse wheel. The circuit is either of constant elevation (horizontal) or constant azimuth (vertical). Values: horizontal/vertical/off. Default: off. circuit=horizontal
- audio: gives name of audio file containing noise signal. Will be changed to single channel at mixer sampling rate if required. Relative filenames are resolved with respect to the folder containing the configuration file. If the filename is given as "capture" then the audio capture device is used as the signal source instead of a file. audio= filename.wav
- level: specifies the presentation level of the noise as if measured at 1m (dB). If the value is given as "num,auto", then the level can be adjusted dynamically with the up/down arrow keys. level= 65
- position: sets the position of the noise source (x, y, z) in metres. position= 2 2.5 1.25
Example Configuration file
# audio3d config file # # movable speech source plus fixed mechanical clock # [config] room=4 3 2.5 reflect=0.5 0.5 0.6 level=80 # [listener] position= 2 1.5 1.25 facing= 2 2.5 1.25 hrir=subject_003.hrpca npca=8 # [source] position= 2,2.5,1.25 circuit=horizontal audio=six44100.wav loop=1 level=65 # [noise] position= 0,1.5,1.25 audio=130388__olver__clock-ticking.wav loop=1 level=45
- Open Configuration
- Opens a new configuration, replacing current
- Open HRIR
- Opens a new HRIR source file, replacing any specified in config file
- Open Audio
- Opens a new audio file to replace any audio file specified in the [source] section of the config file.
- Save Captured Audio
- Saves the generated and captured audio as stereo file.
- Audio Play
- Starts replay of all sound sources
- Audio Pause
- Pauses replay of all sound sources
- Audio Capture
- Toggles audio capture
- Audio Direct Path
- Toggles inclusion of direct path in synthesis
- Audio Reflections
- Toggles inclusion of early reflections in synthesis
- Audio Reverberation
- Toggles inclusion of room reverberation in synthesis
- Audio Devices
- Presents dialog to allow selection of the audio capture device and the audio rendering device.
- View Head Tracker
- Toggles on and off operation of the head tracker (if connected).
- Head Tracker Reset
- Resets head tracker to 0 degrees azimuth and 0 degrees elevation.
- Page Up
- Rotates listener head anticlockwise
- Page Down
- Rotates listener head clockwise
- Up arrow
- Increases level of sources marked with 'level:live' by 1dB
- Down arrow
- Decreases level of sources marked with 'level:live' by 1dB
- Space bar
- Toggles replay on and off.
The first time Audio3DServer is used, it should be configured through the Edit | Settings menu item. You can then select the audio rendering device and the HRIR data file. Once settings have been saved, restart the program to make them active.
By default the server can be found at the URL http://localhost:8080/.
|/||Return current status of server|
|/reset||Reset all parameters and sources to initial values|
|/set||Set various server properties|
|/get||Get source status and location|
|/status||Get current values of all server properties|
|/source||Specify a sound source|
|/play||Start sound sources playing|
|/pause||Pause playing sound sources|
|/download||Download captured audio|
|/tracker||Download captured head tracker data|
|/equalisation||Upload a headphone equalisation impulse response (as WAV file)|
|/reverberation||Upload a room reverberation impulse response (as WAV file)|
The server properties are as follows:
|render_device||Audio device name||Read only|
|mixer_rate||Audio sampling rate||Read only|
|mixer_level||Audio reference mixer level (dB)||Read only|
|reverb_time||Reverberation time (s)||Read only|
|hrir_filename||HRIR filename||Read only|
|hrir_max_pca||HRIR PCA mode #coefficients||Read only|
|hrir_pca||HRIR PCA mode #used coefficients||Read only|
|room_width||Room width (m)||Read/write|
|room_depth||Room depth (m)||Read/write|
|room_height||Room height (m)||Read/write|
|reflect_wall||Wall reflection coefficient||Read/write|
|reflect_floor||Floor reflection coefficient||Read/write|
|reflect_ceiling||Ceiling reflection coefficient||Read/write|
|gain_0125||Reflection coefficient at 125Hz||Read/write|
|gain_0250||Reflection coefficient at 250Hz||Read/write|
|gain_0500||Reflection coefficient at 500Hz||Read/write|
|gain_1000||Reflection coefficient at 1000Hz||Read/write|
|gain_2000||Reflection coefficient at 2000Hz||Read/write|
|gain_4000||Reflection coefficient at 4000Hz||Read/write|
|gain_8000||Reflection coefficient at 5000Hz||Read/write|
|listener_x||Listener position X (m)||Read/write|
|listener_y||Listener position Y (m)||Read/write|
|listener_z||Listener position Z (m)||Read/write|
|listener_azimuth||Listener azimuth (rad)||Read/write|
|listener_elevation||Listener elevation (rad)||Read/write|
|head_tracker||Header tracker available||Read only|
|head_tracking||Head tracking enabled||Read/write|
|head_track_azimuth||Head tracker reset azimuth (rad)||Write|
|head_track_elevation||Head tracker reset elevation (rad)||Write|
|capture||Audio and head tracker capture enabled||Read/write|
|equalisation_ir||Headphone equalisation IR length||Read only|
|reverberation_ir||Room reverberation impulse response length||Read only|
Note that use of reflection coefficients and frequency-dependent gains are mutually exclusive. Only one method may be chosen at a time.
The following source properties may be set:
|source_index||Source number||0 .. 31|
|source_level||Source level (dB)||-100 .. mixer_level or 'fix'|
|source_x||Source position X (m)||0 .. room_width or 'none'|
|source_y||Source position Y (m)||0 .. room_depth or 'none'|
|source_z||Source position Z (m)||0 .. room_height or 'none'|
|source_reset||Source reset to sample 0||1|
If a source level is given the RMS of the signal is adjusted to make it play at that level with respect to the mixer level. Use a setting of 'fix' to leave the source level unchanged. To create a diffuse source with no location, set the x,y,z co-ordinates to 'none'.
To upload audio data, use the HTTP file upload mechanism with data stored in WAV format.
The following source properties may be got: (send source_index to get details of one source)
For the "Play" and "Pause" commands, include a variable "select" which contains a bit-map of which sources are to be played/paused. Source 0 = bit 20, source 1 = bit 21, etc. For example, to play source 0, set select=1. To play sources 0 and 1 together, set select=3.
Documentation and example scripts for the MATLAB API may be found in the installation matlab folder.
The program supports the following Head Trackers:
Please send suggestions for improvements and reports of program faults to email@example.com.
Please note that we are unable to provide help with the use of this program.
Audio3D is not public domain software, its intellectual property is owned by Mark Huckvale, University College London. However Audio3D may be used and copied without charge as long as the program and help file remain unmodified and continue to carry this copyright notice. Please contact the author for other licensing arrangements. Audio3D carries no warranty of any kind, you use it at your own risk.