Music 220b: Winter 2001
Fernando Lopez-Lezcano, instructor
Christopher Burns, teaching assistant
Tamara Smyth, teaching assistant
Week 2: playback - snd, sndplay and the (dac) command
When working on larger projects, you may not want to issue a (with-sound) command every time you want to listen to your soundfile. If you haven't changed any parameters or other code, then why recompute the samples just to play a soundfile that you've already rendered?
One way to get around this problem is to open your soundfile in snd. From a terminal window type snd & to start the program, then call up your soundfile using the "open" command in the file menu. Finally, click on the "play" button in the lower right-hand corner. If you change your soundfile after opening it, snd will display a "burning fuse" icon at the bottom of its window; to get the most current version, choose "update" from the file menu.
The advantage of using snd is that you can advantage of its visualization tools. However, there are times when something "quick and dirty" is more appropriate....
From a terminal window, you can play soundfiles using the sndplay command: sndplay /zap/test.snd will play the soundfile at that location, no fuss, no muss.
You can also play sounds from within the lisp interpreter using the (dac) command. (dac) alone plays the last soundfile played; (dac "/zap/test.snd") can be used to play an arbitrary soundfile.