Sounds versus behaviors

I am trying to understand Nyquist. This is a summary of my understanding. This is what I wish I could have read two months ago when I started experimenting.

  • There are non-Lisp functions callable from Lisp that have snd- in their names, and they implement certain operations on sound sample data efficiently.
  • There is a layer of “behaviors” and “transformations” implemented on top of that, in Lisp.
  • With the possible exceptions of snd-seq, snd-multiseq, snd-trigger, snd-fromobject and snd-fromarraystream, which call back into the lisp interpreter, I can fairly say: The sound/behavior distinction is irrelevant to the workings of things below the snd- interface. There are only sound objects. A sound is an object in the C++ sense that generates samples on demand by some rule. This rule is completely determined at the time the sound is constructed and the snd- function returns. There is no dependency after that on Lisp environment, except for the ones that may call back into Lisp when they generate samples.
  • A “behavior” is a sound-valued Lisp expression that may depend on certain variables in its evaluation environment.
  • A “transformation” like at is a Lisp language extension, implemented as a macro, that changes the environment of a behavior expression.
  • Understanding a transformation as a function operating on the output of some other evaluation – is wrong, even though it looks like other functions syntactically. I should think of it as more like let or do. The documentation is definitely misleading here when it calls transformations “functions” rather than, say, “forms” or “expressions.” http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/manual/part6.html#54
  • The slogan “sounds are not behaviors” is not quite right. Rather, the Lisp expression s where that is a variable bound to a sound object, is an example of a “dumb” behavior that in fact makes no use of the environment variables.
  • The usefulness of behaviors and transformations is for making a programming language for composition of music out of sampled and generated tones. However good that is, that part of Nyquist is irrelevant to my purposes of writing analyzers and effects for nonmusical recordings. I should learn the uses of the snd- functions without the distractions of the behaviors, transformations, and environments which I can bypass.