Unit generator

Last updated

Unit generators (or ugens) are the basic formal units in many MUSIC-N-style computer music programming languages. They are sometimes called opcodes (particularly in Csound), though this expression is not accurate in that these are not machine-level instructions.

Contents

Unit generators form the building blocks for designing synthesis and signal processing algorithms in software. For example, a simple unit generator called OSC could generate a sinusoidal waveform of a specific frequency (given as an input or argument to the function or class that represents the unit generator). ENV could be a unit generator that delineates a breakpoint function. Thus ENV could be used to drive the amplitude envelope of the oscillator OSC through the equation OSC*ENV. Unit generators often use predefined arrays of values for their functions (which are filled with waveforms or other shapes by calling a specific generator function).

The unit generator theory of sound synthesis was first developed and implemented by Max Mathews and his colleagues at Bell Labs in the 1950s.

Code example

In the SuperCollider language, the .ar method in the SinOsc class is a UGen that generates a sine wave. The example below makes a sine wave at frequency 440, phase 0, and amplitude 0.5.

SinOsc.ar(440, 0, 0.5);

See also

Related Research Articles

Additive synthesis is a sound synthesis technique that creates timbre by adding sine waves together.

<span class="mw-page-title-main">Frequency modulation synthesis</span> Form of sound synthesis

Frequency modulation synthesis is a form of sound synthesis whereby the frequency of a waveform is changed by modulating its frequency with a modulator. The (instantaneous) frequency of an oscillator is altered in accordance with the amplitude of a modulating signal.

<span class="mw-page-title-main">Phase (waves)</span> The elapsed fraction of a cycle of a periodic function

In physics and mathematics, the phase of a wave or other periodic function of some real variable is an angle-like quantity representing the fraction of the cycle covered up to . It is expressed in such a scale that it varies by one full turn as the variable goes through each period. It may be measured in any angular unit such as degrees or radians, thus increasing by 360° or as the variable completes a full period.

The amplitude of a periodic variable is a measure of its change in a single period. The amplitude of a non-periodic signal is its magnitude compared with a reference value. There are various definitions of amplitude, which are all functions of the magnitude of the differences between the variable's extreme values. In older texts, the phase of a periodic function is sometimes called the amplitude.

In signal processing, distortion is the alteration of the original shape of a signal. In communications and electronics it means the alteration of the waveform of an information-bearing signal, such as an audio signal representing sound or a video signal representing images, in an electronic device or communication channel.

A signal generator is one of a class of electronic devices that generates electrical signals with set properties of amplitude, frequency, and wave shape. These generated signals are used as a stimulus for electronic measurements, typically used in designing, testing, troubleshooting, and repairing electronic or electroacoustic devices, though it often has artistic uses as well.

<span class="mw-page-title-main">Waveform</span> The shape and form of a signal

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. Periodic waveforms repeat regularly at a constant period. The term can also be used for non-periodic or aperiodic signals, like chirps and pulses.

<span class="mw-page-title-main">Sawtooth wave</span> Non-sinusoidal waveform

The sawtooth wave is a kind of non-sinusoidal waveform. It is so named based on its resemblance to the teeth of a plain-toothed saw with a zero rake angle. A single sawtooth, or an intermittently triggered sawtooth, is called a ramp waveform.

<span class="mw-page-title-main">Triangle wave</span> Non-sinusoidal waveform

A triangular wave or triangle wave is a non-sinusoidal waveform named for its triangular shape. It is a periodic, piecewise linear, continuous real function.

Wavetable synthesis is a sound synthesis technique used to create quasi-periodic waveforms often used in the production of musical tones or notes.

<span class="mw-page-title-main">Ring modulation</span> Frequency mixing function in signal processing

In electronics, ring modulation is a signal processing function, an implementation of frequency mixing, in which two signals are combined to yield an output signal. One signal, called the carrier, is typically a sine wave or another simple waveform; the other signal is typically more complicated and is called the input or the modulator signal. A ring modulator is an electronic device for ring modulation. A ring modulator may be used in music synthesizers and as an effects unit.

<span class="mw-page-title-main">Square wave</span> Type of non-sinusoidal waveform

A square wave is a non-sinusoidal periodic waveform in which the amplitude alternates at a steady frequency between fixed minimum and maximum values, with the same duration at minimum and maximum. In an ideal square wave, the transitions between minimum and maximum are instantaneous.

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

SuperCollider is an environment and programming language originally released in 1996 by James McCartney for real-time audio synthesis and algorithmic composition.

<span class="mw-page-title-main">Voltage-controlled oscillator</span> Oscillator with frequency controlled by a voltage input

A voltage-controlled oscillator (VCO) is an electronic oscillator whose oscillation frequency is controlled by a voltage input. The applied input voltage determines the instantaneous oscillation frequency. Consequently, a VCO can be used for frequency modulation (FM) or phase modulation (PM) by applying a modulating signal to the control input. A VCO is also an integral part of a phase-locked loop. VCOs are used in synthesizers to generate a waveform whose pitch can be adjusted by a voltage determined by a musical keyboard or other input.

Phase distortion (PD) synthesis is a synthesis method introduced in 1984 by Casio in its CZ range of synthesizers. In outline, it is similar to phase modulation synthesis as championed by Yamaha Corporation, in the sense that both methods dynamically change the harmonic content of a carrier waveform by influence of another waveform (modulator) in the time domain. However, the application and results of the two methods are quite distinct.

<span class="mw-page-title-main">Function generator</span> Electronic test equipment used to generate electrical waveforms

In electrical engineering, a function generator is usually a piece of electronic test equipment or software used to generate different types of electrical waveforms over a wide range of frequencies. Some of the most common waveforms produced by the function generator are the sine wave, square wave, triangular wave and sawtooth shapes. These waveforms can be either repetitive or single-shot. Another feature included on many function generators is the ability to add a DC offset. Integrated circuits used to generate waveforms may also be described as function generator ICs.

<span class="mw-page-title-main">Arbitrary waveform generator</span>

An arbitrary waveform generator (AWG) is a piece of electronic test equipment used to generate electrical waveforms. These waveforms can be either repetitive or single-shot in which case some kind of triggering source is required. The resulting waveforms can be injected into a device under test and analyzed as they progress through it, confirming the proper operation of the device or pinpointing a fault in it.

In control systems theory, the describing function (DF) method, developed by Nikolay Mitrofanovich Krylov and Nikolay Bogoliubov in the 1930s, and extended by Ralph Kochenburger is an approximate procedure for analyzing certain nonlinear control problems. It is based on quasi-linearization, which is the approximation of the non-linear system under investigation by a linear time-invariant (LTI) transfer function that depends on the amplitude of the input waveform. By definition, a transfer function of a true LTI system cannot depend on the amplitude of the input function because an LTI system is linear. Thus, this dependence on amplitude generates a family of linear systems that are combined in an attempt to capture salient features of the non-linear system behavior. The describing function is one of the few widely applicable methods for designing nonlinear systems, and is very widely used as a standard mathematical tool for analyzing limit cycles in closed-loop controllers, such as industrial process controls, servomechanisms, and electronic oscillators.

<span class="mw-page-title-main">Audio analyzer</span> Test and measurement instrument

An audio analyzer is a test and measurement instrument used to objectively quantify the audio performance of electronic and electro-acoustical devices. Audio quality metrics cover a wide variety of parameters, including level, gain, noise, harmonic and intermodulation distortion, frequency response, relative phase of signals, interchannel crosstalk, and more. In addition, many manufacturers have requirements for behavior and connectivity of audio devices that require specific tests and confirmations.

References