Page  479 ï~~A Dynamic Spatial Sound Movement Toolkit Fernando Lopez Lezcano (nando@ccrma.stanford.edu) CCRMA (Center for Computer Research in Music and Acoustics), Stanford University ABSTRACT This paper describes a four channel dynamic sound location toolbox. The hardware interface is a four channel high quality digital to analog converter box connected to a NeXT workstation through the DSP port. A C/DSP assembler program implements basic quadraphonic soundfile playback from hard disk and a unit generator for the CLM language enables the composer to specify the movement of a sound source in a virtual room. 1. The target synthesis language The purpose of this still ongoing project is to add dynamic sound location tools to an existing non-realtime sound synthesis and processing language. The chosen language is CLM (Common Lisp Music, written using Common Lisp by Bill Schottstaedt at CCRMA, Stanford University) [131. 2. The implementation The toolbox is modular in the sense that the interface the composer or instrument designer interacts with is always the same, regardless of the method used to implement the simulation of the virtual sound space. There are many ways to achieve this simulation depending on the sound reproduction method used (binaural headphone listening, two channel loudspeaker reproduction and multi-channel systems). The initial environment implemented uses four channel sound reproduction as it had the most promise for virtual space simulation in a concert situation. 2.1 Four channel soundflle playback FIGURE 1.Hardware for soundfile playback boards for the Crystal Semiconductor high quality stereo D/A converter (11] and some glue logic to interface to the NeXT DSP port. The basic playback software support is a command line C / DSP56K program that sends the samples to the DSP on the NeXT using high speed DMA. 2.2 Simulation of localization cues The radial component of the movement is simulated by two mechanisms. The first takes into account the delay effects of distance due to the finite speed of sound and the second the attenuation and filtering effects of air transmission. Distance is modeled using an interpolated delay line [1,6]. The fractional delay for a given distance is given by: FractionalDlay =Dist x SamplingRate SpeedOfSound When the distance changes, the input samples are sample rate converted by the moving tap on the delay line and thus the Doppler frequency shift is simulated as a side effect. The second mechanism models the attenuation and filtering properties of sound transmission [1,4,5]. The attenuation is modeled with an amplitude envelope. In a strict simulation our amplitude would change as 1/r, where r is the distance between source and listener [1, 4]. In the program the exponent of r is a variable as it has been found that, especially for unfamiliar sounds, a value of 1.5 or even higher gives a much improved perceptual result [3]. The angular component of the movement is simulated by intensity panning between adjacent loudspeakers. To minimize the precedence effect [ 1,4] (perceived as a "hole" between the speakers) we have used a non-linear user selectable intensity cross fade function. 68040 C 56K Asm Disk NeXT board 00 DI/AI Front Left SFront Right Back Right ~Back tft The four channel D/A box was built as a joint project with Atau Tanaka [10]. The prototype uses a pair of demo ICMC Proceedings 1994 479 Acoustics

Page  480 ï~~2.3 Moving the sound source inside a room Another cue used for the perception of distance in a reverberant environment is the ratio of reverberant to direct sound that reaches the listener [4]. Our program uses two mechanisms to model the reverberant space. The first is a simple reverberator (an array of comb and all pass filters [1,7,8]). The input samples to this reverberator are scaled by an envelope that attenuates more slowly with distance than the one controlling the direct sound. The second mechanism is an image model that constructs moving virtual sound sources assuming specular reflections on the walls of the virtual room. This mechanism is effective in determining the apparent size of the room during the first portion of the attack of the sound. We have chosen so far not to implement interaural time differences in the simulation as their effect is very dependent on the listener position with respect-to the loudspeakers. 3. The path in space The path the sound source follows can be defined by the composer in terms of triads representing the x, y and time coordinates (or the equivalent polar coordinates) of the most important points in the trajectory. The program interpolates a smooth curve by fitting a Bezier curve segment between each pair of points. This curve fitting is necessary to prevent step changes in the velocity vector (which can be translated into step changes in the Doppler frequency shift, effectively destroying the illusion of movement). The composer can choose not to specify any time coordinates in the path. In that case, the program moves the source along the Bezier curve with constant velocity. If there are time coordinates, it moves the sound source using a constant acceleration profile between the specified points. A path can be created from a cartesian or polar coordinates and can be manipulated through transformation operations (rotation, translation, scaling, etc.). 4. The unit generator All this models are included in the dlocsig unit generator which was completely written in Common Lisp and integrated into the CLM environment. The function make-dlocsig creates the unit generator, which is initialized with the path the object will follow in space, the starting time of the sound and its duration. The function returns three values, a data structure and the real starting and ending samples of the sound (after distance delays are taken into account). The data structure is used inside the Run loopl as the first parameter to the dlocsig mac ro call. The macro call does the actual location of the samples and writes the result to the four channel output stream. The composer can also control the amount of overall reverberation, the size of the room, the reflection coefficients of the four walls and the maximum delay time that will be handled by the virtual image model (in other words, how many virtual sources will be created). 5. Conclusions The unit generator and the path objects have been successfully used to add multiple and simultaneous spatial movements to "Three Dreams", a composition by the author of this paper that uses many different CLM instruments and sound processing techniques. Future work will include different spatialization models to expand the listening environments to headphones and two or three channel loudspeaker reproduction. References: [1] F. R. Moore, Elements of Computer Music [2] J. Chowning and C. Sheeline, Auditory Distance Perception under Natural Sounding Conditions, CCRMA, Stanford University [3] C. Sheeline, An investigation of the effects of direct and reverberant signal interactions of auditory distance perception, CCRMA. [4] J. Chowning, The Simulation of Moving Sound Sources, JAES 1971. [5] M. Bossi, A Real-Thme System for Spatial Distribution of Sound, CCRMA [6] M. McNabb, Dreamsong: the Composition, CMJ V5N4. [7] F. R. Moore, A General Model for Spatial Processing of Sounds, CMJ V7N3. [8] J. A. Moorer, About this Reverberation Business, CMJ V3N2. [9] R. Rasala, Explicit Cubic Spline Interpolation Formulas, Graphic Gems. [10] A. Tanaka, Implementing Quadraphonic Audio on the NeXT ICMC91 Proceedings. [11] CS4328 Evaluation Board, Crystal Semiconductor Corp. [12] J. Chomyszyn, Loudness as a cue in distance perception, ICMC91 Proceedings. [13] W. Schottstaedt, CLM (Common Lisp Music), available through anonymous FTP from "ccrma-ftp.stanford.edu". 1. the "run loop" is the section of a CLM instrument definition that calculates each sample (one sample for each iteration of the loop) Acoustics 480 ICMC Proceedings 1994