There are two methods of using sound in Ygdrasil. Ygdrasil comes with a built-in sound system, called Bergen, which can do basic sample playback and localization. For more advanced sound features, you can connect Ygdrasil to other sound applications like Max/MSP, SuperCollider, or Pure Data, using Open Sound Control. This provides a full range of sound programming capability - localization, spatialization, generative synthesis, algorithmic composition, etc - which can be tightly integrated with Ygdrasil.

All of these methods, including the default sound capabilities, use some program outside of Ygdrasil itself to actually handle sound. This program is often called the Sound Server. It communicates with Ygdrasil over the network, so it can be run on a completely different computer. This approach makes it possible to easily divide the heavy computation for sound and graphics processing between two machines, and also provides a great deal of flexibility when choosing different sound server applications.

All of this goes on behind the scenes - sounds in the Ygdrasil scene are created as nodes just like any other node, but they work by communicating with the sound server program.

About Sound Localization and Spatialization

The recent history of immersive technologies (meaning, computer-based, post-WWII) has been heavily focused on visual display - stereoscopy, head or eye tracking, 3D graphics generation, lighting and texturing algorithms - with less emphasis on auditory immersion. Many theorists have pointed out that auditory simulation and immersion remain under-explored and under-utilized. The crucial role of sound in pre-digital time-based media is well accepted, yet the use of sound in virtual environments is still often handled with far less sophistication than the visual display.

Sound localization and spatialization are techniques for using sound to simulate space in the same way that stereoscopy simulates space visually. While the principles of stereoscopy are fairly clear-cut, the complex nature of auditory cognition leads to a number of different approaches with different strengths for different situations. Localization generally refers to the simulation of the sound's position in space (or rather, the point that the sound emanates from). Spatialization can be thought of as simulating the wider range of effects that a space might have on a sound; it might include reverb, frequency attenuations, resonances, echoes, in addition to the simulation of location. Most approaches to both problems make a variety of assumptions and simplifications in order to achieve real-time performance, rather than a literal physical model.

Localization is an effect that can be produced using a number of different techniques, generally depending on whether the listener is wearing headphones or listening to speakers. Localization depends on a number of auditory cues, just as optical depth perception does.

Meaning, as you get closer to things, the sound gets louder.
The most basic is amplitude panning; even in a monuaral configuration, varying signal amplitude according to proximity in the virtual space already creates a strong sensation of localization. Stereo provides the ability to localize sounds along one axis, while a 4-speaker (quadrophonic) array can be used to localize sounds in a full 360 degrees. Additional location cues, such as time delay and frequency attenuation can improve the illusion at the cost of additional processing time.
(c) Ben Chang