Waveshaper

Last updated

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]

Contents

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

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

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.

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

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

From the above equation, several observations can be made about the effect of a polynomial shaping function on a single sinusoid:

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

  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 [ dead link ]
  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 [ dead link ]

Related Research Articles

In engineering, a transfer function of a system, sub-system, or component is a mathematical function that models the system's output for each possible input. It is widely used in electronic engineering tools like circuit simulators and control systems. In simple cases, this function can be represented as a two-dimensional graph of an independent scalar input versus the dependent scalar output. Transfer functions for components are used to design and analyze systems assembled from components, particularly using the block diagram technique, in electronics and control theory.

In signal processing, group delay and phase delay are two related ways of describing how a signal's frequency components are delayed in time when passing through a linear time-invariant (LTI) system. Phase delay describes the time shift of a sinusoidal component. Group delay describes the time shift of the envelope of a wave packet, a "pack" or "group" of oscillations centered around one frequency that travel together, formed for instance by multiplying a sine wave by an envelope.

<span class="mw-page-title-main">Quantum harmonic oscillator</span> Important, well-understood quantum mechanical model

The quantum harmonic oscillator is the quantum-mechanical analog of the classical harmonic oscillator. Because an arbitrary smooth potential can usually be approximated as a harmonic potential at the vicinity of a stable equilibrium point, it is one of the most important model systems in quantum mechanics. Furthermore, it is one of the few quantum-mechanical systems for which an exact, analytical solution is known.

In mathematical analysis, the Lagrange inversion theorem, also known as the Lagrange–Bürmann formula, gives the Taylor series expansion of the inverse function of an analytic function. Lagrange inversion is a special case of the inverse function theorem.

In mathematics and signal processing, the Z-transform converts a discrete-time signal, which is a sequence of real or complex numbers, into a complex valued frequency-domain representation.

<span class="mw-page-title-main">Sine wave</span> Wave shaped like the sine function

A sine wave, sinusoidal wave, or sinusoid is a periodic wave whose waveform (shape) is the trigonometric sine function. In mechanics, as a linear motion over time, this is simple harmonic motion; as rotation, it corresponds to uniform circular motion. Sine waves occur often in physics, including wind waves, sound waves, and light waves, such as monochromatic radiation. In engineering, signal processing, and mathematics, Fourier analysis decomposes general functions into a sum of sine waves of various frequencies, relative phases, and magnitudes.

In control theory and signal processing, a linear, time-invariant system is said to be minimum-phase if the system and its inverse are causal and stable.

<span class="mw-page-title-main">Butterworth filter</span> Type of signal processing filter

The Butterworth filter is a type of signal processing filter designed to have a frequency response that is as flat as possible in the passband. It is also referred to as a maximally flat magnitude filter. It was first described in 1930 by the British engineer and physicist Stephen Butterworth in his paper entitled "On the Theory of Filter Amplifiers".

In systems theory, a linear system is a mathematical model of a system based on the use of a linear operator. Linear systems typically exhibit features and properties that are much simpler than the nonlinear case. As a mathematical abstraction or idealization, linear systems find important applications in automatic control theory, signal processing, and telecommunications. For example, the propagation medium for wireless communication systems can often be modeled by linear systems.

In mathematics, the Lerch zeta function, sometimes called the Hurwitz–Lerch zeta function, is a special function that generalizes the Hurwitz zeta function and the polylogarithm. It is named after Czech mathematician Mathias Lerch, who published a paper about the function in 1887.

<span class="mw-page-title-main">Linear time-invariant system</span> Mathematical model which is both linear and time-invariant

In system analysis, among other fields of study, a linear time-invariant (LTI) system is a system that produces an output signal from any input signal subject to the constraints of linearity and time-invariance; these terms are briefly defined below. These properties apply (exactly or approximately) to many important physical systems, in which case the response y(t) of the system to an arbitrary input x(t) can be found directly using convolution: y(t) = (xh)(t) where h(t) is called the system's impulse response and ∗ represents convolution (not to be confused with multiplication). What's more, there are systematic methods for solving any such system (determining h(t)), whereas systems not meeting both properties are generally more difficult (or impossible) to solve analytically. A good example of an LTI system is any electrical circuit consisting of resistors, capacitors, inductors and linear amplifiers.

<span class="mw-page-title-main">Weierstrass–Enneper parameterization</span> Construction for minimal surfaces

In mathematics, the Weierstrass–Enneper parameterization of minimal surfaces is a classical piece of differential geometry.

In computational complexity theory, PostBQP is a complexity class consisting of all of the computational problems solvable in polynomial time on a quantum Turing machine with postselection and bounded error.

In mathematics, a holomorphic vector bundle is a complex vector bundle over a complex manifold X such that the total space E is a complex manifold and the projection map π : EX is holomorphic. Fundamental examples are the holomorphic tangent bundle of a complex manifold, and its dual, the holomorphic cotangent bundle. A holomorphic line bundle is a rank one holomorphic vector bundle.

<span class="mw-page-title-main">Prony's method</span> Method to estimate the components of a signal

Prony analysis was developed by Gaspard Riche de Prony in 1795. However, practical use of the method awaited the digital computer. Similar to the Fourier transform, Prony's method extracts valuable information from a uniformly sampled signal and builds a series of damped complex exponentials or damped sinusoids. This allows the estimation of frequency, amplitude, phase and damping components of a signal.

In functional analysis, the Shannon wavelet is a decomposition that is defined by signal analysis by ideal bandpass filters. Shannon wavelet may be either of real or complex type.

<span class="mw-page-title-main">Skew normal distribution</span> Probability distribution

In probability theory and statistics, the skew normal distribution is a continuous probability distribution that generalises the normal distribution to allow for non-zero skewness.

In the mathematical study of rotational symmetry, the zonal spherical harmonics are special spherical harmonics that are invariant under the rotation through a particular fixed axis. The zonal spherical functions are a broad extension of the notion of zonal spherical harmonics to allow for a more general symmetry group.

In fluid dynamics, a flow with periodic variations is known as pulsatile flow, or as Womersley flow. The flow profiles was first derived by John R. Womersley (1907–1958) in his work with blood flow in arteries. The cardiovascular system of chordate animals is a very good example where pulsatile flow is found, but pulsatile flow is also observed in engines and hydraulic systems, as a result of rotating mechanisms pumping the fluid.

Multipole radiation is a theoretical framework for the description of electromagnetic or gravitational radiation from time-dependent distributions of distant sources. These tools are applied to physical phenomena which occur at a variety of length scales - from gravitational waves due to galaxy collisions to gamma radiation resulting from nuclear decay. Multipole radiation is analyzed using similar multipole expansion techniques that describe fields from static sources, however there are important differences in the details of the analysis because multipole radiation fields behave quite differently from static fields. This article is primarily concerned with electromagnetic multipole radiation, although the treatment of gravitational waves is similar.