[CM] Cmdist Digest, Vol 154, Issue 3

James Hearon j_hearon at hotmail.com
Fri Mar 5 10:21:21 PST 2021


Here is a rough idea of what I was thinking.  Thank you for the info re:
   (vector-set! regs i (make-region beg end snd chn))) as a way to
increment a variable as region name.

I've got more to do, I know, but I'm also still a bit hung up on
var types at the insert-region line below where it wants a region id
instead of an unspecified object.

;;Open the sound and list samples
(begin
(open-sound "myfile.wav")
(mus-sound-samples  "myfile.wav")
)

(begin
   (do ((i 0 (+ i 1)))
       ((= i 3))
   (let* ((g (gaussian-distribution 10.0))
         (regs (make-vector 3))
         (mysamples (mus-sound-samples  "myfile.wav"))
         (myran 0.0)
         (regstart 0)
         (regend 0)
         (regdur 1000)
         (myreg 0)
         )
        (set! myran (any-random (abs 10.0) g))
        (set! regstart (round (* myran mysamples)))
        (set! regend (round (+ regstart regdur)))
   (vector-set! regs i (make-region regstart regend 0 1))
   (set! myreg (vector-ref regs 0))
   (insert-region myreg   0 0 1)
   )))

Regards,
Jim

________________________________
From: cmdist-bounces at ccrma.Stanford.EDU <cmdist-bounces at ccrma.Stanford.EDU> on behalf of cmdist-request at ccrma.Stanford.EDU <cmdist-request at ccrma.Stanford.EDU>
Sent: Wednesday, March 3, 2021 10:00 AM
To: cmdist at ccrma.Stanford.EDU <cmdist at ccrma.Stanford.EDU>
Subject: Cmdist Digest, Vol 154, Issue 3

Send Cmdist mailing list submissions to
        cmdist at ccrma.stanford.edu

To subscribe or unsubscribe via the World Wide Web, visit
        https://cm-mail.stanford.edu/mailman/listinfo/cmdist
or, via email, send a message with subject or body 'help' to
        cmdist-request at ccrma.stanford.edu

You can reach the person managing the list at
        cmdist-owner at ccrma.stanford.edu

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Cmdist digest..."


Today's Topics:

   1. Re: dynamic variables (bil at ccrma.Stanford.EDU)


----------------------------------------------------------------------

Message: 1
Date: Tue, 02 Mar 2021 12:10:45 -0800
From: bil at ccrma.Stanford.EDU
To: James Hearon <j_hearon at hotmail.com>
Cc: "cmdist at ccrma.Stanford.EDU" <cmdist at ccrma.Stanford.EDU>
Subject: Re: [CM] dynamic variables
Message-ID: <e139e6d2bea87d41c38d62b43bba68f9 at ccrma.stanford.edu>
Content-Type: text/plain; charset=US-ASCII; format=flowed

I can't tell what you're trying to do.  Is this related to
the region-play-list example in sndscm.html?  Please send
a more detailed description of the problem, or the code you
want to use.



------------------------------

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


End of Cmdist Digest, Vol 154, Issue 3
**************************************
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://cm-mail.stanford.edu/pipermail/cmdist/attachments/20210305/afbcceb2/attachment.html>


More information about the Cmdist mailing list