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: [email protected] <[email protected]> on 
behalf of [email protected] <[email protected]>
Sent: Wednesday, March 3, 2021 10:00 AM
To: [email protected] <[email protected]>
Subject: Cmdist Digest, Vol 154, Issue 3

Send Cmdist mailing list submissions to
        [email protected]

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
        [email protected]

You can reach the person managing the list at
        [email protected]

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 ([email protected])


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

Message: 1
Date: Tue, 02 Mar 2021 12:10:45 -0800
From: [email protected]
To: James Hearon <[email protected]>
Cc: "[email protected]" <[email protected]>
Subject: Re: [CM] dynamic variables
Message-ID: <[email protected]>
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
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist


End of Cmdist Digest, Vol 154, Issue 3
**************************************
_______________________________________________
Cmdist mailing list
[email protected]
https://cm-mail.stanford.edu/mailman/listinfo/cmdist

Reply via email to