all.lsp Version 1.002 11 June 2005, minor documentation changes. Version 1.001 29 April 2005 Version 1.000 31 October 2004 Author Steven Jones Contact jones57@swbell.net include the word "nyquist" in subject line The contents of this file are released under the terms of the GNU General Public License. See the file LICENSE.txt all.lsp performs the following functions. 1) Initializes personalized Nyquist working environment. 2) Defines a few global variables and constants 3) Loads additional files which I use constantly.
var
Contains a string representation of the operating system Currently valid values are "nix" for UNIX/Linux and "nt" or "win" for windows. "mac" is proposed for Macintosh systems but is currently not supported.
var
The system scratch directory
var
The default sample file directory
var
The default sample file type.
var
The default output sound file
var
The default size for wave tables
var
A list of all loaded files. Files are added to *modules* by provide.
var
The most recent file which called the current-file function
con
The value 2*pi
con
The 12th root of 2
con
The base e log of 2
con
The base e log of 10
var
Number of garbage collection tokens per line
var
The garbage collection token (as string)
var
The current number of garbage collection tokens printed
var
If true disable garbage collection notification
function
(gc-reset) Reset the number of garbage collection tokens printed. The next garbage collection call will cause a new line.
;; all.lsp ;; Version 1.002 11 June 2005, minor documentation changes. ;; Version 1.001 29 April 2005 ;; Version 1.000 31 October 2004 ;; ;; Author Steven Jones ;; ;; Contact jones57@swbell.net include the word "nyquist" in subject line ;; ;; The contents of this file are released under the terms of the GNU General ;; Public License. See the file LICENSE.txt ;; ;; all.lsp performs the following functions. ;; ;; 1) Initializes personalized Nyquist working environment. ;; 2) Defines a few global variables and constants ;; 3) Loads additional files which I use constantly. ;; (setq *setup-console* nil) ;Make emacs friendly ;; @doc var *os* ;; Contains a string representation of the operating system Currently valid ;; values are "nix" for UNIX/Linux and "nt" or "win" for windows. "mac" is ;; proposed for Macintosh systems but is currently not supported. ;; ;; (setq *os* "nix") (setq *file-separator* #\/) ;;; Use character NOT string ;; @doc var *scratch-dir* ;; The system scratch directory ;; (setq *scratch-dir* "/tmp") ;; @doc var *default-sf-dir* ;; The default sample file directory ;; (setq *default-sf-dir* "/files/samples") (setq *default-sf-format* snd-head-aiff) ;; @doc var *default-sf-extension* ;; The default sample file type. ;; (setq *default-sf-extension* ".aiff") ;; @doc var *default-sound-file* ;; The default output sound file ;; (setq *default-sound-file* "tmp-nyquist.aiff") ;; @doc var *default-table-size* ;; The default size for wave tables ;; (setq *default-table-size* 2048) ;; ************************************************************************** ;; Global Variables and Constants ;; ************************************************************************** ;; @doc var *modules* ;; A list of all loaded files. Files are added to *modules* by provide. ;; (setq *modules* '()) ;; @doc var *current-file* ;; The most recent file which called the current-file function ;; (setq *current-file* 'NIL) ;; @doc con +2PI+ ;; The value 2*pi ;; (setq +2PI+ (* 2 pi)) ;; @doc con +12ROOT2+ ;; The 12th root of 2 ;; (setq +12ROOT2+ (expt 2 (/ 12.0))) ;; @doc con +LOG2+ ;; The base e log of 2 ;; (setq +LOG2+ (log 2.0)) ;; @doc con +LOG10+ ;; The base e log of 10 ;; (setq +LOG10+ (log 10.0)) ;; ************************************************************************** ;; Garbage Collection ;; ;; The following code replaces the standard Nyquist/XLISP garbage collection ;; notification. The alternate outputs a period for each garbage collection ;; call. When a pre-determined number of dots have been displayed a new line ;; is printed. This produces roughly 1/75th the number of lines as the ;; original while still providing some visible feedback. ;; ;; ************************************************************************** ;; @doc var *gc-column-width* ;; Number of garbage collection tokens per line ;; (setf *gc-column-width* 75) ;; @doc var *gc-token* ;; The garbage collection token (as string) ;; (setf *gc-token* ".") ;; @doc var *gc-count* ;; The current number of garbage collection tokens printed ;; (setf *gc-count* 0) ;; @doc var *gc-flag* ;; If true disable garbage collection notification ;; (setf *gc-flag* nil) (setf *gc-hook* #'(lambda (&rest args) (if (> *gc-count* *gc-column-width*) (progn () (setf *gc-count* 0) (format t "~%. ")) (progn () (setf *gc-count* (1+ *gc-count*)) (format t "~a" *gc-token*)))) ) ;; @doc function gc-reset ;; (gc-reset) ;; Reset the number of garbage collection tokens printed. ;; The next garbage collection call will cause a new line. ;; (defun gc-reset () (setq *gc-count* (+ 1 *gc-column-width*))) ; *************************************************************************** ; *** Load Standard set of files ; *************************************************************************** (load "bugpatch") (load "utilities") (require 'math) (require 'option) (require 'su) (require 'os) (require 'envelope) (require 'wtab) (require 'tempo) ;(require 'project) (format t "~%")