[CM] CLM-5 in-any from interpreted CL

Orm Finnendahl orm.finnendahl at selma.hfmdk-frankfurt.de
Mon Dec 19 01:55:07 PST 2022


Hi Bill,

 thanks for the advice! I still can't get it to work. Here's what I
did, trying to capture 100 samples starting from 1 second into the
soundfile:

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

(definstrument get-samples (array)
  (let ((fil (open-input (concatenate 'string *ats-snd-dir* "clarinet.aif")))
        (num (length array)))
    (run
     (loop
       for k below num
       do (setf (aref array k) 
	        (ina (+ k 44100) fil)))))
  array)

(get-samples *test*)

-> #(nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
  nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
  nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
  nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
  nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
  nil nil nil nil nil)

It seems, the assignments in the run didn't happen. Am I completely
off?

--
Orm


Am Sonntag, den 18. Dezember 2022 um 12:55:20 Uhr (-0800) schrieb bil at ccrma.Stanford.EDU:
> Wow, that goes back about 20 years!  Why can't you
> use definstrument and a compiler?  I looked at the
> lisp code, and I think in-any returns a file->sample
> generator, but all these IO functions expect you're
> using the run macro to set up the buffers in C.
> But the run macro only runs to completion at compile
> time (?).
> 
> _______________________________________________
> Cmdist mailing list
> Cmdist at ccrma.stanford.edu
> https://cm-mail.stanford.edu/mailman/listinfo/cmdist


More information about the Cmdist mailing list