Commit 44dcb093 authored by IOhannes zmölnig's avatar IOhannes zmölnig

Import snd_19.1.orig.tar.gz

[dgit import orig snd_19.1.orig.tar.gz]
parents
This diff is collapsed.
Snd is a sound editor written by Bill Schottstaedt (bil@ccrma.stanford.edu).
Except where otherwise noted, it is Copyright 1996-2016 Bill Schottstaedt.
The authors hereby grant permission to use, copy, modify, distribute,
and license this software and its documentation for any purpose. No
written agreement, license, or royalty fee is required. Modifications
to this software may be copyrighted by their authors and need not
follow the licensing terms described here.
IN NO EVENT SHALL THE AUTHORS OR DISTRIBUTORS BE LIABLE TO ANY PARTY
FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OF THIS SOFTWARE, ITS DOCUMENTATION, OR ANY
DERIVATIVES THEREOF, EVEN IF THE AUTHORS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
THE AUTHORS AND DISTRIBUTORS SPECIFICALLY DISCLAIM ANY WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, AND NON-INFRINGEMENT. THIS SOFTWARE
IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE
NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
MODIFICATIONS.
;;; DotEmacs Version 1.0
;;; Copyright 2001 Fernando Lopez-Lezcano <nando@ccrma.stanford.edu>
;;; Tested under RedHat Linux 7.0 (rpm: xemacs-21.1.14-2.7):
;;; xemacs 21.1 patch 14, ilisp 5.10.1
;;;
;;; this .emacs file should work correctly with the PlanetCCRMA
;;; cm/clm/cmn rpms and should autodetect which binary rpm has
;;; been installed, setting the correct path for executing it.
;;; Getting all this work has been a REAL pain, most of the time
;;; trying to interpret emacs lisp code in the ilisp module...
;;;
;;; Todo: more key bindings should be local for the buffer, this
;;; is a problem when using several lisps concurrently...
;;; For standard gnu emacs and Xemacs
;;; figure out which flavor we are running
(defvar xemacs-flavor (string-match "XEmacs\\|Lucid" emacs-version))
;;; For Xemacs only
(cond (xemacs-flavor
;; if you always want partial minibuffer completion
(require 'completer)
;; configuration of Erik Naggum's HyperSpec access package.
(setq common-lisp-hyperspec-root "file:/usr/lib/lisp/reference/HyperSpec/")
;; don't send output to a separate frame
(setq ilisp-*use-frame-for-output* nil)
;; arglist will end up on minibuffer
(setq ilisp-*use-frame-for-arglist-output-p* nil)
;; no message on startup
(setq ilisp-motd nil)
;; activate fsf keybindings
(setq ilisp-*use-fsf-compliant-keybindings* t)
;; initialization and load hooks
(add-hook 'ilisp-load-hook
'(lambda ()
;; Change default key prefix to C-c
(setq ilisp-*prefix* "\C-c")
;; do not do arglist expansion by default
;; necessary to avoid errors on .lisp buffers
;; (define-key ilisp-mode-map " " 'self-insert-command)
;; output to minibuffer for arglist expansion
(setq lisp-no-popper t)
;; by default disable arglist expansion on #\\Space
(setq ilisp-*arglist-message-lisp-space-p* nil)))
(add-hook 'ilisp-mode-hook
'(lambda ()))
;; HACK: we set window-system to nil temporarily while we load ilisp
;; so that it does not create extra frames for its output. There is
;; currently no way to turn this off with configuration variables
;; for ilisp 5.10.1 (AFAIK). The code for the output functions is in:
;; /usr/lib/xemacs/xemacs-packages/lisp/ilisp/ilis-out.el
(let ((window-system nil))
;; now we load ilisp, we need it active to define our dialects
(require 'ilisp))
;; define a dialect for Snd's guile interpreter
(defdialect snd "Snd" guile
(setq comint-prompt-regexp "^>+")
(setq ilisp-complete-command nil)
;; try to autodetect the binary
(unless snd-program
(cond
((file-executable-p "/usr/bin/snd")
(setq snd-program "/usr/bin/snd"))
(t (setq snd-program "snd")))))
(add-hook 'snd-hook
(lambda ()
))
;; if you have the binary somewhere else:
;; (setq snd-program "snd")
;; define a dialect for CM/CLM/CMN (under allegro common lisp)
(defdialect acl "AclLisp" allegro
;; try to autodetect the binary (at ccrma)
(unless acl-program
(cond
;;((file-executable-p "/usr/ccrma/lbin/cm2-clm2")
;; (setq acl-program "/usr/ccrma/lbin/cm2-clm2"))
((file-executable-p "/usr/ccrma/lbin/acl5.0")
(setq acl-program "/usr/ccrma/lbin/acl5.0"))
(t (setq acl-program "cm2-clm2")))))
(add-hook 'acl-hook
(lambda ()
;; the following is necessary so that we can have separate
;; keymaps for snd and other lisps, if we run them concurrently
;; we need to have some local (to the buffer) key bindings.
(make-local-variable 'overriding-local-map)
(setq overriding-local-map (copy-keymap ilisp-mode-map))
(define-key overriding-local-map " "
'ilisp-arglist-message-lisp-space)
;; enable arglist expansion on this buffer
(make-local-variable 'ilisp-*arglist-message-lisp-space-p*)
(setq ilisp-*arglist-message-lisp-space-p* t)))
;; if you have the binary somewhere else
;; (setq acl-program "/usr/ccrma/lbin/cm2-clm2")
;; define a dialect for CmuCL;
;; we need to patch the cmuclisp.lisp init file including CMU18 in the
;; #+ #- switches if we want the symbol description to work correctly,
;; see /usr/lib/xemacs/xemacs-packages/lisp/ilisp/cmulisp.lisp
(defdialect cmucl "CmuLisp" cmulisp
;; set the correct file name
(setq ilisp-cmulisp-init-file "cmulisp.lisp")
;; try to autodetect the binary
(unless cmucl-program
(cond
((file-executable-p "/usr/bin/cmucl-cm-clm-cmn")
(setq cmucl-program "/usr/bin/cmucl-cm-clm-cmn"))
((file-executable-p "/usr/bin/cmucl-cm-clm")
(setq cmucl-program "/usr/bin/cmucl-cm-clm"))
((file-executable-p "/usr/bin/cmucl-clm")
(setq cmucl-program "/usr/bin/cmucl-clm"))
(t (setq cmucl-program "lisp")))))
(add-hook 'cmucl-hook
(lambda ()
(make-local-variable 'overriding-local-map)
(setq overriding-local-map (copy-keymap ilisp-mode-map))
(define-key overriding-local-map " "
'ilisp-arglist-message-lisp-space)
;; enable arglist expansion on this buffer
(make-local-variable 'ilisp-*arglist-message-lisp-space-p*)
(setq ilisp-*arglist-message-lisp-space-p* t)))
;; if you have the binary somewhere else:
;; (setq cmucl-program "lisp")
;; define a dialect for Clisp
(defdialect clisp "CLisp" clisp-hs
;; try to autodetect the binary
(unless clisp-program
(cond
((file-executable-p "/usr/bin/clisp-cm-clm-cmn")
(setq clisp-program "/usr/bin/clisp-cm-clm-cmn"))
((file-executable-p "/usr/bin/clisp-cm-clm")
(setq clisp-program "/usr/bin/clisp-cm-clm"))
((file-executable-p "/usr/bin/clisp-clm")
(setq clisp-program "/usr/bin/clisp-clm"))
(t (setq clisp-program "clisp")))))
(add-hook 'clisp-hook
(lambda ()
(make-local-variable 'overriding-local-map)
(setq overriding-local-map (copy-keymap ilisp-mode-map))
(define-key overriding-local-map " "
'ilisp-arglist-message-lisp-space)
;; enable arglist expansion on this buffer
(make-local-variable 'ilisp-*arglist-message-lisp-space-p*)
(setq ilisp-*arglist-message-lisp-space-p* t)))
;; if you have the binary somewhere else:
;; (setq clisp-program "clisp")
;; Bind acl startup
(global-set-key "\C-x\C-l" 'acl)
(global-set-key "\C-x\L" 'acl)
))
;;; End Xemacs customization
This diff is collapsed.
Snd 19.1
in s7, replaced morally-equal? with equivalent?
format with the control-string as the first argument is now an error
(I can't remember why I made the port optional)
clm2xen.c: fixed an error message in partials->polynomial (it thought
an integer was not a number), and a mus-length optimization bug.
checked: sbcl-1.14.16
Thanks!: Nando, Kjetil.
\ No newline at end of file
This diff is collapsed.
#ifndef _SNDLIB_H
#define _SNDLIB_H
#include <mus-config.h>
#ifndef _MSC_VER
#include <unistd.h>
#endif
#include <sys/types.h>
#include <stdio.h>
#if ((!__NetBSD__) && ((_MSC_VER) || (!defined(__STC__)) || (defined(__STDC_VERSION__) && (__STDC_VERSION__ < 199901L))))
#define __func__ __FUNCTION__
#endif
#if (!defined(M_PI))
#define M_PI 3.14159265358979323846264338327
#define M_PI_2 (M_PI / 2.0)
#endif
#define is_power_of_2(x) ((((x) - 1) & (x)) == 0)
#define MUS_MAX_MALLOC_DEFAULT (1 << 26)
#define MUS_MAX_TABLE_SIZE_DEFAULT (1024 * 1024 * 20) /* delay line allocation etc */
#ifndef SEEK_SET
#define SEEK_SET 0
#define SEEK_END 2
#endif
#ifdef _MSC_VER
#ifdef FOPEN
#undef FOPEN
#endif
#if USE_SND
#define OPEN(File, Flags, Mode) snd_open((File), (Flags), 0)
#else
#define OPEN(File, Flags, Mode) open((File), (Flags))
#endif
#else
#if USE_SND
#define OPEN(File, Flags, Mode) snd_open((File), (Flags), (Mode))
#else
#define OPEN(File, Flags, Mode) open((File), (Flags), (Mode))
#endif
#endif
#if USE_SND
#define FOPEN(File, Flags) snd_fopen((File), (Flags))
#define CREAT(File, Flags) snd_creat((File), (Flags))
#define REMOVE(OldF) snd_remove(OldF, IGNORE_CACHE)
#define STRERROR(Err) snd_io_strerror()
#define CLOSE(Fd, Name) snd_close(Fd, Name)
#define FCLOSE(Fd, Name) snd_fclose(Fd, Name)
#else
#define FOPEN(File, Flags) fopen((File), (Flags))
#define CREAT(File, Flags) creat((File), (Flags))
#define REMOVE(OldF) remove(OldF)
#define STRERROR(Err) strerror(Err)
#define CLOSE(Fd, Name) close(Fd)
#define FCLOSE(Fd, Name) fclose(Fd)
#endif
#ifndef S_set
#if (!HAVE_EXTENSION_LANGUAGE)
#define S_set "set-"
#else
#if HAVE_RUBY
#define S_set "set_"
#else
#if HAVE_SCHEME
#define S_set "set! "
#else
#if HAVE_FORTH
#define S_set "set-"
#endif
#endif
#endif
#endif
#endif
#define MUS_LOOP_INFO_SIZE 8
#define MUS_ALSA_API 0
#define MUS_OSS_API 1
#define MUS_JACK_API 2
#define G7XX 0
#define MUS_MAX_CHANS 256
#include "sndlib.h"
#if (HAVE_EXTENSION_LANGUAGE) /* make sndinfo for example sets this to 0 but does not change mus-config.h */
#include "xen.h"
#include "vct.h"
#endif
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.