HOME

TheInfoList



OR:

Unit generators (or ''ugens'') are the basic formal units in many MUSIC-N-style
computer music programming languages This is a list of notable programming languages optimized for sound production, algorithmic composition, and sound synthesis. * ABC notation, a language for notating music using the ASCII character set * ChucK, strongly timed, concurrent, and ...
. They are sometimes called
opcode In computing, an opcode (abbreviated from operation code, also known as instruction machine code, instruction code, instruction syllable, instruction parcel or opstring) is the portion of a machine language instruction that specifies the opera ...
s (particularly in
Csound Csound is a domain-specific computer programming language for audio programming. It is called Csound because it is written in C, as opposed to some of its predecessors. It is free software, available under the LGPL-2.1-or-later. Csound was ...
), though this expression is not accurate in that these are not machine-level instructions. Unit generators form the building blocks for designing
synthesis Synthesis or synthesize may refer to: Science Chemistry and biochemistry *Chemical synthesis, the execution of chemical reactions to form a more complex molecule from chemical precursors **Organic synthesis, the chemical synthesis of organi ...
and
signal processing Signal processing is an electrical engineering subfield that focuses on analyzing, modifying and synthesizing '' signals'', such as sound, images, and scientific measurements. Signal processing techniques are used to optimize transmissions, ...
algorithm In mathematics and computer science, an algorithm () is a finite sequence of rigorous instructions, typically used to solve a class of specific problems or to perform a computation. Algorithms are used as specifications for performing ...
s 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 The amplitude of a periodic variable is a measure of its change in a single period (such as time or spatial period). The amplitude of a non-periodic signal is its magnitude compared with a reference value. There are various definitions of a ...
envelope An envelope is a common packaging item, usually made of thin, flat material. It is designed to contain a flat object, such as a letter or card. Traditional envelopes are made from sheets of paper cut to one of three shapes: a rhombus, a ...
of the oscillator OSC through the equation OSC*ENV. Unit generators often use predefined arrays of values for their functions (which are filled with
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, ''Electron ...
s or other
shape A shape or figure is a graphical representation of an object or its external boundary, outline, or external surface, as opposed to other properties such as color, texture, or material type. A plane shape or plane figure is constrained to lie on ...
s 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 Nokia Bell Labs, originally named Bell Telephone Laboratories (1925–1984), then AT&T Bell Laboratories (1984–1996) and Bell Labs Innovations (1996–2007), is an American industrial research and scientific development company owned by mult ...
in the 1950s.


Code example

In the
SuperCollider A particle accelerator is a machine that uses electromagnetic fields to propel charged particles to very high speeds and energies, and to contain them in well-defined beams. Large accelerators are used for fundamental research in particle ...
language, the .ar method in the SinOsc class is a UGen that generates a
sine wave A sine wave, sinusoidal wave, or just sinusoid is a mathematical curve defined in terms of the '' sine'' trigonometric function, of which it is the graph. It is a type of continuous wave and also a smooth periodic function. It occurs often in ...
. The example below makes a sine wave at frequency 440, phase 0, and amplitude 0.5. :
SinOsc.ar(440, 0, 0.5);


See also

* Tuning generator Acoustics software Audio programming languages {{music-software-stub