<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Here is a rough idea of what I was thinking. Thank you for the info re: <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
(vector-set! regs i (make-region beg end snd chn))) as a way to</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
increment a variable as region name.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I've got more to do, I know, but I'm also still a bit hung up on</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
var types at the insert-region line below where it wants a region id</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
instead of an unspecified object.<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
;;Open the sound and list samples
<div>(begin</div>
<div>(open-sound "myfile.wav")</div>
<div>(mus-sound-samples "myfile.wav")</div>
<div>)</div>
<div><br>
</div>
<div>(begin</div>
<div> (do ((i 0 (+ i 1)))</div>
<div> ((= i 3)) </div>
<div> (let* ((g (gaussian-distribution 10.0))</div>
<div><span> (regs (make-vector 3))</span><br>
<span> (mysamples (mus-sound-samples "myfile.wav")) </span><br>
</div>
<div> (myran 0.0)</div>
<div></div>
<div> (regstart 0)</div>
<div> (regend 0)</div>
<div> (regdur 1000)</div>
<div> (myreg 0) <br>
</div>
<div> ) </div>
<div> (set! myran (any-random (abs 10.0) g))</div>
<div> (set! regstart (round (* myran mysamples))) </div>
<div> (set! regend (round (+ regstart regdur)))</div>
<div> (vector-set! regs i (make-region regstart regend 0 1))</div>
<div> (set! myreg (vector-ref regs 0)) </div>
<div> (insert-region myreg 0 0 1)</div>
))) <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Jim<br>
</div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>From:</b> cmdist-bounces@ccrma.Stanford.EDU <cmdist-bounces@ccrma.Stanford.EDU> on behalf of cmdist-request@ccrma.Stanford.EDU <cmdist-request@ccrma.Stanford.EDU><br>
<b>Sent:</b> Wednesday, March 3, 2021 10:00 AM<br>
<b>To:</b> cmdist@ccrma.Stanford.EDU <cmdist@ccrma.Stanford.EDU><br>
<b>Subject:</b> Cmdist Digest, Vol 154, Issue 3</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">Send Cmdist mailing list submissions to<br>
cmdist@ccrma.stanford.edu<br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
or, via email, send a message with subject or body 'help' to<br>
cmdist-request@ccrma.stanford.edu<br>
<br>
You can reach the person managing the list at<br>
cmdist-owner@ccrma.stanford.edu<br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Cmdist digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
1. Re: dynamic variables (bil@ccrma.Stanford.EDU)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 02 Mar 2021 12:10:45 -0800<br>
From: bil@ccrma.Stanford.EDU<br>
To: James Hearon <j_hearon@hotmail.com><br>
Cc: "cmdist@ccrma.Stanford.EDU" <cmdist@ccrma.Stanford.EDU><br>
Subject: Re: [CM] dynamic variables<br>
Message-ID: <e139e6d2bea87d41c38d62b43bba68f9@ccrma.stanford.edu><br>
Content-Type: text/plain; charset=US-ASCII; format=flowed<br>
<br>
I can't tell what you're trying to do. Is this related to<br>
the region-play-list example in sndscm.html? Please send<br>
a more detailed description of the problem, or the code you<br>
want to use.<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
Cmdist mailing list<br>
Cmdist@ccrma.stanford.edu<br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
<br>
<br>
End of Cmdist Digest, Vol 154, Issue 3<br>
**************************************<br>
</div>
</span></font></div>
</body>
</html>