Commit 776255b6 authored by IOhannes m zmölnig's avatar IOhannes m zmölnig

New upstream version 17

parent f81bd20a
Snd is a sound editor written by Bill Schottstaedt (bil@ccrma.stanford.edu).
Except where otherwise noted, it is Copyright 1996-2016 Bill Schottstaedt.
Except where otherwise noted, it is Copyright 1996-2006 The Board of Trustees
of Stanford University.
......
......@@ -4,11 +4,11 @@ Snd is a sound editor. It currently runs on nearly all
Unix-based systems, including Mac OSX and Cygwin.
To build Snd, get the sources from
ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-16.tar.gz
ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-17.tar.gz
gzip -d snd-16.tar.gz
tar xf snd-16.tar
cd snd-16
gzip -d snd-17.tar.gz
tar xf snd-17.tar
cd snd-17
./configure
make
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for snd 16.9.
# Generated by GNU Autoconf 2.69 for snd 17.0.
#
# Report bugs to <bil@ccrma.stanford.edu>.
#
......@@ -579,9 +579,9 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='snd'
PACKAGE_TARNAME='ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-16.tar.gz'
PACKAGE_VERSION='16.9'
PACKAGE_STRING='snd 16.9'
PACKAGE_TARNAME='ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-17.tar.gz'
PACKAGE_VERSION='17.0'
PACKAGE_STRING='snd 17.0'
PACKAGE_BUGREPORT='bil@ccrma.stanford.edu'
PACKAGE_URL=''
......@@ -1310,7 +1310,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures snd 16.9 to adapt to many kinds of systems.
\`configure' configures snd 17.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
......@@ -1359,7 +1359,7 @@ Fine tuning of the installation directories:
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root
[DATAROOTDIR/doc/ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-16.tar.gz]
[DATAROOTDIR/doc/ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-17.tar.gz]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
......@@ -1380,7 +1380,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of snd 16.9:";;
short | recursive ) echo "Configuration of snd 17.0:";;
esac
cat <<\_ACEOF
......@@ -1496,7 +1496,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
snd configure 16.9
snd configure 17.0
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
......@@ -1957,7 +1957,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by snd $as_me 16.9, which was
It was created by snd $as_me 17.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
......@@ -3304,7 +3304,7 @@ LOCAL_LANGUAGE="None"
GRAPHICS_TOOLKIT="None"
PACKAGE=Snd
VERSION=16.9
VERSION=17.0
#--------------------------------------------------------------------------------
# configuration options
......@@ -6691,7 +6691,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by snd $as_me 16.9, which was
This file was extended by snd $as_me 17.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
......@@ -6753,7 +6753,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
snd config.status 16.9
snd config.status 17.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
......
......@@ -5,7 +5,7 @@
# gmp, mpfr, and mpc deliberately have none!
AC_INIT(snd, 16.9, bil@ccrma.stanford.edu, ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-16.tar.gz)
AC_INIT(snd, 17.0, bil@ccrma.stanford.edu, ftp://ccrma-ftp.stanford.edu/pub/Lisp/snd-17.tar.gz)
AC_CONFIG_SRCDIR(snd.c)
AC_CANONICAL_HOST # needed by case $host below
......@@ -24,7 +24,7 @@ LOCAL_LANGUAGE="None"
GRAPHICS_TOOLKIT="None"
PACKAGE=Snd
VERSION=16.9
VERSION=17.0
#--------------------------------------------------------------------------------
# configuration options
......
This diff is collapsed.
(define* (linear-expr-1D data (generations 100))
(let ((size 100)
(range 1.0)
(data-size (length data)))
(let ((population (make-vector size)))
(define (initial-generation)
(do ((i 0 (+ i 1)))
((= i size))
(set! (population i) (vector (- (random range) (/ range 2)) (- (random range) (/ range 2))))))
(define (distance coeff offset)
(let ((dist 0.0))
(do ((k 0 (+ k 1)))
((= k data-size) dist)
(let ((err (- (data k) (+ (* coeff k) offset))))
(set! dist (+ dist (* err err)))))))
(define (next-generation)
(let ((distances (make-vector size 0.0)))
(do ((i 0 (+ i 1)))
((= i size))
(set! (distances i) (cons (distance ((population i) 0) ((population i) 1)) i)))
(sort! distances (lambda (a b) (< (car a) (car b))))
(do ((i (/ size 2) (+ i 1))
(j 0 (+ j 1)))
((= i size))
(let* ((loc (cdr (distances j))) ; location (in population) of a good one
(coeff ((population loc) 0)) ; its coeff
(offset ((population loc) 1)) ; and offset
(new-loc (cdr (distances i)))) ; location of the bad one
;(format #t "~D: replace ~A using ~A~%" j (distances i) (distances j))
(set! (population new-loc) (vector (+ coeff (- (random range) (/ range 2)))
(+ offset (- (random range) (/ range 2)))))))
(distances 0)))
(initial-generation)
(let ((last-dist size)
(best #f))
(call-with-exit
(lambda (done)
(do ((i 0 (+ i 1)))
((= i generations))
(set! best (next-generation))
;(format #t "~D: ~A ~A ~A~%" i range (car best) (population (cdr best)))
(if (< (car best) 1e-9)
(done))
(let* ((new-dist (car best))
(improvement (abs (- new-dist last-dist))))
(if (< improvement range)
(set! range (max 0.001 (* range 0.5)))
(if (> improvement range)
(set! range (min 1024.0 (* 2 range)))))
(set! last-dist new-dist)))))
(let ((simpler-coeff (rationalize ((population (cdr best)) 0) .1))
(simpler-offset (rationalize ((population (cdr best)) 1) .1)))
(let ((dist (distance simpler-coeff simpler-offset)))
(if (< dist (* 2 (car best)))
(format #f "~A * k + ~A, err: ~A~%" simpler-coeff simpler-offset dist)
(format #f "~A * k + ~A, err: ~A~%" ((population (cdr best)) 0) ((population (cdr best)) 1) (car best)))))))))
#|
(linear-expr-1D (let ((v (make-vector 100)))
(do ((i 0 (+ i 1)))
((= i 100))
(set! (v i) (+ 1 (* i 2))) )
v))
"2 * k + 1, err: 0.0"
(linear-expr-1D (let ((v (make-vector 100)))
(do ((i 0 (+ i 1)))
((= i 100))
(set! (v i) (+ 1 (- (random .01) .005) (* i 2))))
v))
"2 * k + 1, err: 0.00079150685524436"
;; so noise is not a problem
|#
(define *show-progress* #f)
(define* (poly-expr data (generations 100) (top-power 10) (xscale 1.0))
(let ((size 100)
(range 1.0)
(data-size (length data)))
(let ((population (make-vector size)))
(define (new-coeffs good-coeffs bad-coeffs power)
(let* ((len (length good-coeffs))
(coeffs (make-vector len 0.0)))
(do ((k 0 (+ k 1)))
((> k power) coeffs)
(let ((local-diff (/ (- (good-coeffs k) (bad-coeffs k)) 2.0)))
(set! (coeffs k) (+ (good-coeffs k) local-diff (- (random range) (/ range 2))))))))
(define (initial-generation power)
(let ((len (+ 1 power)))
(do ((i 0 (+ i 1)))
((= i size))
(set! (population i) (new-coeffs (make-vector len 0.0) (make-vector len 0.0) power)))))
(define (poly coeffs x power)
;; 0 => offset, 1 => x, 2 => x^2 etc
(if (= power 1)
(+ (coeffs 0) (* (coeffs 1) x))
(let ((sum (coeffs power)))
(do ((k (- power 1) (- k 1)))
((< k 0) sum)
(set! sum (+ (coeffs k) (* x sum)))))))
(define (distance coeffs power)
(let ((dist 0.0))
(do ((k 0 (+ k 1)))
((= k data-size) dist)
(let ((err (- (data k) (poly coeffs (* xscale k) power))))
(set! dist (+ dist (* err err)))))))
(define (iterate-distance coeffs power)
;; distance if using iterated function, rather than just polynomial
(call-with-exit
(lambda (return)
(let* ((dist 0.0)
(y 0.0))
(do ((k 0 (+ k 1)))
((= k data-size) dist)
(let ((err (modulo (- (data k) y) 2.0)))
(if (nan? err) ; modulo returns NaN if either arg is inf
(return 1.0e50))
(if (> err 1.0)
(set! err (- 2.0 err)))
(set! dist (+ dist (* err err)))
(set! y (poly coeffs y power))))))))
(define (display-expr coeffs power)
(do ((k power (- k 1)))
((= k 1))
(format #t "~,3g k^~D + " (coeffs k) k))
(format #t "~,3g k + ~,3g" (coeffs 1) (coeffs 0)))
(define (next-generation power)
(let ((distances (make-vector size 0.0)))
(do ((i 0 (+ i 1)))
((= i size))
(set! (distances i) (cons (distance (population i) power) i)))
(sort! distances (lambda (a b) (< (car a) (car b))))
(do ((i (/ size 2) (+ i 1))
(j 0 (+ j 1)))
((= i size))
(let* ((good-loc (cdr (distances j))) ; location (in population) of a good one
(good-coeffs (population good-loc)) ; its coeffs
(bad-loc (cdr (distances i))) ; location of the bad one
(bad-coeffs (population bad-loc))) ; its coeffs
(set! (population bad-loc) (new-coeffs good-coeffs bad-coeffs power))))
(distances 0)))
(do ((power 1 (+ power 1)))
((> power top-power))
(initial-generation power)
(let ((last-dist size)
(best #f))
(call-with-exit
(lambda (done)
(do ((i 0 (+ i 1)))
((= i generations))
(let ((new-best (next-generation power)))
(if (and *show-progress*
best
(< (car new-best) (car best)))
(begin
(format #t " ")
(display-expr (population (cdr new-best)) power)
(format #t ", err: ~,3g~%" (car new-best))))
(set! best new-best))
(if (< (car best) 1e-9)
(done))
(let* ((new-dist (car best))
(improvement (abs (- new-dist last-dist))))
(if (< improvement range)
(set! range (max 0.001 (* range 0.5)))
(if (> improvement range)
(set! range (min 1024.0 (* 2 range)))))
(set! last-dist new-dist)))))
(let ((simpler-coeffs (apply vector (map (lambda (x) (rationalize x .1)) (population (cdr best))))))
(let ((dist (distance simpler-coeffs power)))
(if (< dist (* 2 (car best)))
(begin
(display-expr simpler-coeffs power)
(format #t ", err: ~,3g~%~%" dist))
(begin
(display-expr (population (cdr best)) power)
(format #t ", err: ~,3g~%~%" (car best)))))))))))
#|
:(poly-expr (let ((v (make-vector 100)))
(do ((i 0 (+ i 1)))
((= i 100))
(set! (v i) (+ 1.5 (* i 2))))
v)
100 2)
()
2 * k + 3/2, err: 0.0
0 * k^2 + 2 * k + 3/2, err: 0.0
:(poly-expr (let ((v (make-vector 100)))
(do ((i 0 (+ i 1)))
((= i 100))
(set! (v i) (+ 1.5 (* i 2) (* i i))))
v)
100 2)
()
101 * k + -3231/2, err: 55527780.0
1 * k^2 + 2 * k + 3/2, err: 0.0
(poly-expr (let ((v (make-vector 100)))
(do ((i 0 (+ i 1)))
((= i 100))
(set! (v i) (+ 10 (* i 3) (* i i) (* 2 i i i))))
v)
500 3)
71211/4 * k + -775493/2, err: 5073746188744.4
298 * k^2 + -46797/4 * k + 282358/3, err: 142657213706.32
1.9999646468097 * k^3 + 1.0060760943148 * k^2 + 2.7343239562578 * k + 10.395190849075, err: 341.7343511583
(poly-expr (let ((v (make-vector 100)))
(do ((i 0 (+ i 1)))
((= i 100))
(set! (v i) (+ 10 (* i 3) (* i i) (* .02 i i i))))
v)
500 3)
279 * k + -16405/3, err: 889433525.53111
4 * k^2 + -114 * k + 4756/5, err: 16055636.02
0.01993019520734 * k^3 + 1.0122316382516 * k^2 + 2.423061574187 * k + 16.287894409628, err: 451.01103769494
if scaled by .01:
(poly-expr (let ((v (make-vector 100)))
(do ((i 0 (+ i 1)))
((= i 100))
(set! (v i) (+ 1.0 (* i 32 .01) (* i i 3 .01 .01) (* 1 i i i .01 .01 .01))))
v)
500 3 .01)
179/5 k + 1/3, err: 11.3
4.48 k^2 + 31.4 k + 1.05, err: 0.0357
1 k^3 + 3 k^2 + 32 k + 1, err: 4.76e-28
|#
......@@ -3531,10 +3531,10 @@ in the Scheme, Ruby, and Forth files.
(error 'no-such-region (list "region-&gt;float-vector" reg)))
((&lt; chn (channels reg))
(let* ((reader (<em class=red>make-region-sampler</em> 0 reg chn))
(len (region-framples reg))
(data (make-float-vector len)))
(do ((i 0 (+ i 1)))
(let ((reader (<em class=red>make-region-sampler</em> 0 reg chn))
(len (region-framples reg)))
(do ((data (make-float-vector len))
(i 0 (+ i 1)))
((= i len) data)
(set! (data i) (<em class=red>reader</em>)))))
......@@ -9343,14 +9343,12 @@ at the loop points:
</p>
<pre class="indented">
(define (mark-sf2)
(let sf2it ((lst (soundfont-info)))
(if (pair? lst)
(let ((vals (car lst)))
(let ((m1 (add-mark (cadr vals))))
(set! (mark-name m1) (car vals)))
(add-mark (caddr vals))
(add-mark (cadddr vals))
(sf2it (cdr lst))))))
(for-each (lambda (vals)
(let ((m1 (add-mark (cadr vals))))
(set! (mark-name m1) (car vals)))
(add-mark (caddr vals))
(add-mark (cadddr vals)))
(soundfont-info)))
</pre>
<img class="indented" src="pix/bongo.png" alt="soundfont marks">
......@@ -9685,9 +9683,9 @@ how long the resultant note will be given an src envelope:
(define (<em class="noem">src-duration</em> e)
(let* ((len (length e))
(all-x (- (e (- len 2)) (e 0))) ; last x - first x
(dur 0.0))
(do ((i 0 (+ i 2)))
(all-x (- (e (- len 2)) (e 0)))) ; last x - first x
(do ((dur 0.0)
(i 0 (+ i 2)))
((&gt;= i (- len 2)) dur)
(let* ((x0 (e i))
(x1 (e (+ i 2)))
......@@ -11297,9 +11295,9 @@ Here's an example that displays a histogram of the current values in 16 bins:
(step (/ 1.0 len))
(i 0 (+ i 1)))
((= i len) v)
(let* ((val (<a class=quiet href="#readsample">read-sample</a> fd))
(bin (floor (* (abs val) 16.0))))
(do ((j 0 (+ j 1)))
(let ((val (<a class=quiet href="#readsample">read-sample</a> fd)))
(do ((bin (floor (* (abs val) 16.0)))
(j 0 (+ j 1)))
((= j steps))
(set! (v (+ j bin)) (+ step (v (+ j bin)))))))))
</pre>
......
Freeverb - Free, studio-quality reverb SOURCE CODE in the public domain
-----------------------------------------------------------------------
Written by Jezar at Dreampoint - http://www.dreampoint.co.uk
Introduction
------------
Hello.
I'll try to keep this "readme" reasonably small. There are few things in the world that I hate more than long "readme" files. Except "coding conventions" - but more on that later...
In this zip file you will find two folders of C++ source code:
"Components" - Contains files that should clean-compile ON ANY TYPE OF COMPUTER OR SYSTEM WHATSOEVER. It should not be necessary to make ANY changes to these files to get them to compile, except to make up for inadequacies of certain compilers. These files create three classes - a comb filter, an allpass filter, and a reverb model made up of a number of instances of the filters, with some features to control the filters at a macro level. You will need to link these classes into another program that interfaces with them. The files in the components drawer are completely independant, and can be built without dependancies on anything else. Because of the simple interface, it should be possible to interface these files to any system - VST, DirectX, anything - without changing them AT ALL.
"FreeverbVST" - Contains a Steinberg VST implementation of this version of Freeverb, using the components in (surprise) the components folder. It was built on a PC but may compile properly for the Macintosh with no problems. I don't know - I don't have a Macintosh. If you've figured out how to compile the examples in the Steinberg VST Development Kit, then you should easilly figure out how to bring the files into a project and get it working in a few minutes. It should be very simple.
Note that this version of Freeverb doesn't contain predelay, or any EQ. I thought that might make it difficult to understand the "reverb" part of the code. Once you figure out how Freeverb works, you should find it trivial to add such features with little CPU overhead.
Also, the code in this version of Freeverb has been optimised. This has changed the sound *slightly*, but not significantly compared to how much processing power it saves.
Finally, note that there is also a built copy of this version of Freeverb called "Freeverb3.dll" - this is a VST plugin for the PC. If you want a version for the Mac or anything else, then you'll need to build it yourself from the code.
Technical Explanation
---------------------
Freeverb is a simple implementation of the standard Schroeder/Moorer reverb model. I guess the only reason why it sounds better than other reverbs, is simply because I spent a long while doing listening tests in order to create the values found in "tuning.h". It uses 8 comb filters on both the left and right channels), and you might possibly be able to get away with less if CPU power is a serious constraint for you. It then feeds the result of the reverb through 4 allpass filters on both the left and right channels. These "smooth" the sound. Adding more than four allpasses doesn't seem to add anything significant to the sound, and if you use less, the sound gets a bit "grainy". The filters on the right channel are slightly detuned compared to the left channel in order to create a stereo effect.
Hopefully, you should find the code in the components drawer a model of brevity and clarity. Notice that I don't use any "coding conventions". Personally, I think that coding conventions suck. They are meant to make the code "clearer", but they inevitably do the complete opposite, making the code completely unfathomable. Anyone whose done Windows programming with its - frankly stupid - "Hungarian notation" will know exactly what I mean. Coding conventions typically promote issues that are irrelevant up to the status of appearing supremely important. It may have helped back people in the days when compilers where somewhat feeble in their type-safety, but not in the new millenium with advanced C++ compilers.
Imagine if we rewrote the English language to conform to coding conventions. After all, The arguments should be just as valid for the English language as they are for a computer language. For example, we could put a lower-case "n" in front of every noun, a lower-case "p" in front of a persons name, a lower-case "v" in front of every verb, and a lower-case "a" in front of every adjective. Can you imagine what the English language would look like? All in the name of "clarity". It's just as stupid to do this for computer code as it would be to do it for the English language. I hope that the code for Freeverb in the components drawer demonstrates this, and helps start a movement back towards sanity in coding practices.
Background
----------
Why is the Freeverb code now public domain? Simple. I only intended to create Freeverb to provide me and my friends with studio-quality reverb for free. I never intended to make any money out of it. However, I simply do not have the time to develop it any further. I'm working on a "concept album" at the moment, and I'll never finish it if I spend any more time programming.
In any case, I make more far money as a contract programmer - making Mobile Internet products - than I ever could writing plugins, so it simply doesn't make financial sense for me to spend any more time on it.
Rather than give Freeverb to any particular individual or organisation to profit from it, I've decided to give it away to the internet community at large, so that quality, FREE (or at the very least, low-cost) reverbs can be developed for all platforms.
Feel free to use the source code for Freeverb in any of your own products, whether they are also available for free, or even if they are commercial - I really don't mind. You may do with the code whatever you wish. If you use it in a product (whether commercial or not), it would be very nice of you, if you were to send me a copy of your product - although I appreciate that this isn't always possible in all circumstances.
HOWEVER, please don't bug me with questions about how to use this code. I gave away Freeverb because I don't have time to maintain it. That means I *certainly* don't have time to answer questions about the source code, so please don't email questions to me. I *will* ignore them. If you can't figure the code for Freeverb out - then find somebody who can. I hope that either way, you enjoy experimenting with it.
Disclaimer
----------
This software and source code is given away for free, without any warranties of any kind. It has been given away to the internet community as a free gift, so please treat it in the same spirit.
I hope this code is useful and interesting to you all!
I hope you have lots of fun experimenting with it and make good products!
Very best regards,
Jezar.
Technology Consultant
Dreampoint Design and Engineering
http://www.dreampoint.co.uk
//ends
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>freeverb for clm-2</title>
<style type="text/css">
A.quiet {color:black; text-decoration:none}
A.quiet:hover {text-decoration:underline}
EM.def {font-weight: bold; font-style: normal; text-decoration:none; text-color:black}
PRE.indented {padding-left: 1.0cm;
}
BODY.body {background-color: #ffffff; /* white */
margin-left: 0.5cm;
margin-right: 1.0cm;
}
DIV.topheader {margin-top: 10px;
margin-bottom: 40px;
border: 4px solid #00ff00; /* green */
background-color: #f5f5dc; /* beige */
font-family: 'Helvetica';
font-size: 30px;
text-align: center;
padding-top: 10px;
padding-bottom: 10px;
}
DIV.innerheader {margin-top: 60px;
margin-bottom: 30px;
border: 4px solid #00ff00; /* green */
background-color: #eefdee; /* lightgreen */
padding-left: 30px;
width: 50%;
padding-top: 20px;
padding-bottom: 20px;
}
</style>
</head>
<body class="body">
<div class="topheader"><a href="freeverb.ins" class="quiet">freeverb</a>: a multichannel reverb instrument</div>
<p>translated to clm-2 by <a href="http://www-ccrma.stanford.edu/~nando/">Fernando Lopez-Lezcano</a>, <a href="mailto:nando@ccrma.stanford.edu">nando@ccrma.stanford.edu</a>
</p>
<p>Freeverb, a free studio-quality reverb, was created by <strong>Jezar Wakefield</strong> at <a href="http://www.dreampoint.co.uk/">Dreampoint Design and Engineering</a>. Here's the <a href="readme.txt">readme.txt</a> that is part of the <a href="http://home.onet.co.uk/~jzracc/source_code.htm">C++ source package</a> I downloaded. This clm-2 instrument uses the same reverberation model and tuning for the filters as the original freeverb source code. </p>
<p>Here's a list of some differences with respect to the original freeverb code:</p>
<ul>
<li>freeverb.ins can process either mono or multichannel input soundfiles, in the latter case the input and output number of channels must match. This has been tailored to function with <a href="http://www-ccrma.stanford.edu/~nando/clm/dlocsig/">dlocsig</a>, a multichannel spatialization unit generator for clm. The latest version of dlocsig can output to multichannel reverberation streams and can thus generate local and global reverberation.
<li>there no <em>wet</em> parameter to freeverb.ins as it would not apply to the way clm generates and processes reverberation.
<li>the name of the <em>width</em> parameter has been changed to <em>global</em>, which better reflects the effect in a multichanenl environment
<li>it has predelays
<li>it is possible to control damping individually in each channel
</ul>
<div class="innerheader">Parameters</div>
<p>All parameters have similarly named global bindings that you can use in a <em>let</em> statement to change the behavior of the reverberator (instead of passing parameters to the reverb instrument through <em>:reverb-data</em> in a <em>with-sound</em>). Prepend <em>freeverb-</em> to the parameter name to get the global binding name. </p>
<pre class="indented"><em class=def id="start-time">start-time</em></pre>
<p>Start time of the instrument in the output stream (this is normally supplied automatically by <em>with-sound</em>). <p>
<pre class="indented"><em class=def id="duration">duration</em></pre>
<p>Duration of the reverberation (this is normally supplied automatically by <em>with-sound</em>, use the <em>:decay-time</em> parameter to allow the reverb to ring for more time). </p>
<pre class="indented"><em class=def id="room-decay">room-decay</em></pre>
<p>Determines the decay time of the reverberation. </p>
<pre class="indented"><em class=def id="damping">damping</em></pre>
<p>High frequency damping. This parameter can be a number, or an array or list (with same number of elements as output channels). It is possible to control the damping for each output channel. </p>
<pre class="indented"><em class=def id="global">global</em></pre>
<p>Controls how the outputs of all reverbs (one per channel) is mixed into the output stream. Specifying "0" will connect each reverberator directly to each output channel, "1" will mix all reverberated channels equally into all output channels. Intermediate values will allow for an arbitrary balance between local and global reverberation. The overall gain of the mixing matrix is kept constant. See <b>output-mixer</b> for a complete override to this parameter. </p>
<pre class="indented"><em class=def id="predelay">predelay</em></pre>
<p>Determines the predelay that is applied to the input streams. An array or list lets you specify the individual predelays for all chanenels. </p>
<pre class="indented"><em class=def id="output-gain">output-gain</em></pre>
<p>Overall gain multiplier for the output streams. Its default value is 1.0.</p>
<pre class="indented"><em class=def id="output-mixer">output-mixer</em></pre>
<p>Overrides <b>global</b> and sets the output mixing matrix directly (for example, you might want to change the contribution to global reverb of a particular channel so that it is proportional to the distance between speakers). </p>
<hr>
<table><tr><td><!--- <img src="/CCRMA/Images/Logo:Small.gif" alt=""> -->
<td><p>&copy; 2001 Fernando Lopez-Lezcano. All Rights Reserved.<br>
Created and mantained by Fernando Lopez-Lezcano,
<a href="mailto:nando@ccrma.stanford.edu">nando@ccrma.stanford.edu</a></p>
<!-- Created: Wed Jan 24 20:05:29 PST 2001 -->
<!-- hhmts start -->
Last modified: Mon Feb 13 2:55:00 PST 2012 (by BIL, reformatted for HTML5)
<!-- hhmts end -->
</table>
</body>
</html>
......@@ -86,7 +86,7 @@
(format () ";;; freeverb: ~d input channels, ~d output channels~%" in-chans out-chans))
(if (and (> in-chans 1)
(not (= in-chans out-chans)))
(error "input must be mono or input channels must equal output channels"))
(error 'wrong-type-arg "input must be mono or input channels must equal output channels"))
(let ((out-mix (or output-mixer
(let ((v (make-float-vector (list out-chans out-chans))))
......
(define-envelope pna '(0 0 1 1 10 .6000 25 .3000 100 0 ))
(define-envelope ind2 '(0 1 25 .4000 75 .6000 100 0 ))
(define-envelope high_att_ind '(0 1 25 .2000 75 .4000 100 0 ))
(define-envelope no_att_ind '(0 .6000 75 .6000 100 0 ))
(define-envelope no_dec_ind '(0 1 25 .4000 75 .6000 100 .6000 ))
(define-envelope no_att_or_dec_ind '(0 .6000 100 .6000 ))
(define-envelope ampf '(0 0 25 1 60 .7000 75 1 100 0 ))
(define-envelope rampf '(0 0 100 1 ))
(define-envelope fast_up '(0 0 25 1 100 1 ))
(define-envelope slow_up '(0 0 25 0 100 1 ))
(define-envelope tapf '(0 0 1 1 99 1 100 0 ))
(define-envelope skwfrq '(0 -1 5 .2500 10 0 100 .1000 ))
(define-envelope oldpizzf '(0 0 1 1 5 .6000 10 .3000 25 .1000 100 0 ))
(define-envelope newpizzf '(0 0 1 1 5 .6000 10 .3000 25 .1000 99 .0200 100 0 ))
(define-envelope pizzf '(0 0 1 1 5 .6000 10 .3000 25 .1000 100 0 ))
(define-envelope legatof '(0 0 30 1 90 1 100 0 ))
(define-envelope marcatof '(0 0 3 1 10 .8000 95 1 100 0 ))
(define-envelope onef '(0 1 100 1 ))
(define-envelope mod_up '(0 0 25 0 75 1 100 1 ))
(define-envelope mod_down '(0 1 25 1 75 0 100 0 ))
(define-envelope one_to_zero '(0 1 75 1 100 0 ))
(define-envelope zero_to_one '(0 0 75 0 100 1 ))
(define-envelope down_flat '(0 1 25 0 75 .0500 100 0 ))
(define-envelope down_down '(0 1 25 0 75 .0500 100 -1 ))
(define-envelope down_up '(0 1 25 0 75 .0500 100 1 ))
(define-envelope flat_down '(0 -.1000 10 .1000 25 0 75 .0500 100 -1 ))
(define-envelope flat_up '(0 -.1000 10 .1000 25 0 75 0 100 1 ))
(define-envelope up_flat '(0 -1 25 .0500 75 0 100 0 ))
(define-envelope up_up '(0 -1 25 .0500 75 0 100 1 ))
(define-envelope up_down '(0 -1 25 .0500 75 0 100 -1 ))
(define-envelope swellf '(0 0 25 .8000 50 1 75 .8000 100 0 ))
(define-envelope fpf '(0 0 25 1 50 .3000 75 .3000 100 0 ))
(define-envelope indswell '(1 1 25 .4000 75 1 100 0 ))
(define-envelope pyr '(0 1 25 .1000 95 .1000 100 0 ))
(define-envelope fbell '(0 1 2 1.1000 25 .7500 75 .5000 100 .2000 ))
(define-envelope lowbell '(0 1 5 1.2500 25 .8000 75 .5000 100 .2000 ))
(define-envelope abell '(0 0 .1000 1 10 .6000 25 .3000 50 .1500 90 .1000 100 0 ))
(define-envelope dwnup '(0 1 10 .4000 20 1 35 .3000 45 .8000 60 .2000 80 .6000 100 0 ))
(define-envelope up50down '(0 0 50 1 100 0 ))
(define-envelope metalamp '(0 0 .5000 1 5 1 10 .5000 15 .2500 35 .1000 100 0 ))
(define-envelope slowupfastdown '(0 0 25 1 97 1 100 0 ))
(define-envelope slowup '(0 0 50 .1000 95 1 100 0 ))
(define-envelope indtoone '(0 1 25 .4000 100 .6500 ))
(define-envelope whoosh '(0 0 75 .1000 90 .3000 97 .6000 100 1 ))
(define-envelope mamp '(0 0 50 1 100 0 ))
(define-envelope n_amp '(0 0 65 1 100 0 ))
......@@ -4455,7 +4455,7 @@ static void define_functions(void)
{
#if HAVE_SCHEME
static s7_pointer s_boolean, s_integer, s_real, s_any;
static s7_pointer pl_bit, pl_bi, pl_t, pl_ttri, pl_ttit, pl_ttr, pl_ttir, pl_ttb, pl_tti, pl_ttiti, pl_ttrriir, pl_ttititiiti, pl_ttititi, pl_ttrri, pl_ttrrri, pl_tb, pl_bt, pl_iiiiitiiit, pl_iiiiiiiit, pl_iiiiiiiiiiit, pl_iiiiiiit, pl_iiiiiiiiiit, pl_iiiiiit, pl_iiiiiiiiit, pl_irrrt, pl_irrrrtttrrt,