Page  00000022 tion, in Section 2 we briefly review the waveguide technique and focus thereafter on our GPU-based implementation for rectilinear meshes. Here we provide details as well as sample code of the fragment shader. In the following Section 3 we extend this implementation to the BCC lattice and discuss the anticipated advantages. In Section 4 we present and discuss our results, while Section 5 summarizes the work and states possible directions for future improvements. having 2N neighbors, Equation 1 reduces to the form: Li v+ vJ = Vj-N (3) With further optimization and by discretizing time and space, one obtains the difference equations for the nodes of an N-dimensional rectangular mesh, with n being the time steps: Vj,k = l vj, l(n - 1) N - vJ,k(n - 2) (4) Waveguide Room Acoustics Digital waveguide meshes represent a group of timedomain finite difference models. The 1-dimensional waveguide technique is a numerical solution to the wave equation and was first applied to simulate string-based music instruments (Smith 1992). The digital waveguide mesh is an extension of the 1D technique and constructed by bi-linear delay Slines, that are arranged in a mesh-like structure (VanDuyne and Smith 1993), see also Figure 1. Higher dimensions are built by scattering junctions that are connected to the delay Figure 1: 3D Rectilinear lines and act as spatial Waveguide Node. and temporal sampling points. These scattering junctions are of equal impedance and two main constraints apply: * The sum of the inputs at each junction are equal to the output, and * The pressures in each crossing waveguide are equal at the junction. For a lossless scattering, the acoustic pressure vj can be computed by summing the incoming wave components v+ (VanDuyne and Smith 1993): Here k represents the current node and I is associated with the neighboring nodes. To model a boundary behavior, so called ID termination nodes with only 1 neighbor are employed. The literature differentiates between three main cases: phase-reversing reflections (Equation 5), phase-preserving reflections (Equation 6) and anechoic walls (Equation 7) that absorb all acoustic energy (Savioja et al. 1995): Vj = 0.0 (5) vj,k(n) = vj,l(n) (6) vj,k(n) = j,i(n - 1) (7) But this approach only provides a rough approximation of the real boundary conditions and more research should be conducted in this area. The main problems with digital waveguide meshes are a direction dependent dispersion error and the finite mesh resolution to model boundary behavior (VanDuyne and Smith 1993). Several approaches have been discussed to overcome these limitations, and include higher tesselated meshes, different mesh topologies and frequency warping techniques (VanDuyne and Smith 1996), (Savioja and V~lim~ki 2000), (Beeson and Murphy 2004), (Fontana and Rocchesso 2001). 2.1 Rectilinear Waveguide Meshes The equations that govern the 3D rectilinear waveguide mesh are based on difference equations derived from the Helmholtz equation by discretizing time and space (Savioja and Lokki 2001): p(t + 1, x, y, z) 2 JE Riv+ VJ -- vJ Ri 7i -t -+ (1) (2) [p(t, x + 1,, z) + p(t, - 1y, z) +p(t, x,y + 1,z) + p(t,, - 1, z) +p(t,, y, + 1) p(t, x, y, - 1) -p(t - 1,,, z), (8) Equation 2 expresses the relation between the incoming v+ and the outgoing vi wave components. In an homogenous N-dimensional rectilinear mesh, with each junction 22