## Digital Waveguide Mesh

In §C.12, the theory of multiport scattering was derived,*i.e.*, the reflections and transmissions that occur when digital waveguides having wave impedances are connected together. It was noted that when is a power of two, there are

*no multiplies*in the scattering relations Eq.(C.105), and that this fact has been used to build multiply-free reverberators and other structures using digital waveguide meshes [430,518,146,396,520,521,398,399,401,55,202,321,320,322,422,33].

### The Rectilinear 2D Mesh

Figure C.32 shows the basic layout of the rectilinear 2D waveguide mesh. It can be thought of as simulating a plane using 1D digital waveguides in the same way that a tennis racket acts as a membrane composed of 1D strings. At each node (string intersection), we have the following simple formula for the node velocity in terms of the four incoming traveling-wave components:
in

### Dispersion

Since the digital waveguide mesh is*lossless*by construction (when modeling lossless membranes and volumes), and since it is also linear and time-invariant by construction, being made of ordinary digital filtering computations, there is only one type of error exhibited by the mesh:

*dispersion*. Dispersion can be quantified as an error in propagation speed as a function of frequency and direction along the mesh. The mesh geometry (rectilinear, triangular, hexagonal, tetrahedral, etc.) strongly influences the dispersion properties. Many cases are analyzed in [55] using von Neumann analysis (see also Appendix D). The

*triangular waveguide mesh*[146] turns out to be the simplest mesh geometry in 2D having the least dispersion

*variation*as a function of direction of propagation on the mesh. In other terms, the triangular mesh is closer to

*isotropic*than all other known elementary geometries. The

*interpolated waveguide mesh*[398] can also be configured to optimize isotropy, but at a somewhat higher compuational cost.

### Recent Developments

An interesting approach to dispersion compensation is based on*frequency-warping*the signals going into the mesh [399]. Frequency warping can be used to compensate frequency-dependent dispersion, but it does not address angle-dependent dispersion. Therefore, frequency-warping is used in conjunction with an isotropic mesh. The 3D waveguide mesh [518,521,399] is seeing more use for efficient simulation of acoustic spaces [396,182]. It has also been applied to statistical modeling of violin body resonators in [203,202,422,428], in which the digital waveguide mesh was used to efficiently model only the ``reverberant'' aspects of a violin body's impulse response in statistically matched fashion (but close to perceptually equivalent). The ``instantaneous'' filtering by the violin body is therefore modeled using a separate equalizer capturing the important low-frequency body and air modes explicitly. A unified view of the digital waveguide mesh and

*wave digital filters*(§F.1) as particular classes of energy invariant finite difference schemes (Appendix D) appears in [54]. The problem of modeling diffusion at a mesh boundary was addressed in [268], and maximally diffusing boundaries, using quadratic residue sequences, was investigated in [279]; an introduction to this topic is given in §C.14.6 below.

### 2D Mesh and the Wave Equation

where, for instance, is the ``outgoing wave to the north'' from node . Similarly, the outgoing waves leaving become the incoming traveling-wave components of its neighbors at time :

This may be shown in detail by writing

*i.e.*,

Discussion regarding solving the 2D wave equation subject to boundary conditions appears in §B.8.3. Interpreting this value for the wave propagation speed , we see that every two time steps of seconds corresponds to a spatial step of meters. This is the distance from one diagonal to the next in the square-hole mesh. We will show later that diagonal directions on the mesh support

*exact*propagation (of plane waves traveling at 45-degree angles with respect to the or axes). In the and directions, propagation is highly

*dispersive*, meaning that different frequencies travel at different speeds. The exactness of 45-degree angles can be appreciated by considering Huygens' principle on the mesh.

### The Lossy 2D Mesh

Because the finite-difference form of the digital waveguide mesh is the more efficient computationally than explicitly computing scattering wave variables (too see this, count the multiplies required per node), it is of interest to consider the finite-difference form also in the case of frequency-dependent losses. The method of §C.5.5 extends also to the waveguide mesh, which can be shown by generalizing the results of §C.14.4 above using the technique of §C.5.5. The basic idea is once again that wave propagation during one sampling interval (in time) is associated with linear filtering by . That is, is regarded as the per-sample wave propagation filter.### Diffuse Reflections in the Waveguide Mesh

In [416], Manfred Schroeder proposed the design of a diffuse reflector based on a*quadratic residue sequence*. A quadratic residue sequence corresponding to a prime number is the sequence mod , for all integers . The sequence is periodic with period , so it is determined by for (

*i.e.*, one period of the infinite sequence). For example, when , the first period of the quadratic residue sequence is given by

^{C.11}

function [c] = qrsfp(Ns) %QRSFP Quadratic Residue Sequence Fourier Property demo if (nargin<1) Ns = 1:2:99; % Test all odd integers from 1 to 99 end for N=Ns a = mod([0:N-1].^2,N); c = zeros(N-1,N); CM = zeros(N-1,N); c = exp(j*2*pi*a/N); CM = abs(fft(c))*sqrt(1/N); if (abs(max(CM)-1)>1E-10) || (abs(min(CM)-1)>1E-10) warn(sprintf("Failure for N=%d",N)); end end r = exp(2i*pi*[0:100]/100); % a circle plot(real(r), imag(r),"k"); hold on; plot(c,"-*k"); % plot sequence in complex plane end |

**Next Section:**

FDNs as Digital Waveguide Networks

**Previous Section:**

Two Coupled Strings