[CM] RE: FM how-to question

Jon Monroe jmonroe@easystreet.com
Wed, 11 Jun 2003 15:32:44 -0700


Hello Bill and others,

I chose the middle example, and am now getting a weird error message:

WARNING:
no instruments currently loaded?
;; Loading file /usr/src/clm/clm-2/rc.pool.cl ...
;; Loaded file /usr/src/clm/clm-2/rc.pool.cl
; Creating /usr/src/clm/clm-2/rc...
"cc /usr/src/clm/clm-2/rc.c -o /usr/src/clm/clm-2/rc -g  -O3  -DLINUX -L/usr/src
/clm/clm-2 -lmus  -lm" cc -g  -O3  -DLINUX  /usr/src/clm/clm-2/rc.c -o /usr/src/
clm/clm-2/rc  -L/usr/src/clm/clm-2 -lmus  -lm

*** - STRING-EQUAL: argument #<IO: "/usr/src/clm/clm-2/sample.wav", read, mono,
IO-fil: 6, beg: 0, end: 65535, frames: 77330, bufsize: 65536, hdr-end: 44, data-
start: 0, data-end: 65536, dats: #(0)> should be a string, a symbol or a charact
er
The following restarts are available:
R1 = close files and return to top-level.
R2 = jump past remaining notes.

That was using this slightly modified code (sorry about all the white sp):
(with-sound ()
   (let*
      (
         (f
            (open-input "sample.wav")
         )
         (reader
            (make-readin f)
         )
         (len
            (sound-frames f)
         )
         (freq
            (hz->radians 440.0)
         )
      )
      (do
         (
            (i 0
               (1 + i)
            )
         )
         (
            (= i len)
         )
         (outa i
            (* .5
               (cos
                  (+
                     (* i freq)
                     (readin reader)
                  )
               )
            )
            *output*
         )
      )
   )
)

This is using CLisp 2.3-4 on RH9.

Thanks again,
Jon