Noise when turning gain knobs


#1

Hi!
I've just got my first axoloti and just following the tutorials. I noticed that when turning the gain of mixers (for example, change the gain knob in the "mix/mix 2" object in the tutorial "04_beating.axp"), it creates crackling noice. I wonder if there is a way to avoid this crackling sound?


#2

The crackling noise sometimes appears turning mixer or volume knobs. Turning the knob relative to the pitch of a filter at high resonance can lead to discontinuity of the sweep. I use the smooth object when possible. In the case of the mix object you should edit the object definition inserting the code relative to the smooth object in order to smooth the parameter "gain". This is my way, I'm not an expert, maybe there is a better method. In the patch that I've uploaded the first channel of the mixer has no crackling noise unlike the second channel. mymix.axp (4.8 KB)


#3

Thanks patatos! I haven't learnt how the coding stuff work but your patch works for me and gives me a direction to learn how it works. Thanks for sharing!


#4

@patatos would you mind to point some directions for learning the scripting stuff you did in mymix.axp?

From what I understand, you added 2 lines of codes (see below) in the control rate section for the mixer objects, but I can't understand what they are actually doing. ex. what is the bit shifting for? what is SMMLA, etc.. Would be great to know where to learn about this scripting language.

__SMMLA(val1-paramgain1,(-1<>1),val1);

Thanks again!


#5

Hi! Inserting the right line of code doesn’t imply that I’ve completely understood it! :slightly_smiling_face: However I think that it represents the discretisation of a 1st order low pass filter. Look at the english wiki page about low pass filter. You can read it until Finite impulse response. The key point is written immediately above :
“The loop that calculates each of the n outputs can be refactored into the equivalent:
for i from 1 to n
y[i] := y[i-1] + α * (x[i] - y[i-1])
That is, the change from one filter output to the next is proportional to the difference between the previous output and the next input. This exponential smoothing property matches the exponential decay seen in the continuous-time system.”
You can see the similarity with the line of code: val = ___SMMLA(...................);
the instruction SMMLA performs that kind of operation so param_gain is smoothed and stored in val.
Search Coding axolotl object in the user guide section of the forum, you will find a concise explanation of instructions and bit shifting.