Page  43 ï~~Visualization and Manipulation of 3D Digital Waveguide Structures for Sound Experimentation David Rossiter, Department of Information Engineering Chinese University of Hong Kong Shatin, Hong Kong rossiter~ie. cuhk. edu. hk Andrew Horner, & George Baciu Department of Computer Science Hong Kong University of Science and Technology Clear Water Bay, Hong Kong horner~cs.ust. hk, gbaciuQcs.ust. hk Abstract 1D and 2D digital waveguides are already established as important elements in physical modeling constructions. This paper describes a program which has been developed for sound experimentation using three dimensional digital waveguide structures. Arbitrary waveguide structures may be created and displayed in three dimensions. They may be rotated and viewed in a number of visualization modalities. Acoustic impulses may be applied to any element within the waveguide structure through the use of a 'virtual' hammer. A virtual' microphone may then be positioned to determine the acoustic response at any other point within the waveguide structure. Impulse sequences may be read and written to sound files at a sampling rate of 44100Hz. 1 Introduction A digital waveguide is a method that has been developed for simulating the propagation and transformation of waves across a medium (such as air, or strings). One dimensional waveguides have been employed for the simulation of vibrating structures such as strings and pipes. Two dimensional waveguides have also been developed for application to a number of musical objects including drums and plates. The application of a three dimensional waveguide structure has been proposed and investigated, but to date this has been applied only to the analysis of room acoustics (e.g., Garton 1990; Savioja et al., 1994; Savioja et al., 1995). Emerging multimedia computational environments are now able to support the development of further possibilities based upon digital waveguides structures in a 3D environment. This paper describes a program which has been developed for sound experimentation and visualization using three dimensional digital waveguide structures. 2 The waveguide principle The propagation of waves may be implemented by using structures of arrays. For example, to simulate the propagation of waves across a string, two arrays are required. The first array records the state of left-moving waves; the second records the state of right-moving waves. In order to determine displacement at any point along the string as a consequence of wave traversal, the values from the two arrays at the corresponding loci are simply added together. The combination of these two arrays in this configuration is termed a bidirectional delay line, and it is the essence of the digital waveguide structure (this is detailed in Smith, 1992). This principle may be extended to a twodimensional structure, so that wave traversal along the y axis is additionally recorded (Van Duyne & Smith, 1993). The displacement at any point on the surface is then determined by the addition of the corresponding values from two bidirectional delay lines (one representing movement in the x direction; one representing movement in the y direction). For a three-dimensional structure, the model is extended so that a 3D matrix is used. Displacement at any point is then determined by the addition of the corresponding values from three of the bidirectional delay lines of which the 3D digital waveguide structure is comprised. 3 Implementation In the modeling approach we have adopted, (derived from Savioja et al., 1994; Savioja et al., 1995) waveguide elements at object boundaries ICMC Proceedings 1996 43 Rossiter et al.

Page  44 ï~~may perform as either phase reversing or phase preserving. Anechoic performance is also possible, where there is no sound wave reflection. Waveguide elements are set at a distance apart of approximately 1.348cm, which corresponds to a sampling frequency of 44100Hz (the Compact Disk sampling rate) when the speed of sound is considered to be 343m/s. 4 System elements A 3D waveguide model may be structured and manipulated in virtual space, with sounds of arbitrary nature and complexity applied to any point Figure 1: A tubular 3D waveguide structure, with within the structure. In addition to the 3D digital impulse 'hammer' shown on left waveguide structure a virtual hammer and a virtual microphone have been implemented in order to facilitate interaction with the waveguide structure. " The 'virtual' hammer may be positioned in 3D space and used to strike the digital waveguide structure. At the point of impact, a displacement sequence is applied to the waveguide. " The 'virtual' microphone is employed to record the pattern of displacement of any element or plane of elements within the 3D structure. Because the particular distance of spacing between elements corresponds to the standard highquality sound sampling frequency of 44100Hz,.................samples present within any soundfile of this sam-.. pling frequency may be directly applied to an element, and the displacement values recorded by the virtual microphone may be stored without further processing in a soundfile of the same sampling format for subsequent playback. The user can therefore apply any required impulse pattern stored within a soundfile to the waveguide structure, or may use arbitrary soundfiles for sound or music experimentation. 5 Two examples Figure 2: An example 3D waveguide structure, An example waveguide structure developed for with impulse 'hammer' shown at top the analysis of resonant properties in open and closed pipes is illustrated in figure 1, together with a hammer used to apply square wave impulses (shown on the left side of the figure). An example devised for sound experimentation is shown in figure 2. In this structure two square membrane surfaces are connected by two irregular waveguide paths. Rossiter et al. 44 ICMC Proceedings 1996

