Waveshaper
≈ 3 min read
Names in other languages
No names in other languages are held for this entry yet.
Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.
In electronic music, waveshaping is a type of distortion synthesis in which complex spectra are produced from simple tones by altering the shape of the waveforms.
In electronic music, waveshaping is a type of distortion synthesis in which complex spectra are produced from simple tones by altering the shape of the waveforms. y = f(a(t)x(t)) where f is the shaping function, x(t) is the input function, and a(t) is the index function, which in general may vary as a function of time. This parameter a is often used as a constant gain factor called the distortion index. In practice, the input to the waveshaper, x, is considered on [-1,1] for digitally sampled signals, and f will be designed such that y is also on [-1,1] to prevent unwanted clipping in software. ===Polynomials=== A polynomial is a function of the form f(x) = a_n x^n + a_{n-1} x^{n-1} + \cdots + a_2 x^2 + a_1 x + a_0 = \sum_{n=0}^{N}a_nx^n Polynomial functions are convenient as shaping functions because, when given a single sinusoid as input, a polynomial of degree N will only introduce up to the Nth harmonic of the sinusoid. To prove this, consider a sinusoid used as input to the general polynomial. \sum_{n=0}^{N}a_n(\alpha \cos(\omega t + \phi))^n Next, use the inverse Euler's formula to obtain complex sinusoids. \sum_{n=0}^{N}a_n \Bigg(\alpha \frac{e^{j(\omega t + \phi)}+e^{-j(\omega t + \phi)}}{2}\Bigg)^n = a_0 + \sum_{n=1}^{N}\frac{a_n \alpha^n}{2^{n-1}}\frac{(e^{j(\omega t + \phi)}+e^{-j(\omega t + \phi)})^n}{2} Finally, use the binomial formula to transform back to trigonometric form and find coefficients for each harmonic. a_0 + \sum_{n=1}^{N}\Bigg[{\frac{a_n \alpha^n}{2^{n-1}} \sum_{k=0}^{n} {{n \choose k} \frac{e^{j(n-k)(\omega t + \phi)}e^{-jk(\omega t + \phi)}}{2}}\Bigg]} =a_0 + \sum_{n=1}^{N}\Bigg[{\frac{a_n \alpha^n}{2^{n-1}} \sum_{k=0}^{n} {{n \choose k} \frac{e^{j(n-2k)(\omega t + \phi)}}{2}}\Bigg]} =a_0 + \sum_{n=1}^{N}\Bigg[{\frac{a_n \alpha^n}{2^{n-1}} \sum_{k=0}^{\lfloor n/2 \rfloor} {{n \choose k} \cos {((n-2k)(\omega t + \phi))}}\Bigg]} From the above equation, several observations can be made about the effect of a polynomial shaping function on a single sinusoid: All of the sinusoids generated are harmonically related to the original input. The frequency never exceeds N\omega . All odd monomial terms x^n generate odd harmonics from n down to the fundamental, and all even monomial terms generate even harmonics from n down to DC (0 frequency). The shape of the spectrum produced by each monomial term is fixed and determined by the binomial coefficients . The weight of that spectrum in the overall output is determined solely by its a_n coefficient and the amplitude of the input by \frac{a_n \alpha^n}{2^{n-1}} ==Sources==
Text derived from https://en.wikipedia.org/w/index.php?oldid=1360395606 under CC BY-SA 4.0; modifications have been made.