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 theoretically models the system's output for each possible input. They are widely used in electronics and control systems. In some simple cases, this function is a two-dimensional graph of an independent scalar input versus the dependent scalar output, called a transfer curve or characteristic curve. 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 delay times experienced by a signal's various frequency components when the signal passes through a linear time-invariant system (LTI), such as a microphone, coaxial cable, amplifier, loudspeaker, telecommunications system or ethernet cable. These delays are generally frequency dependent, which means that different frequency components experience different delays. As a result, the signal's waveform experiences distortion as it passes through the system. This distortion can cause problems such as poor fidelity in analog video and analog audio, or a high bit-error rate in a digital bit stream. For a modulation signal, the information carried by the signal is carried exclusively in the wave envelope. Group delay therefore operates only with the frequency components derived from the 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 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.

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, as is frequently employed by the symbol in computer languages). 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>

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 for 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.

In optimization, a self-concordant function is a function for which

The Birnbaum–Saunders distribution, also known as the fatigue life distribution, is a probability distribution used extensively in reliability applications to model failure times. There are several alternative formulations of this distribution in the literature. It is named after Z. W. Birnbaum and S. C. Saunders.

<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.

Least-squares support-vector machines (LS-SVM) for statistics and in statistical modeling, are least-squares versions of support-vector machines (SVM), which are a set of related supervised learning methods that analyze data and recognize patterns, and which are used for classification and regression analysis. In this version one finds the solution by solving a set of linear equations instead of a convex quadratic programming (QP) problem for classical SVMs. Least-squares SVM classifiers were proposed by Johan Suykens and Joos Vandewalle. LS-SVMs are a class of kernel-based learning methods.

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.

<span class="mw-page-title-main">Grunsky matrix</span>

In complex analysis and geometric function theory, the Grunsky matrices, or Grunsky operators, are infinite matrices introduced in 1939 by Helmut Grunsky. The matrices correspond to either a single holomorphic function on the unit disk or a pair of holomorphic functions on the unit disk and its complement. The Grunsky inequalities express boundedness properties of these matrices, which in general are contraction operators or in important special cases unitary operators. As Grunsky showed, these inequalities hold if and only if the holomorphic function is univalent. The inequalities are equivalent to the inequalities of Goluzin, discovered in 1947. Roughly speaking, the Grunsky inequalities give information on the coefficients of the logarithm of a univalent function; later generalizations by Milin, starting from the Lebedev–Milin inequality, succeeded in exponentiating the inequalities to obtain inequalities for the coefficients of the univalent function itself. The Grunsky matrix and its associated inequalities were originally formulated in a more general setting of univalent functions between a region bounded by finitely many sufficiently smooth Jordan curves and its complement: the results of Grunsky, Goluzin and Milin generalize to that case.