In conventional programming languages, the block is used to introduce local variables, whose names and types are chosen by the programmer. In AFL, however, the block is used only to introduce a fixed set of local variables, each of which is associated with the current state of one component of the audio formatter.
The main advantage we gain from having a restricted block is simplicity of semantics and implementation. The hardware for each audio component is associated with a particular variable. The contents of the variable can be changed only through an explicit assignment to the variable, so it is not difficult in the implementation to change the hardware when the variable is assigned. AFL is optimized so that only those dimensions that are actually changed have to be conveyed to the hardware. Further, the particular variable that is associated with the hardware can be switched only by the beginning and end of execution of a block. Hence, the implementation of the change of association is simple.
The use of the restricted block leads to the rule that any audio event that is begun in a block must end in that block. In all our extensive experimentation and experience with AS TE R, we have not found this rule to be an inconvenience. In fact, we have been helped by the imposed discipline. On the other hand, taking advantage of a more flexible block (were it available) would only complicate the structure and interaction of various rendering rules, in much the same way that the goto can cause undue complications in conventional programming languages.
Consider, for example, rendering rules of the following form:
When rendering a fraction whose numerator is a superscripted variable, e.g., , the above would result in the sound getting turned off by the superscript rendering rule, and this effect would persist for the rest of the rendering of the fraction. Since rendering rules are written for specific object types, many of which can be nested, the above kind of bug would become common if component states were not local to every block.
To give a slightly different intuition, there are two views of a vector space formed by the direct sum of component spaces. These views are isomorphic when the space is considered as an algebraic entity. In the internal view, the space is made up of several subspaces that we see as individual components. The components are entities in themselves and can be directly manipulated. This is the view taken by conventional block structured languages. No local copies of state variables are made automatically. The block is internal to the state space.
In the external view, the vector space is a single entity having different components, and it is this latter view that AFL blocks have of the total audio space. Blocks are external to the state space, so whenever a new block is executed, the local state is a copy of the current point in the total space. This means that local copies are made of all the component states.
The benefits of AS TE R, which is based on AFL, cannot be experienced by reading a printed document such as this; rather, one has to listen to AS TE R in action. Suffice it to say that AS TE R has made it possible for the author to read current technical material, on his own, that otherwise would not have been available for years (if at all). Further, he can tune the renderings (see Chapter 4) to his liking and can even browse the document. Thus, AFL represents a gigantic step forward in providing the tools necessary to render technical documents in audio.
Several further points can be made.