There are many global variables in Nyquist. A convention in Lisp is to place asterisks (*) around global variables, e.g. *table*
. This is only a convention, and the asterisks are just like any other letter as far as variable names are concerned. Here are some globals users should know about:
*~=tolerance*
~=
) to determine if two
numbers are approximately equal.*table*
osc
and other oscillators. Initially set to the sinusoid in *sine-table*
.*A4-Hertz*
(set-pitch-names)
to recompute pitches after changing *A4-Hertz*
.*autonorm*
*autonorm-type*
is 'previous
. See Sections Memory Space and Normalization and Sound File Input and Output.*autonormflag*
play
command. You should use (autonorm-on)
and (autonorm-off)
rather than setting *autonormflag*
directly. See Sections Memory Space and Normalization and Sound File Input and Output.*autonorm-max-samples*
*autonorm-type*
is 'lookahead
. See Sections Memory Space and Normalization and Sound File Input and Output.*autonorm-previous-peak*
play
. This is used to compute the scale factor for the next sound when *autonorm-type*
is 'previous
. See Sections Memory Space and Normalization and Sound File Input and Output.*autonorm-target*
*autonorm-type*
'lookahead
(the default) and 'previous
. See Sections Memory Space and Normalization and Sound File Input and Output.*breakenable*
*clipping-error*
*clipping-threshold*
, an XLISP error is raised. See
*clipping-threshold* for more detail.
*clipping-threshold*
- See
*clipping-error*
for a description of this
variable. *clipping-threshold*
is initialized to 127/128. This
number is conservative,
and it is possible to slightly exceed this value, even with 8-bit
files without actual clipping (consider rounding
. Also, floating point
format files will not clip even when the amplitude exceeds 1.0. Note
that a “clipping” threshold of 1.0 is optimistic: 1.0 corresponds to
a 16-bit integer value of 32,768 (215), but the maximum positive
16-bit integer is 32,767. Thus, a positive sample of 1.0 will clip
when written or played as 16-bit audio.*control-srate*
*default-plot-file*
"points.dat"
.*default-sf-bits*
*default-sf-dir*
*default-sf-dir*
applies.)*default-sf-format*
*default-sf-srate*
*default-control-srate*
*control-srate*
. This value is restored when you execute (top)
to pop out of a debugging session. Change it by calling (set-control-srate value)
.*default-sound-srate*
*sound-srate*
. This value is restored when you execute (top)
to pop out of a debugging session. Change it by calling (set-sound-srate value)
.*file-separator*
/
” for Unix, “:
” for Mac, and “\
” for Win32.
This is normally set in system.lsp
.*lpslider-cutoff*
lpslider
, described in Section
Accessing Control Values. The default value is 20Hz. If unbound, this variable is set
when you load sliders.lsp
.*rslt*
*rslt*
is set to a list of the “extra” values. This provides a make-shift version of the multiple-value-return
facility in Common Lisp.*saw-table*
osc
. This is the waveform used by osc-saw
. Note that some aliasing will normally occur when using this waveform, which is not band-limited.*sine-table*
osc
.*snd-device*
FIXNUM
to select a device by
index number or to a STRING
to select a device by name. If a
STRING
is provided, the first device whose name contains the
STRING
(as a substring) is selected. (See *snd-list-devices*
below.) If the value is unbound or NULL, the default PortAudio device
is used.*snd-list-devices*
*snd-device*
and see
what device is being selected by Nyquist. One cannot (currently) obtain
the list of devices as an XLISP
value. The default behavior is to
list the devices and some instructions only the first time any sound is
played. Setting *snd-list-devices*
to a value (t
or nil
)
before playing a sound will override this behavior.*sound-srate*
*soundenable*
(sound-on)
or (sound-off)
.*tracenable*
*tri-table*
osc
. This is the waveform used by osc-tri
. Note that some aliasing will normally occur when using this waveform, which is not band-limited.