Page  45 ï~~6 Sound morphology Because of the control provided to the user, there is much potential for exploring sound morphology. An arbitrary soundfile can be applied at any position on a 3D digital waveguide structure of arbitrary design, with virtual microphones positioned on or within the structure. A structure may embody phase reversing, phase preserving, or anechoic elements. Structures may be created for musical acoustic purposes which would be yextremely hard or impossible to create and manage in the real world, thereby highlighting the role of 3D waveguides in the context of physical modeling as a technique for expanding rather than purely duplicating the field of sound generators and musical instruments. 7 Visualization An example of excitation and propagation in a 3D waveguide structure is shown in figure 3. A horseshoe shaped object has been created. One corner of the object is struck with the hammer, and a sequence of excitation is injected into the structure. The displacement sequence then propagates through the object, with the object structure enforcing various properties of resonance and transformation upon the initial excitation sequence according to its physical properties. A complex form of sound transformation may then take place, including wave reflection, inversion, and diffraction. In order to help visualize the flow of data, elements are displayed using a grayscale scheme in which the data amplitude is inversely mappedto the level of gray. The 3D position of the element is also displaced in the Z plane according to the amplitude of the energy of the element. Figure 3(a) shows an initial state of impulse propagation shortly after the object is struck is visible. Figures 3(b) and 3(c) illustrate subsequent wave propagation and transformation. Alternative options for visualizing wave propagation are also provided including the ability to interactively examine and cycle through each 'layer' of the waveguide structure in isolation from the rest of the structure, and the ability to view the object as a wireframe representation. ~8 Development There are many potential directions in which the Figure 3: Wave propagation. Impulse 'hammer' model may be developed. An major enhancement shown behind and to the left of the structure. would be the use of fractional delay waveguide modeling (Laakso et al., 1996) so that frequencies which are not associated with integer multi pies of the distance between waveguide elements ICMC Proceedings 1996 45 Rossiter et al.

Page  46 ï~~may be embodied in the system. Energy loss effects on wave propagation have not currently been incorporated into the model, although this may be achieved by a number of algorithmic extensions such as multiplying the velocity of displacement by a constant (Smith, 1993). The model will also need to be developed to embody nonacoustical properties, such as colour, visual texture, and properties of light reflection. Real-time issues have also not been addressed to date. Currently, the time taken to generate audio data is beyond the bounds of real-time performance for a 3D digital waveguide structure of any appreciable size. Given the apparently perpetual exponential increase in the power of computing resources, it seems fair to conjecture that projects for which a wait of the order of a few minutes or hours is currently required will be real-time tasks in the very near future. 9 The VR connection A few years ago, sound research was generally carried out on high-end workstation or mainframe systems. Affordable stand-alone systems which are available today such as the ubiquitous PC did not possess sound facilities as standard, and took considerable amounts of time to calculate even basic sound operations. Today the situation has changed. Sound input and output facilities are standard, and microprocessor speed has advanced such that real-time sound generation and control is commonplace. This is analogous to the developing field of Virtual Reality with application to sound manipulation and design. Currently, tools for immersive environment interaction such as head-mounted glasses and 3D mouse systems are not part of the usual standard configuration, but all indications are that they will very shortly enter mainstream use. This will cause a shift in the manner in which much computer sound and music research is carried out. Several computer music researchers are already exploring physical modeling in the context of integrated visual/sound environments (i.e. Cadoz et al., 1994; Cook, 1995). It is considered that 3D digital waveguide structures will be a fundamental unit in a virtual environment of the near future in which anyone equipped with standard emmersive equipment will be able to construct, analyse, and interact in real-time with complex physical models in both visual and acoustic domains. 10 Conclusions A program with application as a tool for sound manipulation and visualization has been outlined. The software presents an understandable and manipulatable visual representation of acoustic behaviour in a 3D digital waveguide of arbitrary construction. However, the real potential of the system arguably lies as a basic unit within an integrated virtual environment of the future in which the user can perform the real-time creation of and interaction with physical synthesis models. 11 Acknowledgements The first author would like to acknowledge the influence of discussions with Mark Pearson, of the University of York, England, concerning physical modeling. Thanks must also go to Vesa Valimaki and Lauri Savioja of the Helsinki University of Technology for helpful comments. References Cadoz et al., 1994 CADOZ, C., LUCIANI, A., FLORENS, J.L. (1994) Physical models for music and animated image: the use of CORDISANIMA in 'ESQUISSES', a musical film by ACROE. Proceedings of the International Computer Music Conference, pp. 11-18 Cook, 1995 COOK, P. (1995) Integration of physical modeling for synthesis and animation. Proceedings of the International Computer Music Conference, pp. 525-528 Garton, 1990 GARTON, B. (1990) Two new approaches to the simulation of acoustic spaces. Proceedings of the International Computer Music Conference, pp. 115-117 Laakso et al., 1996 LAAKSO, T.I., VALIMAKI, V., KARJALAINEN, M. & LAINE, U.K. (1996) Splitting the Unit Delay - Tools for Fractional Delay Filter Design, IEEE Signal Processing Magazine, vol. 13, no. 1, January. Smith, 1992 SMITH, J.O. (1992) Physical modeling using digital waveguides. Computer Music Journal, vol. 16, no. 4, pp. 74-91 Smith, 1993 SMITH, J.O. (1993) Efficient synthesis of stringed musical instruments. Proceedings of the International Computer Music Conference, pp. 64-71 Savioja et al., 1994 SAVIOJA, L., RINNE, T.J., & TAKALA, T. (1994) Simulation of room acoustics with a 3D finite difference mesh. Proceedings of the International Computer Music Conference, pp. 463-466 Savioja et at., 1995 SAVIOJA, L., BACKMAN, J., JARVINEN, A., & TAKALA, T. (1995) Waveguide mesh method for low-frequency simulation of room acoustics. Proceedings of the International Congress on Acoustics, vol. 2, pp. 637-641 Van Duyne & Smith, 1993 VAN DUYNE, S.A., & SMITH, J.O. (1993) Physical modeling with the 2-D digital waveguide mesh. Proceedings of the International Computer Music Conference, pp. 40-47 Rossiter et al. 46 ICMC Proceedings 1996