Files to check and merge:
    cmt/userio.c
    cmt/userio.h
    lib/pianosyn.lsp
    lib/piano/*.pcm -- these are "in the way"
    sys/win/msvc/winstuff.c
    xlisp/xlftab.c

Nyqwin needs a "recall previous expression" button

Test RMS
-------

Reminds me -- did I get my new filters and stuff for Nyquist to you?
www.cs.cmu.edu/~eli/tmp/eub-nyquist.tar

Eli

THESE ARE NOW MERGED IN, BUT UNDOCUMENTED (done)
FIX FILTERS TO DO MULTICHANNEL FOO (not done)
ALSO DOCUMENT BYTESWAP PARAMETER ON SOUND OPEN IF NOT DONE YET (done)

look at eubutil in lib and clean up, merge with nyquist runtime
and documentation: (done)

include exp-dec, osc-saw, osc-pulse, osc-tri, osc-pulse-dur (done)

need examples for these (not done)

-------

audio.nt is out of date -- check aura sources
gate.c, line 183 -- need to fix it in gate.alg
sndcvt.c has warning message -- check aura sources
bring in fft code

--------

(defun tone (pitch mi)
  (fmosc pitch (partial pitch (pwl 0.05 mi 1.0))))

(play (tone c4 2))

--------

port to SGI (again)

--------

implement cue-file

--------

run samplertest.lsp then remove disclaimer from manual

--------

typecheck in seq and seqrep to give good error message if channels are not 
compatible

------

fix, test seqmidi take note, ctrl, prgm, etc.
-----

multiseq.c assumes all signals have same sample rate.  I think this could
be fixed merely by saving an array of sample rates so that zero signals
of the proper rate could be generated later.  Also be sure to free the
array of sample rates when the multiseq struct is freed.

----

I copied audiors6k.c file to audiosparc.c
as you suggested, and got the following errors

Compile time:
* missing definitions, added in snd/snd.c:
#define  O_RDWR          2   /*AE*/
#define     O_RDONLY        0 /*AE*/
#include <unistd.h>
#define L_SET SEEK_SET
#define L_INCR SEEK_CUR

* type error, repaired:

sys/unix/osstuff.c:/*AE*/ long osrand(n) long n;	 \{return (((long) 
random()) % n);\}

* core dump on gprintf, solution:

cmt/userio.h: 10

#define DONT_USE_CMT_IO xx /*AE*/

Runtime:

* warnings about missing variables, full-name-p and file-seperator,
these were in the mac directory, a quick fix as you can see:

