Waveshaping
   HOME

TheInfoList



OR:

In
electronic music Electronic music is a genre of music that employs electronic musical instruments, digital instruments, or circuitry-based music technology in its creation. It includes both music made using electronic and electromechanical means ( electroac ...
, waveshaping is a type of
distortion synthesis Distortion synthesis is a group of sound synthesis techniques which modify existing sounds to produce more complex sounds (or timbres), usually by using non-linear circuits or mathematics.Nb. Some authors refer to these techniques as 'modulation ...
in which complex spectra are produced from simple tones by altering the shape of the
waveform In electronics, acoustics, and related fields, the waveform of a signal is the shape of its graph as a function of time, independent of its time and magnitude scales and of any displacement in time.David Crecraft, David Gorham, ''Electronic ...
s.


Uses

Waveshapers are used mainly by
electronic musician ''Electronic Musician'' is a monthly magazine published by Future US featuring articles on synthesizers, music production and electronic musicians. History and profile ''Electronic Musician'' began as ''Polyphony'' magazine in 1975, publis ...
s to achieve an extra-abrasive sound. This effect is most used to enhance the sound of a music
synthesizer A synthesizer (also spelled synthesiser) is an electronic musical instrument that generates audio signals. Synthesizers typically create sounds by generating waveforms through methods including subtractive synthesis, additive synthesis and ...
by altering the waveform or vowel. Rock musicians may also use a waveshaper for heavy
distortion In signal processing, distortion is the alteration of the original shape (or other characteristic) of a signal. In communications and electronics it means the alteration of the waveform of an information-bearing signal, such as an audio signal ...
of a guitar or bass. Some synthesizers or virtual software instruments have built-in waveshapers. The effect can make instruments sound noisy or
overdriven Distortion and overdrive are forms of audio signal processing used to alter the sound of amplified electric musical instruments, usually by increasing their gain (electronics), gain, producing a "fuzzy", "growling", or "gritty" tone. Distort ...
. In digital modeling of analog audio equipment such as
tube amplifiers A valve amplifier or tube amplifier is a type of electronic amplifier that uses vacuum tubes to increase the amplitude or power of a signal. Low to medium power valve amplifiers for frequencies below the microwaves were largely replaced by so ...
, waveshaping is used to introduce a static, or memoryless, nonlinearity to approximate the transfer characteristic of a
vacuum tube A vacuum tube, electron tube, valve (British usage), or tube (North America), is a device that controls electric current flow in a high vacuum between electrodes to which an electric voltage, potential difference has been applied. The type kn ...
or
diode A diode is a two-terminal electronic component that conducts current primarily in one direction (asymmetric conductance); it has low (ideally zero) resistance in one direction, and high (ideally infinite) resistance in the other. A diode ...
limiter.


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 In engineering, a transfer function (also known as system function or network function) of a system, sub-system, or component is a function (mathematics), mathematical function that mathematical model, theoretically models the system's output for ...
from systems theory). 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. This parameter ''a'' is often used as a constant gain factor called the ''distortion index''.http://www.music.mcgill.ca/~gary/courses/2012/307/week12/node4.html In practice, the input to the waveshaper, x, is considered on 1,1for digitally sampled signals, and f will be designed such that y is also on 1,1to 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 In mathematics, a polynomial is an expression consisting of indeterminates (also called variables) and coefficients, that involves only the operations of addition, subtraction, multiplication, and positive-integer powers of variables. An exa ...
is a function of the form f(x) = a_n x^n + a_ x^ + \cdots + a_2 x^2 + a_1 x + a_0 = \sum_^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 ''N''th harmonic of the sinusoid. To prove this, consider a sinusoid used as input to the general polynomial. :\sum_^a_n(\alpha \cos(\omega t + \phi))^n Next, use the inverse
Euler's formula Euler's formula, named after Leonhard Euler, is a mathematical formula in complex analysis that establishes the fundamental relationship between the trigonometric functions and the complex exponential function. Euler's formula states that for an ...
to obtain complex sinusoids. :\sum_^a_n \Bigg(\alpha \frac\Bigg)^n = a_0 + \sum_^\frac\frac Finally, use the
binomial formula In elementary algebra, the binomial theorem (or binomial expansion) describes the algebraic expansion of powers of a binomial. According to the theorem, it is possible to expand the polynomial into a sum involving terms of the form , where the ...
to transform back to trigonometric form and find coefficients for each harmonic. :a_0 + \sum_^\Bigg[ =a_0 + \sum_^\Bigg[ =a_0 + \sum_^\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


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. Oversampling can somewhat but not completely alleviate this problem, depending on how fast the introduced harmonics fall off. 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 Electronic music