on May 12, 2004
"Real Sound Synthesis for Interactive Applications" by Perry R. Cook describes elementary and advanced techniques to simulate the audio components of dynamic systems using physics. While the book is not specifically directed toward game development, the application to game development is clear. The book's organization of the major themes covered is easily to follow through three sections that detail digital audio, sound modeling, and simulation of real world instruments. The book spans sixteen chapters and appendices totaling 248 pages.
The first section (chapters 1-3) defines digital audio, compression, wave synthesis, and simple filtering techniques. The chapters form the foundation for the later sections and define the common asset formats and techniques currently used in games. Cook emphases that key components of sound manipulation are the sampling rate and quantization of the source audio. The text demonstrates how sounds with higher sampling rates allow for greater manipulation with fewer artifacts but incur a greater computational cost.
The second section (chapters 4-8) introduces sound modeling through simplified physical systems, such as an ideal spring, and Fourier series equations. While an understanding of college physics and calculus is helpful (especially if you'd like to code these methods), the book doesn't require it or bog down in theory or mathematical proofs. (For those interested in the details, they are provided in the appendices). The concepts described in this section are critical in creating computer sound models that represent real world objects.
The last section (chapters 7-16) provides physics equations that allow for the simulation of real world instruments (string instruments, tubes, and multi-dimensional objects). Each chapter describes a different system based on Fourier construction, filtering, and physics-based equations. It's the heart of the book and most interesting. The background in the two previous sections is essential to fully grasp the concepts Cook defines here.
Throughout each chapter, Cook couples clear concise writing with a touch of humor and illustrative diagrams. Cook provides a good initial foundation as the topics covered gradually build in complexity. The clean organizational layout made it easy for me to refer back to previous sections when I felt the need. In many cases, however, I found the writing to be a little too condensed and wished for a paragraph describing a concept rather than the sentence provided. Cook does supply references at the end of each chapter for those readers seeking additional detail.
The book also includes a CD containing audio samples of the topics discussed throughout the book. While reading the book, it was useful to be able to hear the point or technique made in the text. The CD also contains Cook's sound synthesis toolkit and several examples of instruments highlighted in the last section.
Unfortunately in current development, real-time sound synthesis in games has a limited place. Due to the complex calculations of Fourier series, fast digital signal processor chips are required to simulate the audio effects without impacting the rest of the game. Minimally, filters and other simple routines outlined in the book can be written for target hardware to accomplish specialized effects but this is nothing radically new.
However, Cook's research in simulating audio is extremely exciting. During the calculation of an object's dynamic behavior (such as collision response, striking, falling, moving, etc.) a minimal additional amount of time can be spent to determine the audio effects. According to Cook's findings, this amount is generally less than 5% of the total time required to simulate an object's physical behavior. Admittedly, these calculations are on the order of minutes versus milliseconds but eventually Moore's Law will catch up and simplifications will allow unparalleled audio effects in conjunction with physical simulation.
Developers and sound designers interested in the math and physics of creating real-time sounds should pick up this book. Those interested in a fascinating look at the mechanisms of dynamically producing sound might also want to give it a read provided it's with the understanding that the direct applicability to games is at least few years away.
on August 29, 2002
Are you a pretty good C++ programmer? Have you ever wanted to have your computer output sounds like footsteps or musical instruments that (a) sound real and (b) are continuously responsive to the user's control? Did you discover that it was basically impossible to do it by stitching together prerecorded samples, and you couldn't think of any other way to do it?
If so, Perry Cook has written just the book you have been looking for. In 250 pages, Cook explains everything, from the basics of digital filtering to the major alternatives for generating sounds: additive and subtractive synthesis, FM synthesis, and -- the real focus of the book -- physical modeling. Not only that, the accompanying CD-ROM includes lots of sound examples and the Synthesis ToolKit -- a pretty much platform-independent set of C++ classes and algorithms for writing your own code.
Not everything is perfect. Just as the first version of any program contains some bugs, the first printing of any book that uses mathematics contains some errors. In particular, typos in Appendix A could be very frustrating if this is your first exposure to Fourier analysis. (You might want to check Cook's web site for a promised list of errata and code updates.) And don't let the fact that the book is short, attractively produced, very well organized, unusually clear, and entertainingly written lead you to believe that you can master it in a weekend. Although Cook tries his best to make the underlying mathematics unintimidating, there is no getting around the fact that there are some rather deep concepts from wave physics and signals-and-systems theory behind what he has to say.
The good news is that the effort is richly repaid. Not only will you be able to write programs that can generate controllable sounds in real time, but you will develop insight into how physical instruments produce their distinctive sounds, and you will understand the basics of both the standard and the most advanced techniques that have been developed to model them. Highly recommended.
on August 22, 2002
This book is useful, enlightening, and fun. It covers many cutting-edge topics in lucid fashion, topics that can only be found otherwise in academic journals. The computer code (in the book and on the CD-ROM) is an invaluable resource for the ambitious reader, who can actually try out or modify the techniques. The CD-ROM also provides examples of these new techniques in action. Finally, the author's sense of humor comes through often (this is not a stiff, boring book!).
As a "digital-sound-artist" and someone who teaches this stuff at the university level, I highly recommend this book not only to those who want to learn about the most recent work going on in sound synthesis, but to those who want another perspective on more familiar topics (like the basics of PCM, fourier analysis, basic digital filtering, etc....).