[CM] env->channel, and float-vector->channel
James Hearon
j_hearon at hotmail.com
Thu Sep 6 10:51:00 PDT 2018
Hi,
I'm having some confusion about successive edits using env->channel vs. float-vector->channel. For example if I loop employing env-channel and a vector as an envelope, then I see the successive edits every 1k samples; but when I try to do that using float-vector->channel the spacing is squished.
Float-vector->channel works fine if I employ the vector as envelope across the whole snd., but I'm failing to understand how to employ it for successive back-to-back edits within the snd.
Thank you for Snd 18.7!
Regards,
Jim
(set! (mus-srate) 48000)
(let* ((mysize 8) ;size of vector for envelope pairs
(fsize 48000) ;size of the snd
(myvec (make-float-vector mysize))
)
(new-sound "test.snd" :size fsize)
(insert-silence 0 fsize)
(map-channel (lambda (y) 0.5))
(float-vector-set! myvec 0 0.1);x1
(float-vector-set! myvec 1 0.5 );y1
(float-vector-set! myvec 2 0.5 );x2
(float-vector-set! myvec 3 1.0 );y2
(float-vector-set! myvec 4 0.75 );x3
(float-vector-set! myvec 5 -1.0 );y3
(float-vector-set! myvec 6 1.0 );x4
(float-vector-set! myvec 7 0.0 );y4
(do ((i 0 (+ i 1000)))
((= i 24000))
(env-channel (make-env myvec :duration 0.015 :scaler 1.0) i 1000 0 0 )
;(float-vector->channel myvec i 1000 0) ;place float-vector in the editor ;XXX
))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20180906/c3da40cd/attachment.html>
More information about the Cmdist
mailing list