In miniAudicle, it’s in the Preferences window. In terminal, the --srate switch sets sample rate:
chuck --srate8000 MyChucK.ck
But both ADC and DAC must run at same rate. AND there has to be supporting hardware there to run at that sample rate. So native Mac coreaudio won’t allow for 8k. You could use the —silent switch, but then you lose the real timebase because ChucK then just runs as fast as it possibly can. You could plug in an iMic or other USB audio device that does support 8k, then it would all work. Use
chuck --probe to find out what sample rates are available.
PRC
Message: 2 Date: Sat, 14 May 2016 17:40:06 +0200 From: Guille Elias Alonso
To: "chuck-users@lists.cs.princeton.edu" Subject: [chuck-users] Set adc sampling rate Message-ID: Content-Type: text/plain; charset="iso-8859-1" Hi guys! I'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've checked my micro supports that (with chuck --probe) but in the doc I haven'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. Thanks!Guille