; AE
; FULL-NAME-P -- test if file name is a full path or relative path
;
; (otherwise the *default-sf-dir* will be prepended
;
(defun full-name-p (filename) (eq 1 1))
  ;(eq (char filename 0) #\\:))

(setf *file-separator* "/")

The result, the example

(play (osc 60))  ;

gives a rough noise, not very sinewave.
But anyway, it is a start


================

Subject: Nyquistic Watch: User's Manual

Nyquistic Watch
Some Early Recollections on Nyquist and the need for a
Nyquist Users Manual
(Nathaniel Bobbitt)

It is 2:30 a.m. and my nyquist watch is vigilant!

The problem  I have exprienced so far with Nyquist has been the 
presentation of the system.  You have made the manual too lisp-ish!

In a word compare your manual with Touretsky's book. The manual has some 
problems.  Your approach has been too legalistic

You have formulated rules for Nyquistic without pointing to how those rules 
lead to something more far reaching, a tool for analysis/resynthesis and a 
tool for flexible parameterization and transformation of environments.  You 
have the basis for a Formalized Music for musical digital signal processing. Do you realize 
that?!!!  Ok it is one thing to use lisp!
There are advantages and I do want to learn lisp better during my residency.
(At present I must focus on capturing sounds, getting ready for a 
performance, and finding something distinctive (sonic) which I can say 
NYQUIST helped me do it!!.  Your lisp approach borders on a certain kind of abstraction in the 
discourse of your presentation.  Lisp has invaded how you present what you 
say.  There is an absence of things so native to you... a graphic 
orientation. The lack of graphic illustrations in each chapter in a formatted way would 
be very helpful to introduce, narrate, and summarize chapter by chapter.

Addtionally, there is more theory on concepts which is missing.  Your 
lisp/warp approach leads to more concepts which emerge from the radical 
(inventive) approach in Nyquist.  This has not been followed through in a 
step by step fashion.

Each chapter requires:

* Programming Instructions (this is done)
* Programming Tips (this need more work)
* Programming Misconceptions (this you do at times)
* Conceptual overview
    1. details for particular cases
    2. generalization of the particular cases
    3. summary notes for each chapter
The idea of a user manual in addition to a documentation manual
for nyquist is in order.

Something with more step by step instructions. You may not have a graphic 
interface but the manual could have a more graphic approach to nyquist.

There are things which just are not simply illustrated, explained and, 
documented.  The absence of a Panning Macro is an other example.  Also, a 
section of Nyquist Macro's. I

There are some bullet points conceptual/music compositional issues which 
are missing.

The issue of analysis/resynthesis within nyquist is not spelled out. Since 
the technique of analysis/resynthesis was such a force in the creation of 
Nyquist you could think of gearing your presentation of Nyquist in those 
terms within a User's Manual for Nyquist.  The point of which is to give a better presentation of 
Nyquist as a tool for analysis/resynthesis rather than a theory on 
analysis/resynthesis.

An example of the problem with the manual is evident in the \
like of treatment of say recorded samples (soundfiles and sound synthesis):

1. mono
2. stereo
3. mixing

There is the additional question of using a soundfile to go between one of 
these 3 cases.  All of this would fill a section on Multichannels.  
There are sets of terminology which could be listed at the start of each 
chapter which could be organized in some kind of concept graph.  \

Warping
Behavior
Abstract Behavior:
    * Parameterization of Behaviors
    * Flexibility of Parameterization \
Transformation
Transformation Environment

These ideas are very dense and need more development within a user's manual.
In part the matter of warping in nyquist and time-warping Practices could 
also be discussed (discrete and continuous).

So maybe I am not so stupid and my lack of fluency is a function of 
entering Nyquistic Mysteries.  The first step is to work on the level of 
channels

mono vs. multichannels.  The Nyquistic Mysteries in part is leaving behind 
a Music V vision in favor of a more abstract version.

After your presentation I will call you on this to talk about this. \
If you like if not then I'll keep on snoring by myself, as usual.

================

    I just ran some more tests.  (trumpet c4) doesn't work for me even
without a stretch, although (trumpet a4) and (stretch 2.0 (trumpet a4))
both work fine.  Do you have any pointers as to where I should start
looking for errors?  I have no idea why pitch and length would be
related.  I was having a problem before with a hard-wired pitch value,
but since the notes seem to sound fine, I think that's been fixed.


Excerpts from music.computer: 29-Sep-95 Re: more on the gabrieli er.. by
Roger.Dannenberg@cs.cmu. \
>         This morning I discovered that (stretch 2.0 (trumpet c3)) has
the same
>  \
> problem as (b_3).  Unfortunately, trumpet is pretty big, and I'm not
> sure where the bug is.  If you have any idea why the duration of a
> stretched TRUMPET or something within it would be about 1.987 instead of
> 2.0, let me know.  I'll look some more this weekend.

==================

DONE check for negative stretch factor and break


=============

TESTED, SEEMS OK s-save of extract of something seems to save entire sound, ignoring 
transformation 

==============

DONE finish snd_flush in audiont.c

DONE uncomment "include sndfnintdefs.h" in localdefs.h
DONE uncomment "include sndfnintptrs.h" in localptrs.h
??? check out EXIT and exit when you add cmt functions
DONE add seqext.c
DONE fix warnings in intgen

DONE debug resamp: probe is printing filter * signal terms before their summation
    use: ./ny
    (load "resample/resample")
    (test)
      -- look at SrcUp where v is stored.  Somehow, the right answer is computed 
    but not returned properly.  Probe.log is working and shows return values before
    scaling

DONE Manual needs globals, including *plotscript-file*

----

DONE Manual needs search path info

----

TESTED, SEEMS OK  reson with flag of 2 doesn't seem to normalize properly (but note resonvv has been "fixed" since this complaint - at least we need to check out the normalization option

----

DONE exponentials with 2 points like csound

----

DONE compute and print samples out of range when saving file

---- \


DONE eliminate tone and atone (document and index them though)

----

DONE sgi.lsp is missing default settings, also should say (s-save ,expr ...

----

DONE:

 here they are (along with handy descriptions):
(play (ster (accel_bleerps) (stretch 4 (ramp)))) ; Seems to work (kinda')
(play (ster (bleerps) (stretch 2.4 (ramp)))) ; no sound
(play (ster (bleerps) (stretch 6 (ramp)))) ; Sound panned left (as if pan=1)
(play (ster (scale 0.5 (osc 50 3)) (lfo 2 3))) ;  Works.
(play (ster (scale 0.5 (bleerps)) (lfo 2 6))) ; Works with long LFO 
durations
(play (seqrep (i 10) (scale 0.5 (ster (osc 46 0.5) (* i 0.1))))) ; No 
panning occurs!
(play (ster (osc 46 0.2) 0.1)) ; Works: pan = 0.1, right speaker

You'll need comp1.lsp loaded to use some of those functions. Enjoy! ;-)

----------------

DONE ; this causes a crash sometimes:

(defun ster(sound pan)
    (vector (mult sound pan)
        (mult sound (sum 1 (mult -1 pan)))))

(play (seqrep (i 10) (ster (osc 46 0.2) (* i 0.1))))

[see rbd.lsp for more tests, seems to be a snd_type allocation/free 
problem.  Non reusing from freelist helps.

I recompiled with freelist as is to work towards a failure.  Then develop 
small example and start tracing block addresses to see where we're freeing 
an in-use block. Some preliminary test code is marked with /* DEBUG */
]

------

DONE DEBUG marks places to clean up

------

DONE seqrep doesn't handle multi channel sounds

------

DONE need: reciprocal, s-exp, s-log

------

DONE investigate comb feedback calculation: where does it get sample-rate 
dependency?->from loop len

------

DONE look at sustain for const, white noise, rest, etc.  \

Should sustain be pre or post warp?  Right now it is post, i.e., sustains
are not warped -- probably the wrong thing. (After fix on 2Dec97, 
sustains apply before warping inside get-duration.

----
DONE fix map bug in xlisp

-------

DONE release trnsrc

-------

DONE document building UGs

-------

DONE document (shape...)

------

SEEMS OK look at sim with non-overlapping functions

------

DONE (setf len 4)
(setf mod 
  (mult 
    (pwl 0.001 1000 (/ len 5) 200 (/ len 2) 2000 len 16000 (+ len 0.001))
    (fmosc c4 (pwl 0.001 1 (/ len 2) 3.25 len .74 (+ len 0.001)))))

(s-max (pwl 0.001 1000 (/ len 5) 200 (/ len 2) 2000 len 16000 (+ len 
0.001)) 1000000)

;Entering: SND-PWL, Argument list: (0 2205 (2 1000 0 200 4410 2000 8820 
16000 8822))
(s-max mod 1000000)  <-- this causes a mem fault
(setf env (env (* len 0.15) (* len 0.15) (* len 0.2) 1 .6 .5 ))
(play (fmosc c4 mod))
(play (sim ( mult env (fmosc c4 mod)
    ( at 0.1 ( mult env (fmosc f5 mod))))))

-----------------------------------

DONE
Message written at 26 Mar 1995 19:28:12 +0100

I had a number of problems.

1: PWL.C
========
The function pwl__fetch in the file pwl.c contains an ANSI error.
It calls
line 105
           if (compute_lvl(susp) || compute_incr(susp, &n, cur)) goto out;

but compute_incr needs a long* as the second argument, and n is
declared as an int.  I changed the declaration

void pwl__fetch(register pwl_susp_type susp, snd_list_type snd_list)
\{
    int cnt = 0; /* how many samples computed */
    int togo;
    long n;			/* Was int */
    sample_block_type out;
    register sample_block_values_type out_ptr;
......

2: MIDIFNS.C
============
Line 1549 says

#endif sgi

which is not allowed in ANSI C.  I changed it to

#endif /* sgi */


3: SNDWRITE.C
=============

Line 49 reads
    if ((fout = creat(filename, PERMS)) < 0) \{
while it needs to be for SGI
    if ((fout = creat((const char*)filename, PERMS)) < 0) \{

I would have thougyt it needed that for other UNIX machines.

4: CP COMMAND
=============

I do not have a -p option on my cp command.  What is it supposed to
do?

5: INTGEN
=========
I have not yet understood this one

writing seqfnint.c ...
  seqdecls.h
  seqext.h
  seq.h
Error: unknown type: event_type, assuming void
Error: unknown type: event_type, assuming void
Error: unknown type: event_type, assuming void
Error: unknown type: event_type, assuming void
  seqinterf.h
writing seqfnint.lsp ...


I think it is the typedef declaration of event_type which is not ANSI
on line 107 of seq.h
I am experimenting with..

    struct note_struct note;
    struct ramp_struct ramp;
    struct seti_struct seti;
    \} u;
\} event_node;

typedef event_node *event_type;

as I think that it what is meant.

----------------------------------------------------------------------

DONE So far teh examples have not worked either;

 > (ex-all)

(EX1)

Saving sound file to /tmp/test
error: sound_save: expression did not return a sound - (OSC 60)

--------------------------------

DONE add resampling code

--------------------------------

DONE clipping code doesn't work and is now disabled - the fix involves a 
separate representation for the logical start time of a sound (used by some 
functions like cue to move the sound to a particular time) and the physical 
start time of a sound (which may differ due to clipping).  It looks like there is a time and 
t0 already in  the sound header structure for this purpose, but it is not used that way.

3B) There's another problem with translate.lsp, the 'SCALE method is the
same as no interpolation except the scale factor is multiplied.  In some
algorithms, e.g. add, you should always have at least one argument that
does not need interpolation, but this may either be accessed using the
'NONE or the 'SCALE method.  So maybe only one arg should get scaling and
the other taken care of by setting the result scale factor.

OBSOLETE 5) find out if in-line interpolation saves anything.
Also I had to switch bytesex of soundfiles (it would be a nice feature
to give an additional keyword for a known bytesex to s-read as well as
one for unsigned raw sample-data).

-------------------------------

DONE sndwrite allocates a write buffer before knowing how big it should be
the buffer will not be freed if there is an error evaluating the expression

DONE new primitives to add or replace to existing files

DONE looks like snd-partial and snd-sine have funny parameter orders

DONE allow non-A440 basis, allow non-chromatic scale for trans

DONE document snd-extent

DONE document maketable works with sizes up to 1Msamples

DONE: put comments in tutorial.lsp to cross reference with manual

DONE: *artic* -- articulation in environment

DONE: document tuning of A4 a variable

--------------

DONE: bug:

(load "examples")
(ex37)
(play (seq (cue short) (cue short)))

--> this must be an extract-related bug, I found that the value of 
susp->s1->current is less than the value of susp->susp.current, and the 
initial value of susp->s1->current was -2205 (1/10 second - sounds wrong). 
 After fetching the first block s1->c

urrent went to 0, not 3 or 4.

Try simple experiments on extract and then cue'ing extracted sounds.

---

DONE fix pwl to accept even number of data points.  The last amplitude 
value should be pushed back to be the penultimate sample, and the last time 
value should indicate where the ultimate value (0) falls.  If the first 
time is 0, the first sample should be non-zero (no rise time).

DONE see nydemo/demo.lsp for work in progress - the current bug is in 
breakpoints-convert - it should be modified to handle multiple points at 
the same time by advancing one sample for each point.  This would allow 
things like square pulses to be more

 easily specified and would prevent very short segments from being dropped 
entirely as in  a square pulse.

DONE sine.c doesn't get \
    susp->susp.log_stop_cnt = UNKNOWN;
in it's init -- need to fix translator.

DONE
    I ASSUMED THIS IS TRUE AND MADE THE FIX:
could write-initial-logical-stop-cnt in writemake.lsp simply write 
susp->susp.log_stop_cnt = UNKNOWN; and let the lsc get computed in the 
fetch routine?

DONE initialization of log_stop_cnt was changed in the automatically 
generated code, but not in the hand-generated code.  Make sure there aren't 
any cases of up-sampling where the old code is wrong.

DONE see the note on logical_stop_cnt_cvt in sound.h - is this a bug?

DONE (added it back in)
We removed logical_stop_cnt_cvt -- it doesn't seem necessary, but now
see test/downsampletest.lsp: the logical stop count is not set in
snd-down.  Probably doesn't work many other places too.

DONE run nydemo/demo.lsp (play...) expression after starting ny.  It 
crashes because the gc is not marking the pwl breakpoint list.  Find out 
how GC gets to "hidden" sound in sound_save, and try using watch to confirm 
that gc is marking the suspensions 
(currently they are not being marked, confirmed by breakpoint on 
pwl_mark.)

DONE fix sound.c sref to stop searching after sound terminates and return 0

DONE makefile.lsp

DONE compose: \

DONE copy .lsp files to src directory too

DONE test without links to directories

DONE bps is confusing, rename to bits (see sndheader, sndread, multiread, 
sndwrite)

DONE input formats:
    WAV	DONE
    CMIX(bsd) DONE

DONE output formats:
    WAV	DONE
    CMIX(bsd) DONE
    ulaw	DONE
    16bit	DONE
    float	DONE

DONE switch to cc?

DONE copy .h files to src directory too

DONE need to add conversion routines to read loops based on mode & bps

DONE work on fileio.c, using sndheader.c and sndheader.h

DONE ny bombs.  Tracing from multiread_fetch at line 126, we go to 
snd_list_unref, where the refcount is 8196!

DONE test new seqrep

DONE make Unix not use special char io to be compatible with Andrew 
Typescript

DONE play.lsp -> rs6kplay.lsp

DONE paths for .lsp libraries?

DONE make tuning of A4 a variable

DONE handle multichannel sounds in seq and seqrep

DONE NYPATH or some way to invoke from another directory
    look at example after defun cue in nyquist.lsp - doesn't work

DONE	add.c at 45%

DONE	make LP, HP, BP, etc. from snd-tone, etc.

DONE	take out (STEP-FUNCTION hz) from tonev.alg and look at generated code,
    should have lots of depends variable updates in inner loop

DONE	tone_ni_fetch, tone_nr_fetch - need filter parameter fixups

DONE	(snd-lp, etc

DONE	(snd-white-noise t0 sr dur)

DONE	modify to (snd-read file offset t0 srate dur nchans)

DONE	(snd-read file offset srate nchans)

DONE	in samples.c, implement (snd-from-array t0 sr array)

DONE see ~dandb/bin/r3 to fire up X11 with display postscript

DONE see /usr/lpp/DSP for examples

DONE see (fmosc-test-1) in nytest.lsp - don't seem to be getting values 
from pwl - \
    sound_print of the pwl generates a ramp, but a trace of \
    s_fm_ptr_reg^ indicates it is always zero

DONE find *** here's the bug: *** in seq.c

DONE (sample rate conversion is now done by separate module, so \
sample rates are guaranteed to match)
    fix translate to handle logical stop times with different sample rates

DONE fix translate to handle logical stop times - in snd_make_*, add:
    susp->logical_stop_cnt = s1->logical_stop_cnt;

DONE - seq-test-at fails because prepended zeros don't get stuck onto a list
- we should just go through the overhead of linking zero blocks onto a list
for now.

DONE - write test for multiseq.c with different sample rates

DONE - (mseq-test-zero-fill-across-boundaries) complains

DONE - multiseq.c must handle unequal sample rates: use true_t0 to avoid 
accumulated rounding errors

DONE - (mseq-test-diff-stop-times-not-block-boundary) fails

DONE - multiseq: (mseq-test-diff-stop-times) doesn't fill with enough zeros 
- probably the add is not getting set up right, e.g. the s2 doesn't get 
prefixed with zeros perhaps

DONE - add doesnt' compute sother_start early enough - design test and fix 
bug

Things to test: \

DONE	(1) (seq (note) (at 10.0 (note))) - see if addition is avoided
        during 10 second silence
DONE	(2) code for seq looks wrong where s2 is plugged in and susp
        is converted to an add: add_zero_fill gets used where
        s1 is not terminated, and
DONE	(2.5) prepend_zeros gets used in
        place of add_zero_fill.  \

DONE	(3) same thing for multiseq.

DONE - in seq.c: what if s1 has an externally specified logical stop time so
that the time falls in the middle of a block?  This case doesn't seem
to be handled.

DONE fix intgen to take a fix-or-float type

DONE - snd-up will crash if the new sample rate is actually less than input 
rate; need to modify translate so that tests/guards can be added to code.

DONE - snd-add crashes when 2nd arg has t0 of 1.0 (see fuguetest.lsp)

DONE - if prototypes in .h file extend beyond one line, bad code is 
generated by intgen

DONE - multichannel signals - modify simple routines like add and prod ...

DONE - play doesn't work now, even for single channel sound.

DONE - implement zero_fill code

DONE - in add, when termination is first detected in non overlapping 
signals, there is already a buffer allocated (because the copy samples code branch is taken) - check to see that everything is properly deallocated when the zero-fill code is installed.

DONE - write the zero-fill routine or make it work - why doesn't it get 
called now?  Somehow, a termination condition must be being entered.

DONE - fix snd-add to handle zero-fill (non-overlapping operands)

DONE snd-add can't handle scaled arguments

----

TODO LIST

DONE 1) Deal with sound arguments that do not start at the same time.
sound_type's (iterators) have a starting time field t0 which is currently
ignored.  The intended semantics is: a sound is zero at any time earlier
than t0.  At t0, the sound value is that of the first sample, etc.
We need to use t0 as follows: some algorithms, e.g. product, only have
interesting values starting with the maximum t0.  Others, e.g. add, have
interesting values starting with the minimum t0.  There needs to be a
way of specifying (in the .alg file) when the output sound begins and code
must be generated to access argument sounds at times earlier than, or later
than, their t0's.  Hopefully, this can be done in the outer loop to
eliminate inner loop overhead.

DONE 2) Current sounds have infinite length.  In practice, most sounds 
should
have a finite duration, computed as follows: in some cases, the duration
is specified at creation time (e.g. give me a sine tone of duration 1 sec).
In other cases, the duration is implied by the arguments, e.g. the last \
sample of add is the last sample of any of its arguments, whichever is
latest in time; the last sample of a product is at the last sample of any
of its arguments, whichever is earliest in time.  The semantics of a sound
is that any access to the sound beyond its duration returns zero.
IMPORTANT: although not stated or used in any of the code, the end of a 
sound is marked by a pointer to zero_snd_list, which is a header for a block of
zeros.  The next pointer of the header points back to the header, creating
a virtual infinitely long zero signal.  This is the NULL of signal world.
Every sound ends here.  Thus, the computation of the product of two signals
should detect when either source signal is zero_snd_list.  At this point,
the product is complete, and the suspension can replace itself with a
pointer to zero_snd_list.  Notice that sounds are stored as a linked list
of blocks, but the number of samples used in each block is stored in the
header, so it is possible to leave a block half empty at the end of a
signal and follow it with a pointer to zero_snd_list.

DONE 3) The MAKE-INTERPOLATION-LIST function in translate.lsp computes what
combinations of interpolation methods should be supported.  The number
of combinations is exponential in the number of sound arguements.  The
current implementation assumes at least one sound will NOT be \
interpolated (see "(member 'NONE spec)", why would you expect the
output to have a higher sample rate than any of the arguments?).  \

Well, there's a good answer:
an oscillator can have low-sample-rate amplitude and frequency controls
and still have a high sample rate output; thus, it might make sense to
interpolate every sound argument.  Some provision must be made in the
algorithm spec for this case.  Maybe it's simply that if no sample rate
is specified, the default max is used, and then obviously at least one
sound will not be interpolated.  Otherwise, don't assume this.

DONE 4) The current system assumes that arguments are either sounds or they 
aren't.  It turns out that there are many algorithms where arguments
might be either functions of time or constant over time.  E.g. an oscillator
may have a constant frequency or a time-varying frequency.  It seems that
'CONSTANT is just another interpolation method, but we need to work out
how the constant is passed.  I think the right way is to generate a
(combinatorial) number of "snd_make_*" functions depending on the argument
types.  (An alternative is to have a special representation for constants
so they have the same C type as signals, but that only pushed the coercion-
from-floats-to-signals problem up to a higher level.

------------

DONE Something I have meant to mention about compiling nyquist on a
sparcstation:

I had to manually compile the object code for sndfnint.c, as there is
no 'sndfnint.o: ...' line in the makefile.

Otherwise, things seem to have worked very well.

-----

DONE
With the new version in /afs/cs/project....... nyquist gives me the \
following error when I try to use reson:
error: unbound function - SELECT-IMPLEMENTATION-1-2

DONE Not in index: const

WHERE? - misprints: p.36, partial

--------------------------
DONE:
> sim and sum should test and convert sample rates to avoid the
> snd_make_add error.  were you calling snd-add directly? -Roger


No, I was using a sim and at's...

And it works if I say something like:

(sim
(at 0.0 (sound-srate-abs 17000 (osc 60)))
(at 0.5 (osc 67)))

but what doesn't work is:

(sim
    (at 0.0 (ster (scale 0.12 (comb (ring 6 3 2) 270 0.8)) (ramp 6)))
    (at 0.4 (ster (scale 0.4 (drnoi 6.0 370 388 0.4))
            (pwe 0 0.96 4 0.01 6 0.5 6)))
)

using this version of drnoi (where the noise is generated at 13000Hz):
(defun drnoi(&optional (dur 4.8) (res1 500) (res2 497) (amp 0.5))
   (let* ((env (pwl (* dur 0.5) amp dur))
      (noise (sound-srate-abs 13000 (noise dur)))
      (ares (reson noise res1 (* res1 0.02)))
      (ares1 (reson ares res2 (* res1 0.02))))
      (scale (/ 1.0 10000.0 ) (mult ares1 env))))

You can get the rest of the functions loaded by loading \
/afs/cs/project/music/tmp/alex/metafusion.lsp, then replace the 'fixed' \
drnoi by this one.
----------------------------------

TESTED Subject: pwlvr & pwevr, pwlr & pwer

I'm having trouble with some of those new pwe and pwl variants, namely \
those in the subject line. I'm running the latest version (I hope), since \
my binary matches the one in /current, and none of the files in runtime \
have modification dates later than last time I updated...
What happens is this:

7> (pwevr 0.9 1.0 0.7)
error: unbound variable - LIST
if continued: try evaluating symbol again
and this happens for every function mentionned in the subject line.

The output from (bt) is:
8> (bt)
Function: #<Subr-BAKTRACE: #200a5754>
Arguments:
  6
Function: #<Closure-BT: #201c4020>
Function: #<FSubr-COND: #200a5c64>
Arguments:
  ((CDR LIST) (SETF LIST (CDR LIST)) (PUSH (CAR LIST) RESULT))
Function: #<FSubr-PROG: #200a5b14>
Arguments:
  (RESULT (SUM 0))
  LOOP
  (SETF SUM (+ SUM (CAR BREAKPOINTS)))
  (PUSH SUM RESULT)
  (COND ((CDR LIST) (SETF LIST (CDR LIST)) (PUSH (CAR LIST) RESULT)))
  (SETF LIST (CDR LIST))
  (COND (LIST (GO LOOP)))
  (RETURN (REVERSE RESULT))
Function: #<Closure-BREAKPOINTS-RELATIVE: #201ac544>
Arguments:
  (0.9 1 0.7)
Function: #<Closure-PWEVR-LIST: #201ab6b0>
Arguments:
  (0.9 1 0.7)
NIL

So somehow it's trying to use LIST before it's bound...
----------------
----------------

DONE Subject: bugs
           (env .01 0.1 0.1 1 0.5 0.3))))
