Hello,
"distortion" as in crackles may happen when you use too much CPU.
The code on the latest dev
branch prints a warning when a dropout occurs.
The CPU limit is set to about 75% by default, but there are "undocumented" ways to increase it (e.g.: this patch will do it). Note that increasing the CPU limit may make the IDE unresponsive while the program is running. You may then have to briefly press the button on the Bela cape in order to stop the program. Make sure you hold it for less than 2 seconds otherwise you will be cause a shutdown of the board.
I am currently working on trying to improve the efficiency of the libpd
code, but it is not very easy. I see you are using [bfcc~ 2048 1]
. I am not familiar with this object, but if it does infrequent, block-based operations in the main audio thread, then it may be the source of the crackles you are getting, and the only way to fix it may be to re-write the external so that it is threaded . See here for more details on the topic.