CamillaDSP - Cross-platform IIR and FIR engine for crossovers, room correction etc.

I have been working on the controller script for getting sample rate switching working. The first version is actually working!
It uses the next30 branch of CamillaDSP, that can stop immediately when the loopback goes inactive. Then a separate controller script restarts it with a new config once the loopback becomes active again.

Using this, it's possible to run this through camilladsp (that captures from hw:Loopback,0), with automatic config reload when the rate is changed by the second aplay command:
aplay -D hw:Loopback,1 random.raw -r 44100 -f S32_LE -c 4 && aplay -D hw:Loopback,1 random.raw -r 48000 -f S32_LE -c 4

Anyone who wants to play with a very early, poorly documented, and probably quite buggy version can grab it here: https://github.com/HEnquist/camilladsp-controller
On Linux it requires the official Alsa Python binding that should be available in the repositories for most linux distributions.

It also works on Mac, just using the existing capture device rate change notifications there.
 
  • Like
Reactions: 1 users
Usually, a larger chunksize is more efficient. But for convolution it's a little trickier. For long filters, with length > chunksize, it's the same as usual. But if it's the other way around, that filter length < chunksize, then a smaller chunksize is likely a bit faster (I have not checked this though). That's probably quite unusual, so it should be pretty safe to assume that larger chunksize gives better performance.
Thanks for the explanation. IIUC it means determining optimal chunksize is a complex procedure which would require analyzing the pipeline somehow.

IIUC large chunksize => large latency => probably enough CPU time for the increased load for convolution. For time-critical cases (tiny latency) the chunksize will have to be small anyway.
I must admin I'm still a bit skeptical, but it could be worth giving it a shot to see how bad it would actually be.
OK, will do. Please would you push your new PI+ramp code to some branch from next30 so that I could base it on those changes? Thanks.