Bellard's formula: Difference between revisions

From formulasearchengine
Jump to navigation Jump to search
en>ZéroBot
m r2.7.1) (robot Adding: zh:貝拉公式
 
en>Bkouhi
added Category:Pi using HotCat
Line 1: Line 1:
The person who wrote the post is called Jayson Hirano and he totally  [http://gcjcteam.org/index.php?mid=etc_video&document_srl=696611&sort_index=regdate&order_type=desc psychic readers] readings, [http://afeen.fbho.net/v2/index.php?do=/profile-210/info/ fbho.net], digs that name. Mississippi is the only place I've been residing in but I will have to move in a yr or two. What me and my family members adore is bungee jumping but I've been using on new things lately. My working day occupation is an information officer but I've currently applied for an additional one.<br><br>Feel free to visit my homepage: certified psychics ([http://kard.dk/?p=24252 More Information and facts])
<!-- Deleted image removed: [[Image:Waveshaper.JPG|frame|right|A screenshot of the Fruity Waveshaper plugin]] -->
In [[electronic music]] '''waveshaping''' is a type of [[distortion synthesis]] in which complex [[Spectrum|spectra]] are produced from simple tones by altering the shape of the [[waveform]]s.<ref>Charles Dodge and Thomas A. Jersey (1997). ''Computer Music: Synthesis, Composition, and Performance'', "Glossary", p.438. ISBN 0-02-864682-7.</ref>
 
== Uses ==
 
Waveshapers are used mainly by [[electronic musician]]s to achieve an extra-abrasive sound. This effect is most used to enhance the sound of a music [[synthesizer]] by altering the waveform or vowel. Rock musicians may also use a waveshaper for heavy [[distortion]] of a guitar or bass. Some synthesizers or virtual software instruments have built-in waveshapers. The effect can make instruments sound noisy or [[Distortion (music)|overdriven]].
 
In digital modeling of analog audio equipment such as [[tube amplifiers]], waveshaping is used to introduce a static, or memoryless, nonlinearity to approximate the transfer characteristic of a [[vacuum tube]] or [[diode]] limiter.<ref>Yeh, David T. and Pakarinen, Jyri (2009). "A Review of Digital Techniques for Modeling Vacuum-Tube Guitar Amplifiers", ''Computer Music Journal'', 33:2, pp. 89-90</ref>
 
== How it works ==
 
A waveshaper is an [[audio signal processing|audio effect]] that changes an audio signal by mapping an input signal to the output signal by applying a fixed or variable mathematical function, called the ''shaping function'' or ''transfer function'', to the input signal (the term shaping function is preferred to avoid confusion with the [[transfer function]] from systems theory).<ref>http://www.music.mcgill.ca/~gary/courses/2012/307/week12/node2.html</ref> The function can be any function at all.
 
Mathematically, the operation is defined by the ''waveshaper equation''
:<math>y = f(a(t)x(t))</math>
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.<ref>Le Brun, Marc (1979). "Digital Waveshaping Synthesis", ''Journal of the Audio Engineering Society'', 27:4, p. 250</ref> This parameter ''a'' is often used as a constant gain factor called the ''distortion index''.<ref>http://www.music.mcgill.ca/~gary/courses/2012/307/week12/node4.html</ref> 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.
 
== Commonly used shaping functions ==
 
Sin, arctan, polynomial functions, or piecewise functions (such as the hard clipping function) are commonly used as waveshaping transfer functions. It is also possible to use table-driven functions, consisting of discrete points with some degree of interpolation or linear segments.
 
===Polynomials===
 
A [[polynomial]] is a function of the form
 
<math> 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 </math>
 
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 ''N''th harmonic of the sinusoid. To prove this, consider a sinusoid used as input to the general polynomial.
 
:<math>\sum_{n=0}^{N}a_n(\alpha cos(\omega t + \phi))^n </math>
 
Next, use the inverse [[Euler's formula]] to obtain complex sinusoids.
 
:<math>\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}</math>
 
Finally, use the [[binomial formula]] to transform back to trigonometric form and find coefficients for each harmonic.
 
:<math>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]}
</math>
<math>
=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]}
</math>
 
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 <math>N\omega</math>.
 
*All odd monomial terms <math>x^n</math> 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 <math>a_n</math> coefficient and the amplitude of the input by <math>\frac{a_n \alpha^n}{2^{n-1}}</math>
 
== Problems associated with waveshapers ==
 
The sound produced by digital waveshapers tends to be harsh and unattractive, because of problems with aliasing. Waveshaping is a non-linear operation, so it's hard to generalize about the effect of a waveshaping function on an input signal. The mathematics of non-linear operations on audio signals is difficult, and not well understood. The effect will be amplitude-dependent, among other things. But generally, waveshapers—particularly those with sharp corners (e.g., some derivatives are discontinuous) -- tend to introduce large numbers of high frequency harmonics. If these introduced harmonics exceed the [[nyquist limit]], then they will be heard as harsh inharmonic content with a distinctly metallic sound in the output signal. [[Supersampling]] can somewhat but not completely alleviate this problem, depending on how fast the introduced harmonics fall off. Supersampling involves the following procedure:
 
