
CONSTANTS AND VARIABLES

\fBconstants\fR are floating point numbers, such as 1, 3.14159, or -73.45 .
They are available continuously and do not change in value.

\fBvariables\fR are named cells containing numbers.  They are available
continuously and may be updated at one of the four update rates
(setup only, I-rate, K-rate, or A-rate).
I- and K-rate variables are scalars (i.e. they take on only one value at any
given time) and are primarily used to store and recall controlling data,
that is, data that changes at the note rate (for I-variables) or
at the control rate (for K-variables).  I- and K-variables are therefore
useful for storing note parameter values, pitches, durations, slow-moving
frequencies, vibratos, etc.  A-variables, on the other hand, are arrays or
vectors of information.  Though renewed on the same perf-time control pass
as K-variables, these array cells represent a finer resolution of time
by dividing the control period into sample periods (see \fIksmps\fR below).
A-variables are used to store and recall data changing at the audio
sampling rate (e.g. output signals of oscillators, filters, etc.).

A further distinction is that between local and global variables.
\fBlocal\fR variables are private to a particular instrument,
and cannot be read from or written into by any other instrument.  Their
values are preserved, and they may carry information from pass to pass
(e.g. from initialization time to performance time) within a single
instrument.  Local variable names begin with the letter \fBp, i, k, \fRor \fBa.
\fRThe same local variable name may appear in two or more
different instrument blocks without conflict.

\fBglobal\fR variables are cells that are accessible by all instruments.
The names are either like local names preceded by the letter \fBg,
\fRor are special reserved symbols.
\fRGlobal variables are used for broadcasting general values,
for communicating between instruments (semaphores),
or for sending sound from one instrument to another
(e.g. mixing prior to reverberation).  

Given these distinctions, there are eight forms of local and global variables:
.sp .5
.nf
	type		when renewable		\fBLocal\fR		\fBGlobal\fR
.sp .5
reserved symbols     	permanent		--		rsymbol
score parameter fields	I-time			\fBp\fRnumber  	--
init variables		I-time			\fBi\fRname		\fBgi\fRname
control signals		P-time, K-rate		\fBk\fRname		\fBgk\fRname
audio signals		P-time, A-rate 	 	\fBa\fRname		\fBga\fRname
.fi
.sp .5
where \fIrsymbol\fR is a special reserved symbol (e.g. \fBsr, kr\fR),
\fInumber\fR is a positive integer referring to a score statement pfield, and
\fIname\fR is a string of letters and/or digits with local or global meaning.
As might be inferred, score parameters are local I-variables
whose values are copied from the invoking score statement just
prior to the Init pass through an instrument.
.bp
