<p dir="ltr">I had already tried --srate8000 on the terminal but my dac doesn't support 8000 Hz so it doesn't work. But I don't use dac so I thought there should be a way to set the sampling rate of just adc in code or any other way. Or if maybe there is some kind of sampler unit. If not, I'll have to do what you say about plugging another dac device or changing the code D:</p>
<div class="quote">Le 14 mai 2016 8:50 PM, Perry Cook &lt;prc@CS.Princeton.EDU&gt; a écrit :<br type='attribution'><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<div>In miniAudicle, it’s in the Preferences window.  <br />
In terminal, the --srate switch sets sample rate:<br />
<br />
&gt;     chuck --srate8000 MyChucK.ck<br />
<br />
But both ADC and DAC must run at same rate.  AND there has to be <br />
supporting hardware there to run at that sample rate.  So native Mac<br />
coreaudio won’t allow for 8k.  You could use the —silent switch, but <br />
then you lose the real timebase because ChucK then just runs as <br />
fast as it possibly can.  You could plug in an iMic or other USB <br />
audio device that does support 8k, then it would all work.  Use <br />
&gt;    chuck --probe<br />
to find out what sample rates are available.<br />
<br />
PRC<br />
<br />
&gt; Message: 2<br />
&gt; Date: Sat, 14 May 2016 17:40:06 &#43;0200<br />
&gt; From: Guille Elias Alonso &lt;guille_elias_alonso&#64;hotmail.com&gt;<br />
&gt; To: &#34;chuck-users&#64;lists.cs.princeton.edu&#34;<br />
&gt;        &lt;chuck-users&#64;lists.cs.princeton.edu&gt;<br />
&gt; Subject: [chuck-users] Set adc sampling rate<br />
&gt; Message-ID: &lt;DUB125-W53FA6DD2238309A38920E9B3750&#64;phx.gbl&gt;<br />
&gt; Content-Type: text/plain; charset&#61;&#34;iso-8859-1&#34;<br />
&gt; <br />
&gt; Hi guys!<br />
&gt; I&#39;m trying to make some analysis of the micro input and to do so I have to take my micro input with a sampling rate of 8000 Hz. I&#39;ve checked my micro supports that (with chuck --probe) but in the doc I haven&#39;t found how to set the sampling rate of adc. Does someone know how to do that? Or does someone know where I can find some kind of API doc where everything is listed? In the ChucK language specification or in the Unit Generators Reference I cannot find much info about it.<br />
&gt; Thanks!Guille                                <br />
&gt; -------------- next part --------------<br />
&gt; An HTML attachment was scrubbed...<br />
&gt; URL: &lt;<a href="http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20160514/4e439f0b/attachment-0001.html">http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20160514/4e439f0b/attachment-0001.html</a>&gt;<br />
&gt; <br />
&gt; ------------------------------<br />
&gt; <br />
&gt; _______________________________________________<br />
&gt; chuck-users mailing list<br />
&gt; chuck-users&#64;lists.cs.princeton.edu<br />
&gt; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br />
&gt; <br />
&gt; <br />
&gt; End of chuck-users Digest, Vol 130, Issue 11<br />
&gt; ********************************************<br />
<br />
_______________________________________________<br />
chuck-users mailing list<br />
chuck-users&#64;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>
</div>

</blockquote></div>