Main Page       Index


all.lsp


 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

*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.


var

*scratch-dir*

 The system scratch directory


var

*default-sf-dir*

 The default sample file directory


var

*default-sf-extension*

 The default sample file type.


var

*default-sound-file*

 The default output sound file


var

*default-table-size*

 The default size for wave tables


var

*modules*

 A list of all loaded files. Files are added to *modules* by provide.


var

*current-file*

 The most recent file which called the current-file function


con

+2PI+

 The value 2*pi


con

+12ROOT2+

 The 12th root of 2


con

+LOG2+

 The base e log of 2


con

+LOG10+

 The base e log of 10


var

*gc-column-width*

 Number of garbage collection tokens per line


var

*gc-token*

 The garbage collection token (as string)


var

*gc-count*

 The current number of garbage collection tokens printed


var

*gc-flag*

 If true disable garbage collection notification


function

gc-reset

 (gc-reset)
 Reset the number of garbage collection tokens printed. 
 The next garbage collection call will cause a new line.


View the Sourcecode :



;; 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 "~%")


Main Page       Index