[CM] [Snd] Guile newbie help?

vze26m98 vze26m98 at optonline.net
Sun Mar 4 17:25:57 PST 2007


OK, in spite of all the many useful examples in the distribution and
some reading of the Guile documents, this dummy can't get the following
to work in the listener:

(assuming a ">" prompt)

>(define next 0)
>(define prev 0)
>(define sum 0)
>(define rdr (make-sample-reader 0))

>(while (not (sample-reader-at-end? rdr)) (set! next (rdr)) (set! sum (+
sum (- next prev))) (set! prev next))

...or in a more readable form:

(while (not (sample-reader-at-end? rdr))
       (set! next (rdr))
       (set! sum (+ sum (- next prev)))
       (set! prev next))

I can take all these statements out of the while loop and I believe they
work correctly (or give results other than 0.0).

Thanks, Charles

<vze26m98 at optonline.net>




More information about the Cmdist mailing list