<div dir="ltr">Hi Guille,<div><br></div><div>Yes, customarily Chuck&#39;s internal timing is clocked from the dac, and it doesn&#39;t support multi-rate audio conversion (yet) so, to my knowledge, the adc and dac must be synced whether you want the dac or not. This is an interesting use case though. </div><div><br></div><div>In my testing it seems that RtAudio, ChucK&#39;s audio backend, upsamples an input source to match the output source, so if you can rework your code from 8kHz to your dac&#39;s rate, that might be easier than finding an 8k dac.  </div><div><br></div><div>spencer</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, May 14, 2016 at 1:59 PM, Guille Elias Alonso <span dir="ltr">&lt;<a href="mailto:guille_elias_alonso@hotmail.com" target="_blank">guille_elias_alonso@hotmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">I had already tried --srate8000 on the terminal but my dac doesn&#39;t support 8000 Hz so it doesn&#39;t work. But I don&#39;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&#39;ll have to do what you say about plugging another dac device or changing the code D:</p><div class="HOEnZb"><div class="h5">
<div>Le 14 mai 2016 8:50 PM, Perry Cook &lt;<a href="mailto:prc@CS.Princeton.EDU" target="_blank">prc@CS.Princeton.EDU</a>&gt; a écrit :<br type="attribution"><blockquote 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 +0200<br>
&gt; From: Guille Elias Alonso &lt;<a href="mailto:guille_elias_alonso@hotmail.com" target="_blank">guille_elias_alonso@hotmail.com</a>&gt;<br>
&gt; To: &quot;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&quot;<br>
&gt;        &lt;<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a>&gt;<br>
&gt; Subject: [chuck-users] Set adc sampling rate<br>
&gt; Message-ID: &lt;DUB125-W53FA6DD2238309A38920E9B3750@phx.gbl&gt;<br>
&gt; Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<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" target="_blank">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; <a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
&gt; <a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">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>
<a href="mailto:chuck-users@lists.cs.princeton.edu" target="_blank">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
</div>
</div>

</blockquote></div></div></div><br>_______________________________________________<br>
chuck-users mailing list<br>
<a href="mailto:chuck-users@lists.cs.princeton.edu">chuck-users@lists.cs.princeton.edu</a><br>
<a href="https://lists.cs.princeton.edu/mailman/listinfo/chuck-users" rel="noreferrer" target="_blank">https://lists.cs.princeton.edu/mailman/listinfo/chuck-users</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div style="font-family:arial;font-size:small"><div>Spencer Salazar<br></div><div>Doctoral Candidate</div><div>Center for Computer Research in Music and Acoustics</div><div>Stanford University</div><div><br></div><div><a href="mailto:spencer@ccrma.stanford.edu" target="_blank">spencer@ccrma.stanford.edu</a></div><div></div><div>+1 831.277.4654<br></div><div><a href="https://ccrma.stanford.edu/~spencer/" style="color:rgb(17,85,204)" target="_blank">https://ccrma.stanford.edu/~spencer/</a><br></div><div><br></div></div></div></div></div></div></div></div></div></div>
</div>