DONE manual: env figure
DONE manual: partial has extra bracket
and extra paren

======
DONE seqrep is going from 1 to limit inclusive instead of 0 to limit-1 inclusive
as documented.


TESTED OK I have tried the examples in file /demos/examples.lsp and I have found
that chromatic-scale do not works properly. It returns this error:
> (chromatic-scale)
Warning: osc frequency (1.#INF hz) will alias at current sample rate (44100 
hz).
#<Sound: #c489d0>
The cause is that the function sref do not work in this implementation.
(It returns an arbitrary number. Sometimes 0 and sometimes a very big 
FLONUM) \
=================
I seem to have gotten Nyquist to compile via the following kludgy steps.

DONE 1) Amending the syntax of the ln command that's the second line of your
Unix installation instructions as follows:

ln -s sys/unix/next/Makefile Makefile

(This may be an Irix thing or maybe a typo on your end)

THE REST OF THESE WILL BE ADDRESSED BY A PORT TO SGI...
2) Copying audiors6k.c to audiosgi.c as you suggested.

3) Slapping a #define for FALSE in snd.c .  (This made the compiler stop
complaining.)

4) Adjusting the definition of osrand in osstuff.c - apparently, other
files are expecting a function of type long, whereas you have it defined
as of type int.

osrand(n) long n;	 \{return (((long) random()) % n);\}

Right now, the program seems to run, but we'll see how long that lasts.
