<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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);">
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Sorry PRC it doesn't work: When i set &quot;buf.rate&quot; to 1.0 and&nbsp; &quot;buf.pos&quot;&nbsp; to 0,&nbsp; it does but not the other way around....</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)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<div>me.sourceDir() &#43; &quot;aeiou.wav&quot; =&gt; string filename;<br>
</div>
<div>if( me.args() ) me.arg(0) =&gt; filename;<br>
</div>
<div><br>
</div>
<div>SndBuf buf =&gt; dac;<br>
</div>
<div><br>
</div>
<div>filename =&gt; buf.read;<br>
</div>
<div><br>
</div>
<div>buf.length() =&gt; dur totalelengte;<br>
</div>
<div>buf.samples() =&gt; int samples;<br>
</div>
<div><br>
</div>
<div>samples =&gt; buf.pos;<br>
</div>
<div>-1.0 =&gt; buf.rate;<br>
</div>
<div><br>
</div>
<div>samples::ms =&gt; now;<br>
</div>
<span></span><br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>Van:</b> chuck-users-bounces@lists.cs.princeton.edu &lt;chuck-users-bounces@lists.cs.princeton.edu&gt; namens Perry Cook &lt;prc@cs.princeton.edu&gt;<br>
<b>Verzonden:</b> woensdag 12 februari 2020 20:58<br>
<b>Aan:</b> chuck-users@lists.cs.princeton.edu &lt;chuck-users@lists.cs.princeton.edu&gt;<br>
<b>Onderwerp:</b> Re: [chuck-users] playing SndBuf backward</font>
<div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt">
<div class="PlainText">You can set the .pos to wherever you like, and set the .rate to a negative number.&nbsp; The sample will happily play backward to zero and stick there (unless you have .loop set).<br>
<br>
PRC<br>
<br>
Sent from my iPad<br>
<br>
&gt; On Feb 12, 2020, at 9:00 AM, chuck-users-request@lists.cs.princeton.edu wrote:<br>
&gt; <br>
&gt; Send chuck-users mailing list submissions to<br>
&gt;&nbsp;&nbsp;&nbsp; chuck-users@lists.cs.princeton.edu<br>
&gt; <br>
&gt; To subscribe or unsubscribe via the World Wide Web, visit<br>
&gt;&nbsp;&nbsp;&nbsp; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
&gt; or, via email, send a message with subject or body 'help' to<br>
&gt;&nbsp;&nbsp;&nbsp; chuck-users-request@lists.cs.princeton.edu<br>
&gt; <br>
&gt; You can reach the person managing the list at<br>
&gt;&nbsp;&nbsp;&nbsp; chuck-users-owner@lists.cs.princeton.edu<br>
&gt; <br>
&gt; When replying, please edit your Subject line so it is more specific<br>
&gt; than &quot;Re: Contents of chuck-users digest...&quot;<br>
&gt; <br>
&gt; <br>
&gt; Today's Topics:<br>
&gt; <br>
&gt;&nbsp;&nbsp; 1. Re: =&gt; now (herman verbaeten)<br>
&gt; <br>
&gt; ----------------------------------------------------------------------<br>
&gt; <br>
&gt; Message: 1<br>
&gt; Date: Tue, 11 Feb 2020 18:11:09 &#43;0000<br>
&gt; From: herman verbaeten &lt;hverb54@hotmail.com&gt;<br>
&gt; To: ChucK Users Mailing List &lt;chuck-users@lists.cs.princeton.edu&gt;<br>
&gt; Subject: Re: [chuck-users] =&gt; now<br>
&gt; Message-ID:<br>
&gt;&nbsp;&nbsp;&nbsp; &lt;AM0PR08MB389035F6190B1D2C897C097BA5180@AM0PR08MB3890.eurprd08.prod.outlook.com&gt;<br>
&gt;&nbsp;&nbsp;&nbsp; <br>
&gt; Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
&gt; <br>
&gt; Thanks again Mario,<br>
&gt; <br>
&gt; I have another question:<br>
&gt; Can you recommend a procedure to address individual samples of a wave-file you read into the SndBuf.<br>
&gt; I discovered a way to play a part of a wave file starting at a certain point using &quot;.pos&quot;.<br>
&gt; I also wonder if there's a way to play it backwards (reverse).<br>
&gt; <br>
&gt; Cheers,<br>
&gt; <br>
&gt; herman<br>
&gt; <br>
&gt; <br>
&gt; <br>
&gt; _______________________________<br>
<br>
<br>
_______________________________________________<br>
chuck-users mailing list<br>
chuck-users@lists.cs.princeton.edu<br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</div>
</span></font></div>
</div>
</body>
</html>