* [[Upsample]] the signal to a high sample rate and interpolate using a low-pass filter.
* Apply the waveshaping function to the supersampled signal.
* Filter the supersampled signal to remove harmonic content above the [[Nyquist limit]] of the original sample rate, preferably with a fairly steep filter.
* [[Downsample]] the signal to the original sample rate.
 
With relatively simple, and relatively smooth waveshaping functions (sin(a*x), atan(a*x), polynomial functions, for example), this procedure may reduce aliased content in the harmonic signal to the point that it is musically acceptable. But waveshaping functions other than polynomial waveshaping functions will introduce an infinite number of harmonics into the signal, some which may audibly alias even at the supersampled frequency.
 
==Sources==
{{reflist}}
 
[[Category:Electronic music]]

Revision as of 17:54, 12 October 2013

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.[1]

Uses

Waveshapers are used mainly by electronic musicians to achieve an extra-abrasive sound. This effect is most used to enhance the sound of a music synthesizer by altering the waveform or vowel. Rock musicians may also use a waveshaper for heavy distortion of a guitar or bass. Some synthesizers or virtual software instruments have built-in waveshapers. The effect can make instruments sound noisy or overdriven.

In digital modeling of analog audio equipment such as tube amplifiers, waveshaping is used to introduce a static, or memoryless, nonlinearity to approximate the transfer characteristic of a vacuum tube or diode limiter.[2]

How it works

A waveshaper is an audio effect that changes an audio signal by mapping an input signal to the output signal by applying a fixed or variable mathematical function, called the shaping function or transfer function, to the input signal (the term shaping function is preferred to avoid confusion with the transfer function from systems theory).[3] The function can be any function at all.

Mathematically, the operation is defined by the waveshaper equation

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.[4] This parameter a is often used as a constant gain factor called the distortion index.[5] 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.

Commonly used shaping functions

Sin, arctan, polynomial functions, or piecewise functions (such as the hard clipping function) are commonly used as waveshaping transfer functions. It is also possible to use table-driven functions, consisting of discrete points with some degree of interpolation or linear segments.

Polynomials

A polynomial is a function of the form

f(x)=anxn+an1xn1++a2x2+a1x+a0=n=0Nanxn

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.

n=0Nan(αcos(ωt+ϕ))n

Next, use the inverse Euler's formula to obtain complex sinusoids.

n=0Nan(αej(ωt+ϕ)+ej(ωt+ϕ)2)n=a0+n=1Nanαn2n1(ej(ωt+ϕ)+ej(ωt+ϕ))n2

Finally, use the binomial formula to transform back to trigonometric form and find coefficients for each harmonic.

a0+n=1N[anαn2n1k=0n(nk)ej(nk)(ωt+ϕ)ejk(ωt+ϕ)2]=a0+n=1N[anαn2n1k=0n(nk)ej(n2k)(ωt+ϕ)2]

=a0+n=1N[anαn2n1k=0n/2(nk)cos((n2k)(ωt+ϕ))]

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ω.
  • All odd monomial terms xn 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 an coefficient and the amplitude of the input by anαn2n1

Problems associated with waveshapers

The sound produced by digital waveshapers tends to be harsh and unattractive, because of problems with aliasing. Waveshaping is a non-linear operation, so it's hard to generalize about the effect of a waveshaping function on an input signal. The mathematics of non-linear operations on audio signals is difficult, and not well understood. The effect will be amplitude-dependent, among other things. But generally, waveshapers—particularly those with sharp corners (e.g., some derivatives are discontinuous) -- tend to introduce large numbers of high frequency harmonics. If these introduced harmonics exceed the nyquist limit, then they will be heard as harsh inharmonic content with a distinctly metallic sound in the output signal. Supersampling can somewhat but not completely alleviate this problem, depending on how fast the introduced harmonics fall off. Supersampling involves the following procedure:

  • Upsample the signal to a high sample rate and interpolate using a low-pass filter.
  • Apply the waveshaping function to the supersampled signal.
  • Filter the supersampled signal to remove harmonic content above the Nyquist limit of the original sample rate, preferably with a fairly steep filter.
  • Downsample the signal to the original sample rate.

With relatively simple, and relatively smooth waveshaping functions (sin(a*x), atan(a*x), polynomial functions, for example), this procedure may reduce aliased content in the harmonic signal to the point that it is musically acceptable. But waveshaping functions other than polynomial waveshaping functions will introduce an infinite number of harmonics into the signal, some which may audibly alias even at the supersampled frequency.

Sources

43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.

  1. Charles Dodge and Thomas A. Jersey (1997). Computer Music: Synthesis, Composition, and Performance, "Glossary", p.438. ISBN 0-02-864682-7.
  2. Yeh, David T. and Pakarinen, Jyri (2009). "A Review of Digital Techniques for Modeling Vacuum-Tube Guitar Amplifiers", Computer Music Journal, 33:2, pp. 89-90
  3. http://www.music.mcgill.ca/~gary/courses/2012/307/week12/node2.html
  4. Le Brun, Marc (1979). "Digital Waveshaping Synthesis", Journal of the Audio Engineering Society, 27:4, p. 250
  5. http://www.music.mcgill.ca/~gary/courses/2012/307/week12/node4.html