The MP4-SA Book: Part V: Special Topics
Description: Special topics about MP4-SA. Chapters cover the SAOL template language contruct, SAOL program debugging using sfront's rate-semantic printf() statement, and the development of large SAOL programs by using include files, macros, and conditional compilation.
Keywords: MP4-SA, SAOL, language, MIDI, SASL, template, templates, map, maplist, with, preset, debug, printf, cpp, pre-processor, macro, MACRO, include, include, define, conditionals

### From The MPEG-4 Structured Audio Book by John Lazzaro and John Wawrzynek.

# Part V: Special Topics

## Introduction MPEG-4 Structured Audio (MP4-SA) is an ISO/IEC standard (edited by Eric Scheirer) that specifies sound not as audio data, but as a computer program that generates audio when run. For an introduction to MP4-SA see the introductory tutorial presented in Part I of the book. For a complete description of the SAOL language, see Part II. In Part V of the book, we show ways to solve common problems that arise when writing SAOL programs. In the first chapter we show useful methods for debugging MP4-SA programs. We describe an sfront extension to SAOL for program debugging: a rate-sensitive version of the C printf statement. In the second chapter we describe an advanced SAOL language feature, the template construct. Templates are a concise way to generate a family of instruments whose properties vary in a regular way. In the third chapter we describe Slib, a SAOL library distributed with sfront that provides support utilities to simplify low-level SAOL programming. In the fourth chapter we show how to write AudioUnit plug-ins in SAOL. Next:Part V/1: SAOL Debugging | ## Part V: Table of Contents #### 1. Debugging SAOL Programs Reported Errors. Program Crashes. Finding Runtime Errors. `printf`. I-rate Methods. K-rate Methods A-rate Methods #### 2. Templates A Simple Example Template Variables Preset Maplists #### 3. The Slib Library Trigonometric Opcodes. Numeric Constants. Symbolic Constants. The Scaled Smoothed MIDI Library. MIDI Constants. General MIDI Presets. #### 4. AudioUnit Plug-Ins AudioUnits Demystified. SAOL Plug-Ins. A Softsynth Example. An Effects Example. Debugging.

Copyright 1999 John Lazzaro and John Wawrzynek.