Adding sound to your C or C++ application with VSS

a.k.a.

Camille Goudeseune, Integrated Systems Laboratory, Beckman Institute
6/15/01


1. Overview

This website tells you how to add sound to an application written in C or in C++ (as most CAVE applications are). Theory is kept to a minimum. The sound system used is VSS (Virtual Sound Server), developed and supported by the Audio Group at NCSA from 1993-2000 and now maintained by Camille Goudeseune at the Beckman Institute's Illinois Simulator Laboratory. Bill Sherman and David Zielinksi helped maintain it in 2005-2007.

The latest version of this document is at http://syzygy.isl.uiuc.edu/vss/dummies/.

You should have a computer that can make sound: either

Contact Camille Goudeseune about getting a prerelease copy of VSS for Windows.

You will run VSS on such a computer; your application can run on the same computer or on another one networked to the first one.

2. Why bother?

Of course your application doesn't need sound. By the same reasoning, it doesn't need a GUI or color. More seriously, though, your application may have more considerations than just quick development: things like intelligibility, ease of use, ease of learning and understanding, preventing user error.

Like any other part of your application which isn't the core computation, sound helps users of your application get their job done. Again like these other parts, sound design is best when it's subtle. You're not presenting Mahler's Second Symphony, and you're not showing off how deep your menus nest. You just want your application to be as clear and "good" as possible. Insofar as sound can achieve this goal, let's use sound. Tufte's comments apply to the ears as well as to the eyes.

3. Contents

OK, now that the philosophy's out of the way, on to the nuts and bolts.
  1. The first part of this website shows you how to get the most basic level of sound running with your application, a background ambience.
  2. The second part shows you how to adjust sounds while they're playing. After all, a computer is more than just a tape recorder.
  3. The third part gives you a checklist to see where sound can improve your application, and shows you how the data in your application can be made to change sounds ("data sonification", analogous to data visualization).
  4. The fourth part shows advanced examples of using VSS.
  5. An appendix gives hints on troubleshooting.
All these parts provide several examples you can try out interactively. You can immediately cut-and-paste the examples into your own application, as-is or for further tweaking.