[CM] [SND] Explicit access to find-channel in reverse
Bill Schottstaedt
bil at ccrma.Stanford.EDU
Tue Apr 3 04:50:01 PDT 2007
> How, in Snd, is it possible to do the equivalent of C-r, i.e. do backward searches in the channel using
> Scheme? Do I set up a sample-reader, or...
Here's one way:
(define* (find-channel-in-reverse proc :optional beg snd chn edpos)
(let* ((sample (or beg (1- (frames snd chn)))) ; or cursor?
(reader (make-sample-reader sample snd chn -1 edpos))
(result #f))
(do ((i sample (1- i)))
((or result (< i 0))
(and result
(list result i)))
(set! result (proc (reader))))))
More information about the Cmdist
mailing list