Extensions:Uni-Verse/Uni-Verse Sound Renderer

提供: wiki
移動先: 案内検索


The purpose of this document is to provide user's guide for Uni-Verse Sound Renderer, which is a computer software for reproduction of 3D sound. The Uni-Verse Sound Renderer can be used with other Uni-Verse tools for producing interactive spatial audio environments from dynamic 3D geometries.

The Uni-Verse Sound Renderer is closely related to the Uni-Verse Acoustic Simulation software (UVAS). UVAS does the modelling of sound propagation in the given geometry. The instructions how to render the audio environment is sent through Uni-Verse Sound Rendering Protocol (UVSRP) to the Uni-Verse Sound Renderer. The renderer is the back end for a chain of acoustic simulation modules and reproduces the sound for the listener using loudspeakers or headphones.



Supported operating systems

Uni-Verse Sound Renderer currently works only in Linux (or similar OS).

Software requirements

Pure Data

Uni-Verse Sound Renderer is built on a real-time graphical programming environment called Pure Data, shortly PD. Before the Uni-Verse Sound Renderer can be used, PD has to be downloaded and installed. This is normally an easy task. Pd can be downloaded from here.


Although the Uni-Verse Sound Renderer can be installed without audio simulation software, it is more or less useless without one. The renderer is designed to be used with Uni-Verse Audio Simulation (UVAS), which connects to the renderer through Uni-Verse Sound Rendering Protocol (UVSRP). UVSRP is integrated into the renderer, but UVAS has to be installed separately. More information about UVAS can hopefully be found soon elsewere in this wiki.


Verse library is needed if precompiled binaries are not used and only when compiling versepd patch which allow audio streaming through verse. Information about Verse can be found from here

Hardware requirements

The renderer runs on an ordinary PC. Sound reproduction hardware such as heaphones or loudspeaker setup are highly recomended. With headphone reproduction a normal stereo soundcard is sufficient. For loudspeaker systems multichannel soundcard is required.

Obtaining the Software

A current version of the source code and binaries for the Uni-Verse Sound Renderer can be found here

Installing the Uni-Verse Sound Renderer

The Uni-Verse Sound Renderer can be run from the existing binaries. First extract the package containing the Uni-Verse Sound Renderer to desired location. Next, set the path variables in PD so that they point to the directories: uvsr_renderer/lib, uvsr_renderer/needed_externals and uvsr_renderer/needed_externals/vbap. Clicking "Save all settings" button is also a good idea. Now the Uni-Verse Sound Renderer should be ready for use.

Figure 1. Saving path variables in PD (example)

If needed, the source code can be compiled by running the scripts or makefiles included in subfolders. Four PD externals that need to be compiled are in directories: simple_multiply, uv_hrtf_20sources, uvsrppd and versepd_stream. More detailed information can be found from READMEs in each directory.

Using the Uni-Verse Sound Renderer

The Uni-Verse Sound Renderer can be run with two different setups: one for loudspeaker reproduction and other for headphone reproduction. The file holding the headphone setup is "called renderer_hrtf.pd". Currently setups using 8 or 24 loudspekers are predefined, they are included in files called "renderer_vbap_8speakers_100_chan.pd" and "renderer_vbap_24speakers_40_chan.pd".

As described earlier, the Uni-Verse Sound Renderer is made with PD. The renderer can be run by opening it in PD. This can be done mainly in two ways: opening the desired file from PD's graphical user interface or typing for example "pd renderer_hrtf.pd" in /uvsr_renderer/ directory.

Instructions for quick start

After the PD window containing the Uni-Verse Sound Renderer is opened on the computer screen, the use of the renderer should be extremely easy:

1. Turn on the DSP processing. By clicking green toggle box named DSP_on/off or by clicking "compute audio" from PD main window.

2. Run UVAS so that it connects to the Uni-Verse Sound Renderer. Now the Renderer will receive any command that UVAS is sending and the audio simulation is auralized through your sound reproduction system. The Renderer will reset itself in the beginning of every new connection from UVAS. If nessesary, the state of the renderer can be also reseted from the green reset button.

3. The level of sound output can be adjusted from the green slider and two white sliders beside it.

Structure of the Renderer

Explaining how PD works is out of the scope of this document. For further use and development of the Uni-Verse Sound Renderer the main PD patches used to create the renderer are explained shortly here.

Figure 1. PD patch for sound rendering with headphones

The uvsrppd patch communicates with an audio simulation client (UVAS). It connects through network (or localhost) using UVSRP-protocol and receives all commands for sound rendering. The uvsrppd patche's function is receiving commands and distributing them to wanted recipient. The commands use PD's messaging system.


This patch is used to store and play all sound sources. Each uvsr_sound_source represent one physical sound source in the simulated environment before any sound effects caused by the medium. Functionalities such as reading the sound from file or from verse stream and commands like play, stop, and gain are processed. The sound stream generated by them is sent to sound source DSP processing and reverberation patches.


This patch is used to store patches that do the actual DSP processing for every direct and phantom source. The headphone and the loudspeaker patches differ a bit from eachother. The Headphone patch called sound_source_DSP_..._hrtf, also includes the HRTF panning that produces the spatial sound for headphones. The channel number in the name tells how many direct/phantom sources DSP processing units the patch includes. for example 100chan means, that there are 100 DSP_for_any_source patches inside. DSP_for_any_source patches make the actual signal processing that adds the effects caused from sound propagation in the medium. DSP_for_any_source patch receives the sound signal from uvsr_sound_source and add effect such as material absorption, air absorption, distance delay and distance attenuation. It also sends distance and material information to reverberation patch.


The reverberation patch produces the artificial late reverberation. There are different versions of the patch, depending on how many channels are used in the sound reproduction. There are also different variations of the reverberation algorithm. In addition to the reverberation algorithm, the reverberation patch includes a simple automatic approximation of the volume and area of local geometry from the path lengths of the early reflections. By using this approximation and materials present in the geometry, the reverberation time for 10 frequency bands is calculated using the Sabine equation. The automatic approximation can be turned off and user can adjust the room size parameter and materials manually. Also only the reverberation time for 10 frequency bands can be set inside the uvsr_reverb-patch. The reverb_sources patch receives the signals to be reverberated and includes an adaptive system that automatically calculates needed delay and the level for each signal that is reverberated.


Vbap .main patch defines loudspeaker configuration, receive signals from sound_source_DSPs and data from send_azi_and_ele_to_VBAP and outputs audio to defined channels. Loudspeaker configuration can be set from the upper right corner of the patch.


Receives and routes the azimuth and elevation information of each source to the corresponding channel so VBAP can panorate the sound correctly.


Is used to generate massages that reset the state of the paches so that new rendering session can be started. It is used every time when new connection from UVAS is started or manually clicking the reset button.

pd save/use_testfiles

This patch can be used to save incoming messages and use them later. The saved files can be used for "offline" sound reproduction or debugging.

pd define_hrtf_setupfile_path

Sends the setupfilepath to HRTF-patch.


Here are listed some common reasons why the Uni-Verse Sound Renderer might not work as it should.

No sound

If no sound is heard, it is recommended to test if PD is capable of producing sound with your computer's soundcard. Simple PD-patch can be used to check this. Connect [noise~]-[*~ 0.1]-[dac~]. Turn the "compute audio" on from the PD's main window. and there should be noise coming out of your headphones/loudspeakers.

If PD main window post similar error to "soundfiler_read:/n/scratch/sounds/2en.aiff: No such file or directory" occurs, the problem might be that the URL-parameter sent from UVAS is wrong or simply that the sound file does not exit.