Scientific Computing and Visualization Group
Boston University
Supported sound file format:
Sounds loaded into the DAFFIE soundserver are assumed to be .AIFF, 16-bits, sampled at 32000 Hz, mono or stereo.
Annotated config file examples:
Each sound file which is loaded into the DAFFIE soundserver has at least one corresponding “config file”. Here is an example:
sound_name type-mum sound_file_name ../sounds/testing/type-mum.aiff nominal_loudness_left 0.3 nominal_loudness_right 0.3 standard_sound_distance_left 10.0 standard_sound_distance_right 10.0
The ‘sound_name’ is used by the soundserver primarily for printing error messages about sounds.
The ‘sound_file_name’ is the name of the audio file containing the sound itself. Note that this pathname is relative to the directory from which the soundserver was started.
‘Nominal_loudness_left’ and ‘Nominal_loudness_right’ control overall loudness. For most sounds, the nominal loudness should be less than 1.0 (otherwise, clipping may occur). If the sound file is monaural, ‘nominal_loudness_right’ has no effect.
The “standard sound distance” is the distance from a sound source at which the loudness of the sound is attenuated to 25% of the maximum. Increasing this value has the effect of increasing the distance over which a sound can be heard.
Here is another example:
sound_name a880 sound_file_name ../sounds/testing/a440.aiff nominal_loudness_left 0.3 pitch_factor 2.0 loop_n_times 20 loop_start 0 loop_end 31999
‘Pitch_factor’ controls how rapidly a soundfile is played. In this example ‘a440.aiff’ is played twice as fast as originally recorded.
The DAFFIE soundserver supports looped playback. In a looping sound, the samples are played from the beginning of the file until the ‘loop_end’ sample, then playback resumes with the ‘loop_start’ sample. This is repeated ‘loop_n_times’ times, then the file plays through to the end. If ‘loop_n_times’ is negative, the sound loops endlessly.
Config file reference:
Keyword | Description | Default |
---|---|---|
sound_name name | Name of sound, used for error messages, etc. | no_name |
sound_file_name name | Sample file (.AIFF format, 32000 Hz, 16-bit samples). | – |
nominal_loudness_left loudness | Loudness of left channel (generally 0.0 – 1.0). | 0.24 |
nominal_loudness_right loudness | Loudness of right channel (generally 0.0 – 1.0). | 0.24 |
standard_sound_distance_left distance | Distance from listener at which sound volume of the left channel is attenuated to 25% of the maximum. | 8.0 |
standard_sound_distance_right distance | Distance from listener at which sound volume of the right channel is attenuated to 25% of the maximum. | 8.0 |
pitch_factor value | Speed of playback of sample. | 1.0 |
loop_n_times n | Number of times to loop the sample. | 1 |
loop_start n | First sample in loop. | – |
loop_end n | Last sample in loop. | – |
wxyz_delta_limit limit | Maximum amplitude difference between successive sound “chunks.” | 0.01 |
fade_time time | Number of seconds to fade sample when it is stopped. | 0.65 |
Soundserver command-line arguments:
To start the soundserver, cd to the Sound/run directory, then invoke the appropriate script as described below:
Startup script | Description |
---|---|
start_sound_server | Start sound server with no support for Internet telephony. |
start_telephony_combo event_server | Start sound server with support for generation and playback of Internet telephony. Supply name of event_server (host:port). |
start_telephony_server event_server local_telephony_generator | Start sound server with support for playback of Internet telephony. Supply name of event_server (host:port) and name of telephony generator host. |
start_telephony_generator event_server | Start sound server with support for generating Internet telephony. Supply name of event_server (host:port). |
Running the soundserver on an SGI Indy:
The SGI Indy supports four-channel audio playback. To take advantage of this capability it is necessary to use a four-channel speaker system; front speakers (in front of the listener) are connected to the line outputs, and rear speakers (behind the listener) are connected to the headphone outputs. If you are using an SGI Indy but have only a two-channel speaker system, you will need to configure the soundserver to combine the front and rear outputs. (Otherwise, sounds will “disappear” when they go behind the listener.) The environment variable “FORCE_TWO_CHANNEL” is used for this purpose:
gijoe% setenv FORCE_TWO_CHANNEL gijoe% start_sound_server
For convenience, you can add this ‘setenv’ command to your soundserver startup scripts:
#! /bin/csh -f -b setenv SOUND_SERVER_TYPE SOUND_SERVER setenv FORCE_TWO_CHANNEL set bindir = ../bin [...]