Thursday, July 13, 2017

audio - Digital Distortion effect algorithm



I read the DAFX book by Udo Zölzer about the distortion effect at pages 124-125 and it says that suitable simulation of the distortion is given by the function:


$$f(x)=\frac{x}{|x|}\left(1-e^{x^2/|x|}\right)$$


Is someone can explain this formula and what kind of signal we get?


From what I understand 'x' is the sampled signal, so this is a sequence of numbers. what does |x| means? the absolute value of x for each sampled value?


So if I want to implement this simulation of distortion effect so:



  1. I need to know the length of x (It's given by the number of samples)

  2. In a loop I need to calculate this formula for each sample value

  3. after the loop ends, I get the distorted signal (in a digital form)



After that I need to convert it to analog signal so I can hear it.



Answer



|x| denotes the absolute value - the x / |x| bit of the formula is there to make sure that the sign of the input is preserved in the output. Regarding the implementation, yes, the steps you have listed are correct.


No comments:

Post a Comment

periodic trends - Comparing radii in lithium, beryllium, magnesium, aluminium and sodium ions

Apparently the of last four, $\ce{Mg^2+}$ is closest in radius to $\ce{Li+}$. Is this true, and if so, why would a whole larger shell ($\ce{...