Hey there,
I want to change the samplerate when I boot my SuperCollider patch. I do it like this:
`
s = Server.default;

s.options.blockSize = 16;
s.options.sampleRate = 22050;
Yet the samplerate stays on 44.1 khz, as I read in the postwindow:
SC_AudioDriver: sample rate = 44100.000000, driver's block size = 16
`

When I change the blocksize, I see it DOES change. How can I change the samplerate? Should I do it in another way outside of SuperCollider?

The audio sampling rate is fixed and it cannot be set at runtime. The options you see in the IDE are for setting the sampling rate of the analog channels (which can go down to 22.05kHz), and are not applied when running a Supercollider program. The available the Bela-specific server options are listed here: https://github.com/BelaPlatform/supercollider/blob/bela-ready-to-merge/SCClassLibrary/Common/Control/BelaServerOptions.sc .

If you want to change the sampling rate for all projects on your board you can do so by editing the file /root/Bela/core/I2c_Codec.h and replace 44100 with 22050 at this line:

params.samplingRate = 44100;

    giuliomoro params.samplingRate = 44100;

    awesome! that's the solution I was looking for! thanks a bunch!