The common lisp clm didn't support that kind of
setf in the run loop.  I think you need to do it
this way:

(defparameter *test* (make-double-array 100 :initial-element (double 0.0)))

(definstrument get-samples (arr)
  (let ((num (length arr)))
    (file->array "oboe.snd" 0 0 num arr)
    arr))

(get-samples *test*)

In sbcl I can't use the variable name "array" -- I get
the error message:

; The function ARRAY is undefined, and its name is reserved by ANSI CL so that ; even if it were defined later, the code doing so would not be portable.

Also, the array that file->array writes to has to be
explicitly declared to have double elements.

Anyway, after all that (and a whole lot of cursing), you should
get numbers in *test*.

_______________________________________________
Cmdist mailing list
Cmdist@ccrma.stanford.edu
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to