next up previous contents index
Next: Why? Up: Physical Modeling: A Larger Previous: Connections: Direct Simulation and   Contents   Index


Complexity of Musical Systems

In the physical modeling sound synthesis literature (as well as that of the mainstream simulation community) it is commonplace to see claims of better performance of a certain numerical method over another. Performance may be measured in terms of the number of floating point operations required, or memory requirements, or, more characteristically, better accuracy for a fixed operation count. It is worth keeping in mind, however, that even though these claims are (often) justified, for a given system, there are certain limits as to ``how fast" or ``how efficient" a simulation algorithm can be. These limits are governed by system complexity; one cannot expect to reduce an operation count for a simulation below that which is required for an adequate representation of the solution.

System complexity is, of course, very difficult to define. Perhaps most amenable to discussions of complexity are linear and time-invariant (LTI) systems, which form a starting point for many models of musical instruments. Consider any lossless distributed LTI system (such as a string, bar, membrane, plate, or acoustic tube), freely vibrating at low amplitude due to some set of initial conditions, without any external excitation. Considering the continuous case, one is usually interested in reading an output $ y(t)$ from a single location on the object. This solution can almost always be written in the form:

$\displaystyle y(t) = \sum_{q=1}^{\infty}A_{q}\cos(2\pi f_{q}t+\phi_{q})$ (1.7)

the form is exactly that of pure additive synthesis or modal synthesis; here, $ A_{q}$ and $ \phi_{q}$ are determined by the initial conditions and constants which define the system, and the frequencies $ f_{q}$ are assumed non-negative, and to lie in an increasing order. Such a system has a countably infinite number of degrees of freedom; each oscillator at a given frequency $ f_{q}$ requires the specification of two numbers, $ A_{q}$ and $ \phi_{q}$.

Physical modeling algorithms generally produce sound output at a given sample rate, say $ f_{s}$. This is true of all the methods discussed in the previous section. There is thus no hope of (and no need for) simulating frequency components1.1 which lie above $ f_{s}/2$. Thus, as a prelude to a discrete time implementation, the representation (1.8) may be truncated to

$\displaystyle y(t) = \sum_{q=1}^{N}A_{q}\cos(2\pi f_{q}t+\phi_{q})$ (1.8)

where only the $ N$ frequencies $ f_{1}$ to $ f_{N}$ are inferior to $ f_{s}/2$. Thus the number of degrees of freedom is now finite: 2$ N$.

Even for a vaguely defined system such as this, from this information one may go slightly farther and calculate both the operation count and memory requirements, assuming a modal-type synthesis strategy. As described in §1.2.2, each frequency component in the expression (1.8) may be computed using a single two-pole digital oscillator, which requires two adds, one multiply, and two memory locations, giving, thus, $ 2N$ adds and $ N$ multiplies per time step, and a necessary $ 2N$ units of memory. Clearly if fewer than $ N$ oscillators are employed, the resulting simulation will not be complete, and the use of more than $ N$ oscillators is superfluous. Not surprisingly, such a measure of complexity is not restricted to frequency domain methods only; in fact, any method (including direct simulation methods such as finite differences and finite element methods) for computing the solution to such a system must require roughly the same amount of memory and number of operations; for time domain methods, complexity is intimately related to conditions for numerical stability. Much more will be said about this in Chapter 6, which deals with time domain and modal solutions for the wave equation.

There is, however, at least one very interesting exception to this rule. Consider the special case of a system for which the modal frequencies are multiples of a common frequency $ f_{1}$, i.e., in (1.8), $ f_{q} = qf_{1}$. Clearly, then, in this case, (1.8) is a Fourier series representation of a periodic waveform, of period $ T=1/f_{1}$, or, in other words,

$\displaystyle y(t) = y(t-T)$ (1.9)

Thus the waveform is completely characterized by an single segment of duration $ T$. In a discrete setting, it should be clear that it would be wasteful to employ separate oscillators for each of the components of $ y(t)$; far better would be to simply store one period of the waveform in a table, and read through it at the appropriate rate, employing simple interpolation, at a cost of $ O(1)$ operations per time step instead of $ O(N)$. Though this example might seem trivial, it is worth keeping in mind that many pitched musical sounds are approximately of this form, and in particular those produced by musical instruments based on strings and acoustic tubes. The efficiency gain noted above is at the heart of the digital waveguide synthesis technique. Unfortunately, however, for musical sounds which do not generate harmonic spectra, there does not appear to be any such efficiency gain possible; this is the case, in particular, for 2D percussion instruments. Though extensions of digital waveguides do indeed exist in the multidimensional setting, in which case they are usually known as digital waveguide meshes), there is no efficiency gain relative to modal techniques, or standard time differencing methods; indeed, the computational cost of solution by any of these methods is roughly the same1.2.

For distributed nonlinear systems, such as strings and percussion instruments, it is difficult to even approach a definition of complexity--perhaps the only thing one can say is that for a given nonlinear system, which reduces to a linear system at low vibration amplitudes (this is the usual case in most of physics, and musical acoustics in particular), the complexity, or required operation count and memory requirements for an algorithm simulating the nonlinear system will be at least that of the associated linear system. Efficiency gains through digital waveguide techniques are no longer possible, except under very restricted conditions--one of these, the string under a tension-modulated nonlinearity, will be discussed in §8.1.5.

One question that will not be approached in detail in this book is of model complexity in the perceptual sense. This is clearly a very important issue, in that psychoacoustic considerations could lead to reductions in both the operation count and memory requirements of a synthesis algorithm, in much the same way as they have impacted on audio compression. For instance, the description of the complexity of a linear system in terms of the number of modal frequencies up to the Nyquist frequency is mathematically sound, but for many musical systems (particularly in 2D), the modal frequencies become very closely spaced in the upper range of the audio spectrum. Taking into consideration the concepts of the critical band and frequency domain masking, it may not be necessary to render the totality of the components. Such psychoacoustic model reduction techniques have been used, with great success, in many efficient (though admittedly non-physical) artificial reverberation algorithms. The impact of psychoacoustics on physical models of musical instruments has seen some investigation recently by Järveläinen [110], in the case of string inharmonicity , and Aramaki [6], in the case of impact sounds, and it would be extremely useful to develop practical complexity-reducing principles and methods, which could be directly related to numerical techniques.

This main point of this section is to signal to the reader that for general systems, there is not a physical modeling synthesis method which acts as a magic bullet. There is a minimum price to be paid for the proper simulation of any system. For a given system, the operation counts for modal, finite difference and lumped network models are always nearly the same; in terms of memory requirements, modal synthesis methods are generally much heavier than for time domain methods. One great misconception which has appeared time and time again in the literature [34] is that time domain methods are wasteful, in the sense that the entire state of an object must be updated, even though one is interested, ultimately, in only a scalar output, generally from a single location on the virtual instrument. Thus point-to-point ``black-box" type models, perhaps based on a transfer function representation are more efficient. But, as will be shown repeatedly throughout this book, the order of any transfer function description (and thus the memory requirements) will be roughly the same as the size of the physical state of the object in question.


next up previous contents index
Next: Why? Up: Physical Modeling: A Larger Previous: Connections: Direct Simulation and   Contents   Index
Stefan Bilbao 2006-11-15