sound_specification - ryzom/ryzomcore GitHub Wiki
title: NeL Sound Specification (2001) description: Original specification for the NeL sound library — driver architecture, high-level API, environment sounds, effects, and parameter reference published: true date: 2026-03-15T00:00:00.000Z tags: editor: markdown dateCreated: 2026-03-15T00:00:00.000Z
Translated from "fr 2001 sound sound_specification" — the original specification for the NeL sound library, written by Vianney Lecroart and Olivier Cado at Nevrax. Last updated 23 July 2001. {.is-info}
Investigate how OpenAL and DirectSound3D work in order to find a common architecture. The DirectSound interface distinguishes between 2D (stereo) and 3D buffers. The OpenAL interface does not make a special case for stereo (2D) sound, but when a buffer contains stereo data, it is played in stereo without positioning (furthermore, OpenAL is implemented using DirectSound under Windows, at least in the Loki implementation, cf. UpdateSource() in Alc/alc.c).
Design the classes and interfaces for the dynamic and static library. The interface and architecture should resemble the 3D library as closely as possible.
IListener, IBuffer, ISource, ISoundDriver (+ ILoader for loading and streaming, but this class will not necessarily be implemented in the driver but rather in the high-level library).
IListener and ISource also allow adding EAX environmental effects.
Game developers will not have direct access to these classes — they will use the high-level library instead.
Implement a dynamic library for OpenAL (or DirectSound, to be determined):
CListenerAL (singleton), CBufferAL, CSourceAL, CSoundDriverAL
The C* classes inherit from the I* interfaces.
A NeL sound file contains the name of the sound data file (.wav, .mp3, etc.) as well as its static parameters (Inner/Outer Volume and Cone, Min/Max Distance, etc.).
Progress: Stereo sounds: no panning; 3D sounds: OK; EnvSounds: OK; EnvEffects: OK with simple zones (rectangular parallelepipeds)
Creation of a 2D sound, retrieval of a sound, dynamic modification of PAN, VOLUME, PLAY, STOP.
Creation of a 3D sound, retrieval of a sound, dynamic modification of position, velocity, PLAY, STOP.
There are sounds that are both 2D and 3D: when the Listener is outside (Ext) a large circle (cylinder), they hear the sound as a 3D sound (mixed with any ambient sound present where they are). When they are located in a zone between this large circle and a small circle (Mid), this 3D sound is progressively decreased and replaced by a 2D sound. Inside the small circle (Int), they hear only the 2D sound (top-down view below).
This 2D sound is actually made up of 2 stereo channels mixed together, allowing a loop of several different sounds to be played. Transitions between 2 sounds are performed using crossfade mixing of the two. On top of this, punctual sounds can be added (see figure below).
Loading a scene. The only interaction with the user is updating the Listener's position.
Locating the player (listener):
The AudioMixer knows the geography of the zone and automatically chooses the effects and environment sounds.
Hierarchy of envsounds:
Tree of zones from the most encompassing to the smallest. Progressive transition from one to another.
Configuration:
By character strings.
Selection of effects concerning sources (occlusion, etc. [5]):
(Not in the demo.)
Based on position in space, an environmental effect is automatically selected.
An editor will be created, probably integrated into 3ds Max, which will be used to build the zones indicating environment parameters (e.g. reverberations of a room) and the zones described in the Environment Sound section.
Editor for source parameters (nel/tools/sound/source_sounds_builder).
Other tools will also be needed to try and test sound environments.
Numbers in square brackets refer to the appendix.
(NeL Sound, Sound designer, Level design)
Progress: (a) (b) (c); (d) only with cubes
File types:
- (a) Source sounds (mono + static source parameters [1]). Example: rabbit nibbling
- (b) General sounds (stereo). Example: click, ambient music if any.
- (c) Environment sounds (stereo + placement + mono + static source parameters). Example: bar heard from outside, thunderstorm
- (d) Environmental reverb effects (effect parameters [4] + placement). Example: padded room, hall, forest
File formats:
-
(a) (b) (c) Text file (e.g.
.nssand.nesfor "NeL Source Sound" / Environment) containing the sound description: sound filename (mp3) + static parameters (cone, etc. [1]) - Sound file (typically:
.mp3) -
(d) Environmental effects: text file
.ned(for "NeL Effect/Environment Description") for parameters [4]
3ds Max plugin to link placements to the landscape / to building meshes.
(NeL Sound + Gamedev-Client)
Progress: Balancing (N sources -> T tracks; N unlimited, T=32) OK, sound identification by ID, environment configuration by character strings (finite number of cases)
-
- Must play. Example: ?
-
- Play if possible. Example: ?
-
- Not a problem if not played. Example: rabbit nibbling
Automatic calculation.
- How do we associate sounds
rabbit_nibbling.nsd,rabbit_running.nsdto a rabbit object (agent?).TSoundId - How are sounds triggered? Example: when the rabbit starts running, the rabbit source (possibly already registered with the AudioMixer) must be associated with the buffer corresponding to the running sound.
setSound(TSoundId) - Triggering of random sounds (birdsong...): in EnvSounds
- Examples: time of day (different environment sound during day and night); the number of people in a bar can influence its environment sound; rain adds a rain sound and changes the environmental effect at that location, etc.
In principle, all objects known to the client that can emit sounds are registered as sources with the AudioMixer.
(Probably not, in any case not in the demo.)
Progress: static loading at init, unloading at exit
- Static (in the demo; streaming: later)
- When? Unloading?
- 3ds Max plugin for environments (sounds + effects)
- Dynamic buffer loading (after the demo) (e.g. streaming (possible in the
ISourceimplementation which will useILoader)) - Occlusion (using EAX)
- More environmental effect parameters?
- For EnvSounds, stereo sounds do not rotate. If they were AC3 5.1 sounds, could they rotate (in the opposite direction to the listener)?
- Panning of stereo sounds does not seem to be implemented by OpenAL.
Progress: Implemented: [1] [2] [3] all; [4] major EAX parameters and non-EAX parameters; [5] none
- Gain (raw volume)
- Min & Max Distances
- Cone Inner & Outer Angles, Outer Gain (volume attenuation)
- Position
- Velocity
- Direction
- Gain (volume)
- SourceRelativeMode (specifies the coordinate frame for positions, global or relative to listener) (dynamic or static?)
- Position
- Velocity
- Orientation
- Gain (main volume)
Major:
- Environment (e.g. padded room, hall, forest)
- Env Size
Minor (modified by an environment change):
- Env Diffusion
- Room & Room HF (volume of reflected sounds (at 2 levels) & for high frequencies)
- Decay Time & Decay HF Ratio
- Reflections & Reflections Delay (primary reflections)
- Reverb & Reverb Delay (secondary reflections)
- Room rolloff factor
- Air absorption HF (reflects the atmosphere of the location)
- Flags
Other global parameters (non-EAX):
- Doppler factor (to exaggerate the Doppler effect)
- Rolloff factor (attenuation as a function of distance)
- Direct & Direct HF
- Room & Room HF
- Obstruction & Obstruction LF Ratio (obstacles)
- Occlusion & Occlusion LF Ratio & Occlusion Room Ratio (walls) and material choice
- Room rolloff factor
- Air absorption factor
- Outside volume HF
- Flags
- Vianney Lecroart
- Olivier Cado