Vizard now has support for WorldViz custom ambisonics sound systems. Access to these sound systems is provided through the vizsonic module.
Unlike more basic methods such as Vector Base Amplitude Panning (VBAP) and other panning laws (5.1, 7.1 etc), which effectively move a source between pairs of speakers, Ambisonics is a method to reconstruct an actual sound-field in space (using the Huygen’s principle). The sonic result is then accurate across a sizable ‘sweet’ area, rather than at a single ‘sweet’ spot, and all speakers contribute to the sound-field, demanding less powerful speakers for the same output power. Ambisonics decodes a sound-field using spherical harmonics, and HOA uses increasingly detailed representations. The system proposed uses 3rd order Ambisonics, which involves 16 spherical harmonics, and is suitable for systems of 16 to 40 or more speakers.
Benefits of HOA for Auditory Display:
Efficiency compared to other holophonic techniques (Wavefield Synthesis), requiring less computation & less speakers
Greatly expanded ‘sweet area’ and increased power output compared to simpler techniques (VBAP, 5.1), better for groups or mobile listeners.
The WorldViz solution adds a number of enhancements to HOA specifically for immersive spatialization, detailed below.
Distance cues: Ambisonics renders source direction very well, but requires additional ‘cues’ for distance, including:
Amplitude falls as distance increases (air attenuation)
Low-pass filtering increases as distance increases (air absorption)
Wavefronts delayed by distance (speed of sound), including Doppler shift for mobile sources
Reverberation: natural environments provoke complex sonic reflections giving us information about the space we are in. Sufficiently realistic ray-casting techniques are currently too complex for a real-time dynamic rendering system, but algorithmic reverberation is sufficient for a convincing sense of space.
Radiation pattern: objects emit different sounds depending on the direction they are facing (the sound of a person talking is different when seen from behind). A standard approach in simulation is to filter the source sound according to viewer perspective.
Mobile objects & world-navigator: Real-time systems can simulate mobile navigators and objects by continuously updating the geometry calculations. Quaternions are used to provide full six-degrees of freedom movement efficiently and avoid geometry error (e.g. Gimbal lock).
The vizard ambisonic module (vizsonic.py) creates a wrapper around the <node3d>.playsound function and allows for two new parameters, volume and directionality to be specified. Note that because the wrapper only replaces the <node3d>.playsound function any sounds played through the ambisonic system must be attached to a node3d object. This also means that the majority of functions related to using ambisonics are the same as the those for node3d objects.
Below is a demo module showing the new playsound function being used
to attach a sound to a node circling the user.
When programming for an ambisonics system there are a few things to keep in mind. First all sound files should be loaded at the beginning of the module. Next there are only 24 sources we can use. Therefore creating multiple copies of the same sound file should be avoided if possible. For example the code below is bad since an object is created every time the space key is pressed:
WorldViz supplies a mac mini which is used as a controller and processor for the sound files being played by the vizard script. In order to allow the mac mini to play the sound files in the vizard script the mac mini must be network accessible and mapped to a drive letter (Z by default). When a script is started for the first time the ambisonics code will then sync the files in the user's local "sound" folder with the files on the mac mini, only copying files if they are new or newer than existing files on the mac mini.
Here is another sample script showing an object with two attached sounds playing them dependent on interaction with the scene. The court contains a ball that plays a bounce sound when it hits the floor and a crash sound when it hits the ceiling.
Vizsonic allows the user to specify the reverberation settings for the current simulation using the <vizsonc>.setReverb function. While these settings can be changed during the simulation, they may result in audible clicks. Below is an explanation for some of the sound settings in the simulation.
Roomsize - diameter of the current simulated space, in meters.
Shininess - the degree to which high frequencies are retained by the space, as a number between zero and one. Higher values suggest shiny walls and emptier spaces, lower values suggest wooden or fabric walls, and more densely occupied spaces.
Attenuation - the degree to which sound is absorbed by the space over time, as a number between zero and one. Higher values produce shorter reverberation, and suggest 'dead' spaces, lower values produce longer reverberation and suggest 'live' spaces. Lower attenuation correlates well with larger roomsizes.
Simplicity - the complexity of echoes in the space, as a number between zero and one. Lower numbers lead to complex and diffuse reverberation, better suited to spaces of complex geometry, while higher numbers result in discrete and audible echoes, suited to very simple spaces.
Volume the amount of reverb in the total audio mix (0 = no reverb, 1 = loudest reverb)
The vizsonic module also allows the user to set the ambient soundfile track. The ambient soundfile loops continuously and has no specific spatial location. This can be changed during the simulation. Sound files may be .wav or .aiff format, but should be stereo. Filenames should be within the folder specified by the setpath command.
The worldviz sound installation may come with a floor-shaker for very low frequency effects. The vizsonic module allows the user to set the mix-volume of the floor-shakers. The shakers will be sent the same audio feed as the subwoofer, however as a special effect they may be enabled periodically with the shaker message. Therefore, simply setting the shaker volume to 1 will not cause any low frequency effect unless at the same time there is a sound-file playing with low frequency content. It may be prudent to include some low-frequency sound-files in the search path to be used for this purpose, if extensive use of the shakers is desired.
There are several options which can be set from Vizard in order to control the way that the mac mini handles loading sound files and configuration of the speakers. In general they should not need to be adjusted. Below is an example with the values supplied the same as the default settings for the module.
Additionally you can set server path for locating sound files using <vizsonic>.setPath([path]) and set the speaker configuration file using <vizsonic>.setSpeakers([filename]), although these options should generally not be used.